A suitable mixture of renewable resources including wind, tidal and photovoltaic units can be used in the microgrids installed in coastal areas or islands. However, the variation in the renewable resources such as wind speed, tidal current speed and solar radiation is significant that affects the reliability performance of these microgrids. Thus, to accurately evaluate the reliability of the microgrids, the failure rate of composed components affected by the variation in the renewable resources must be considered. To study the impact of variation in the temperature and renewable resources on the failure rate of components, different equations including Arrhenius law, temperature modification factor, fatigue strength, bending and contact stress, limit state function of turbine, thermal loss of semiconductor devices, the temperature rise of transformer and cable, the temperature coefficient of voltage and power of photovoltaic panels are developed. According to the developed equations, the components failure rate, and consequently the failure rate of the microgrid considering the variation in the temperature and renewable resources are determined. Then, by simulation, the impact of different energy sources on the failure rate of the whole system is evaluated and the reliability in a microgrid consisting of offshore renewable energy sources will be studied.