sparse-state-54552
11/14/2022, 3:15 PMfrom pulumi_gcp import monitoring
class GCPUptimeCheck:
def __init__(self, hostname, projectid):
self.hostname = f"{hostname}.<http://verifybrand.com|verifybrand.com>"
self.projectid = projectid
def createUptimeCheck(self):
project_id = self.projectid
https = monitoring.UptimeCheckConfig(f"{self.hostname}-UptimeCheck",
display_name=self.hostname,
http_check=monitoring.UptimeCheckConfigHttpCheckArgs(
path="/home/heartbeat",
port=443,
use_ssl=True,
validate_ssl=True
),
monitored_resource=monitoring.UptimeCheckConfigMonitoredResourceArgs(
labels={
"host":self.hostname,
"projectId":project_id,
},
type="uptime_url",
),
timeout="10s",
project=self.projectid
)
return https
On each apply it says the reason to replace is because of the monitoredResource. Runnin a preview --json I have the following detailed reasons.
"detailedDiff": {
"monitoredResource.labels.projectId": {
"kind": "add-replace",
"inputDiff": false
},
"monitoredResource.labels.project_id": {
"kind": "delete-replace",
"inputDiff": false
}
}
But looking at the old state and new state it lists the same json output. I's like to not to replace the uptime checks to be able to keep historical data. Any help is appreciated.billowy-army-68599
11/14/2022, 4:01 PM