Skip to content

Commit be1012a

Browse files
modular-magicianupodroidc2thorn
authored
Promote Managed SSL to GA + Doc fixes (#4247) (#2752)
Co-authored-by: upodroid <[email protected]> Co-authored-by: Cameron Thornton <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: upodroid <[email protected]> Co-authored-by: Cameron Thornton <[email protected]>
1 parent b23423d commit be1012a

File tree

6 files changed

+25
-58
lines changed

6 files changed

+25
-58
lines changed

.changelog/4247.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
compute: promoted `google_compute_managed_ssl_certificate` to GA
3+
```

google-beta/resource_cloud_scheduler_job.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ By default, the job is sent to the version which is the default version when the
180180
ForceNew: true,
181181
Description: `HTTP request body.
182182
A request body is allowed only if the HTTP method is POST or PUT.
183-
It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.`,
183+
It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.
184+
185+
A base64-encoded string.`,
184186
},
185187
"headers": {
186188
Type: schema.TypeMap,
@@ -246,7 +248,9 @@ send a request to the targeted url`,
246248
ForceNew: true,
247249
Description: `HTTP request body.
248250
A request body is allowed only if the HTTP method is POST, PUT, or PATCH.
249-
It is an error to set body on a job with an incompatible HttpMethod.`,
251+
It is an error to set body on a job with an incompatible HttpMethod.
252+
253+
A base64-encoded string.`,
250254
},
251255
"headers": {
252256
Type: schema.TypeMap,

google-beta/resource_cloud_scheduler_job_generated_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ resource "google_cloud_scheduler_job" "job" {
115115
http_target {
116116
http_method = "POST"
117117
uri = "https://example.com/ping"
118+
body = base64encode("{"foo":"bar"}")
118119
}
119120
}
120121
`, context)

google-beta/resource_compute_managed_ssl_certificate_generated_test.go

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample(t *te
3232

3333
vcrTest(t, resource.TestCase{
3434
PreCheck: func() { testAccPreCheck(t) },
35-
Providers: testAccProvidersOiCS,
35+
Providers: testAccProviders,
3636
ExternalProviders: map[string]resource.ExternalProvider{
3737
"random": {},
3838
},
@@ -41,15 +41,18 @@ func TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample(t *te
4141
{
4242
Config: testAccComputeManagedSslCertificate_managedSslCertificateBasicExample(context),
4343
},
44+
{
45+
ResourceName: "google_compute_managed_ssl_certificate.default",
46+
ImportState: true,
47+
ImportStateVerify: true,
48+
},
4449
},
4550
})
4651
}
4752

4853
func testAccComputeManagedSslCertificate_managedSslCertificateBasicExample(context map[string]interface{}) string {
4954
return Nprintf(`
5055
resource "google_compute_managed_ssl_certificate" "default" {
51-
provider = google-beta
52-
5356
name = "tf-test-test-cert%{random_suffix}"
5457
5558
managed {
@@ -58,16 +61,12 @@ resource "google_compute_managed_ssl_certificate" "default" {
5861
}
5962
6063
resource "google_compute_target_https_proxy" "default" {
61-
provider = google-beta
62-
6364
name = "tf-test-test-proxy%{random_suffix}"
6465
url_map = google_compute_url_map.default.id
6566
ssl_certificates = [google_compute_managed_ssl_certificate.default.id]
6667
}
6768
6869
resource "google_compute_url_map" "default" {
69-
provider = google-beta
70-
7170
name = "tf-test-url-map%{random_suffix}"
7271
description = "a description"
7372
@@ -90,8 +89,6 @@ resource "google_compute_url_map" "default" {
9089
}
9190
9291
resource "google_compute_backend_service" "default" {
93-
provider = google-beta
94-
9592
name = "tf-test-backend-service%{random_suffix}"
9693
port_name = "http"
9794
protocol = "HTTP"
@@ -101,43 +98,30 @@ resource "google_compute_backend_service" "default" {
10198
}
10299
103100
resource "google_compute_http_health_check" "default" {
104-
provider = google-beta
105-
106101
name = "tf-test-http-health-check%{random_suffix}"
107102
request_path = "/"
108103
check_interval_sec = 1
109104
timeout_sec = 1
110105
}
111106
112107
resource "google_dns_managed_zone" "zone" {
113-
provider = google-beta
114-
115108
name = "dnszone%{random_suffix}"
116109
dns_name = "sslcert.tf-test.club."
117110
}
118111
119112
resource "google_compute_global_forwarding_rule" "default" {
120-
provider = google-beta
121-
122113
name = "tf-test-forwarding-rule%{random_suffix}"
123114
target = google_compute_target_https_proxy.default.id
124115
port_range = 443
125116
}
126117
127118
resource "google_dns_record_set" "set" {
128-
provider = google-beta
129-
130119
name = "sslcert.tf-test.club."
131120
type = "A"
132121
ttl = 3600
133122
managed_zone = google_dns_managed_zone.zone.name
134123
rrdatas = [google_compute_global_forwarding_rule.default.ip_address]
135124
}
136-
137-
provider "google-beta" {
138-
region = "us-central1"
139-
zone = "us-central1-a"
140-
}
141125
`, context)
142126
}
143127

@@ -151,7 +135,7 @@ func TestAccComputeManagedSslCertificate_managedSslCertificateRecreationExample(
151135

152136
vcrTest(t, resource.TestCase{
153137
PreCheck: func() { testAccPreCheck(t) },
154-
Providers: testAccProvidersOiCS,
138+
Providers: testAccProviders,
155139
ExternalProviders: map[string]resource.ExternalProvider{
156140
"random": {},
157141
},
@@ -160,6 +144,11 @@ func TestAccComputeManagedSslCertificate_managedSslCertificateRecreationExample(
160144
{
161145
Config: testAccComputeManagedSslCertificate_managedSslCertificateRecreationExample(context),
162146
},
147+
{
148+
ResourceName: "google_compute_managed_ssl_certificate.cert",
149+
ImportState: true,
150+
ImportStateVerify: true,
151+
},
163152
},
164153
})
165154
}
@@ -170,7 +159,6 @@ func testAccComputeManagedSslCertificate_managedSslCertificateRecreationExample(
170159
// recreate the ssl certificate and update the target https proxy correctly
171160
172161
resource "google_compute_target_https_proxy" "default" {
173-
provider = google-beta
174162
name = "test-proxy"
175163
url_map = google_compute_url_map.default.id
176164
ssl_certificates = [google_compute_managed_ssl_certificate.cert.id]
@@ -190,7 +178,6 @@ resource "random_id" "certificate" {
190178
}
191179
192180
resource "google_compute_managed_ssl_certificate" "cert" {
193-
provider = google-beta
194181
name = random_id.certificate.hex
195182
196183
lifecycle {
@@ -203,7 +190,6 @@ resource "google_compute_managed_ssl_certificate" "cert" {
203190
}
204191
205192
resource "google_compute_url_map" "default" {
206-
provider = google-beta
207193
name = "url-map"
208194
description = "a description"
209195
default_service = google_compute_backend_service.default.id
@@ -222,7 +208,6 @@ resource "google_compute_url_map" "default" {
222208
}
223209
224210
resource "google_compute_backend_service" "default" {
225-
provider = google-beta
226211
name = "backend-service"
227212
port_name = "http"
228213
protocol = "HTTP"
@@ -231,7 +216,6 @@ resource "google_compute_backend_service" "default" {
231216
}
232217
233218
resource "google_compute_http_health_check" "default" {
234-
provider = google-beta
235219
name = "http-health-check"
236220
request_path = "/"
237221
check_interval_sec = 1

website/docs/r/cloud_scheduler_job.html.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ resource "google_cloud_scheduler_job" "job" {
8585
http_target {
8686
http_method = "POST"
8787
uri = "https://example.com/ping"
88+
body = base64encode("{"foo":"bar"}")
8889
}
8990
}
9091
```
@@ -331,6 +332,7 @@ The `app_engine_http_target` block supports:
331332
HTTP request body.
332333
A request body is allowed only if the HTTP method is POST or PUT.
333334
It will result in invalid argument error to set a body on a job with an incompatible HttpMethod.
335+
A base64-encoded string.
334336

335337
* `headers` -
336338
(Optional)
@@ -371,6 +373,7 @@ The `http_target` block supports:
371373
HTTP request body.
372374
A request body is allowed only if the HTTP method is POST, PUT, or PATCH.
373375
It is an error to set body on a job with an incompatible HttpMethod.
376+
A base64-encoded string.
374377

375378
* `headers` -
376379
(Optional)

website/docs/r/compute_managed_ssl_certificate.html.markdown

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ managed by Google.
2929
For a resource where you provide the key, see the
3030
SSL Certificate resource.
3131

32-
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
33-
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.
3432

3533
To get more information about ManagedSslCertificate, see:
3634

@@ -61,8 +59,6 @@ In conclusion: Be extremely cautious.
6159

6260
```hcl
6361
resource "google_compute_managed_ssl_certificate" "default" {
64-
provider = google-beta
65-
6662
name = "test-cert"
6763
6864
managed {
@@ -71,16 +67,12 @@ resource "google_compute_managed_ssl_certificate" "default" {
7167
}
7268
7369
resource "google_compute_target_https_proxy" "default" {
74-
provider = google-beta
75-
7670
name = "test-proxy"
7771
url_map = google_compute_url_map.default.id
7872
ssl_certificates = [google_compute_managed_ssl_certificate.default.id]
7973
}
8074
8175
resource "google_compute_url_map" "default" {
82-
provider = google-beta
83-
8476
name = "url-map"
8577
description = "a description"
8678
@@ -103,8 +95,6 @@ resource "google_compute_url_map" "default" {
10395
}
10496
10597
resource "google_compute_backend_service" "default" {
106-
provider = google-beta
107-
10898
name = "backend-service"
10999
port_name = "http"
110100
protocol = "HTTP"
@@ -114,43 +104,30 @@ resource "google_compute_backend_service" "default" {
114104
}
115105
116106
resource "google_compute_http_health_check" "default" {
117-
provider = google-beta
118-
119107
name = "http-health-check"
120108
request_path = "/"
121109
check_interval_sec = 1
122110
timeout_sec = 1
123111
}
124112
125113
resource "google_dns_managed_zone" "zone" {
126-
provider = google-beta
127-
128114
name = "dnszone"
129115
dns_name = "sslcert.tf-test.club."
130116
}
131117
132118
resource "google_compute_global_forwarding_rule" "default" {
133-
provider = google-beta
134-
135119
name = "forwarding-rule"
136120
target = google_compute_target_https_proxy.default.id
137121
port_range = 443
138122
}
139123
140124
resource "google_dns_record_set" "set" {
141-
provider = google-beta
142-
143125
name = "sslcert.tf-test.club."
144126
type = "A"
145127
ttl = 3600
146128
managed_zone = google_dns_managed_zone.zone.name
147129
rrdatas = [google_compute_global_forwarding_rule.default.ip_address]
148130
}
149-
150-
provider "google-beta" {
151-
region = "us-central1"
152-
zone = "us-central1-a"
153-
}
154131
```
155132
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
156133
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=managed_ssl_certificate_recreation&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
@@ -165,7 +142,6 @@ provider "google-beta" {
165142
// recreate the ssl certificate and update the target https proxy correctly
166143
167144
resource "google_compute_target_https_proxy" "default" {
168-
provider = google-beta
169145
name = "test-proxy"
170146
url_map = google_compute_url_map.default.id
171147
ssl_certificates = [google_compute_managed_ssl_certificate.cert.id]
@@ -185,7 +161,6 @@ resource "random_id" "certificate" {
185161
}
186162
187163
resource "google_compute_managed_ssl_certificate" "cert" {
188-
provider = google-beta
189164
name = random_id.certificate.hex
190165
191166
lifecycle {
@@ -198,7 +173,6 @@ resource "google_compute_managed_ssl_certificate" "cert" {
198173
}
199174
200175
resource "google_compute_url_map" "default" {
201-
provider = google-beta
202176
name = "url-map"
203177
description = "a description"
204178
default_service = google_compute_backend_service.default.id
@@ -217,7 +191,6 @@ resource "google_compute_url_map" "default" {
217191
}
218192
219193
resource "google_compute_backend_service" "default" {
220-
provider = google-beta
221194
name = "backend-service"
222195
port_name = "http"
223196
protocol = "HTTP"
@@ -226,7 +199,6 @@ resource "google_compute_backend_service" "default" {
226199
}
227200
228201
resource "google_compute_http_health_check" "default" {
229-
provider = google-beta
230202
name = "http-health-check"
231203
request_path = "/"
232204
check_interval_sec = 1

0 commit comments

Comments
 (0)