diff --git a/.teamcity/components/inputs/services_beta.kt b/.teamcity/components/inputs/services_beta.kt index 4660649d59c..7481be1fc8b 100644 --- a/.teamcity/components/inputs/services_beta.kt +++ b/.teamcity/components/inputs/services_beta.kt @@ -91,6 +91,11 @@ var ServicesListBeta = mapOf( "displayName" to "Biglake", "path" to "./google-beta/services/biglake" ), + "biglakeiceberg" to mapOf( + "name" to "biglakeiceberg", + "displayName" to "BiglakeIceberg", + "path" to "./google-beta/services/biglakeiceberg" + ), "bigquery" to mapOf( "name" to "bigquery", "displayName" to "Bigquery", diff --git a/.teamcity/components/inputs/services_ga.kt b/.teamcity/components/inputs/services_ga.kt index 81279eb12db..40e8a74fbc2 100644 --- a/.teamcity/components/inputs/services_ga.kt +++ b/.teamcity/components/inputs/services_ga.kt @@ -91,6 +91,11 @@ var ServicesListGa = mapOf( "displayName" to "Biglake", "path" to "./google/services/biglake" ), + "biglakeiceberg" to mapOf( + "name" to "biglakeiceberg", + "displayName" to "BiglakeIceberg", + "path" to "./google/services/biglakeiceberg" + ), "bigquery" to mapOf( "name" to "bigquery", "displayName" to "Bigquery", diff --git a/go.mod b/go.mod index c76d94ff060..cd9bde1d590 100644 --- a/go.mod +++ b/go.mod @@ -29,16 +29,16 @@ require ( github.com/hashicorp/terraform-plugin-testing v1.13.3 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/hashstructure v1.1.0 - github.com/sirupsen/logrus v1.8.1 - github.com/stretchr/testify v1.10.0 + github.com/sirupsen/logrus v1.8.3 + github.com/stretchr/testify v1.11.1 go4.org/netipx v0.0.0-20231129151722-fdeea329fbba golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - golang.org/x/net v0.46.0 - golang.org/x/oauth2 v0.33.0 - google.golang.org/api v0.256.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 - google.golang.org/grpc v1.76.0 - google.golang.org/protobuf v1.36.10 + golang.org/x/net v0.48.0 + golang.org/x/oauth2 v0.34.0 + google.golang.org/api v0.258.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 + google.golang.org/grpc v1.77.0 + google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v2 v2.4.0 ) @@ -56,13 +56,13 @@ require ( github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudflare/circl v1.6.1 // indirect - github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect - github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f // indirect + github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4 // indirect - github.com/go-jose/go-jose/v4 v4.1.2 // indirect + github.com/go-jose/go-jose/v4 v4.1.3 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/glog v1.2.5 // indirect @@ -95,29 +95,28 @@ require ( github.com/oklog/run v1.1.0 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect + github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.17.0 // indirect - github.com/zeebo/errs v1.4.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.37.0 // indirect - go.opentelemetry.io/otel/metric v1.37.0 // indirect - go.opentelemetry.io/otel/sdk v1.37.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect - go.opentelemetry.io/otel/trace v1.37.0 // indirect - golang.org/x/crypto v0.43.0 // indirect - golang.org/x/mod v0.28.0 // indirect - golang.org/x/sync v0.18.0 // indirect - golang.org/x/sys v0.37.0 // indirect - golang.org/x/text v0.30.0 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/metric v1.38.0 // indirect + go.opentelemetry.io/otel/sdk v1.38.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/mod v0.30.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/text v0.32.0 // indirect golang.org/x/time v0.14.0 // indirect - golang.org/x/tools v0.37.0 // indirect + golang.org/x/tools v0.39.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index a3f01a90357..2aee79af2fd 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= -github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= github.com/creachadair/staticfile v0.1.2/go.mod h1:a3qySzCIXEprDGxk6tSxSI+dBBdLzqeBOMhZ+o2d3pM= github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= @@ -62,10 +62,10 @@ github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FM github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= -github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= -github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= -github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329/go.mod h1:Alz8LEClvR7xKsrq3qzoc4N0guvVNSS8KmSChGYr9hs= +github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -86,8 +86,8 @@ github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UN github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60= github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k= -github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI= -github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -246,19 +246,20 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7 github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.3 h1:DBBfY8eMYazKEJHb3JKpSPfpgd2mBCoNFlQx6C5fftU= +github.com/sirupsen/logrus v1.8.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= -github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= -github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo= +github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -275,24 +276,22 @@ github.com/zclconf/go-cty v1.17.0 h1:seZvECve6XX4tmnvRzWtJNHdscMtYEx5R7bnnVyd/d0 github.com/zclconf/go-cty v1.17.0/go.mod h1:wqFzcImaLTI6A5HfsRwB0nj5n0MRZFwmey8YoFPPs3U= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= -github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= -github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= -go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= -go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= -go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= -go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= -go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= -go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= -go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= -go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= -go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= -go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -302,8 +301,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= -golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= @@ -313,8 +312,8 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= -golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= +golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -325,24 +324,23 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= -golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.33.0 h1:4Q+qn+E5z8gPRJfmRy7C2gGG3T4jIprK6aSYgTXGRpo= -golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -352,21 +350,22 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= -golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q= -golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss= +golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= -golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -378,16 +377,16 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= -golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/api v0.256.0 h1:u6Khm8+F9sxbCTYNoBHg6/Hwv0N/i+V94MvkOSor6oI= -google.golang.org/api v0.256.0/go.mod h1:KIgPhksXADEKJlnEoRa9qAII4rXcy40vfI8HRqcU964= +google.golang.org/api v0.258.0 h1:IKo1j5FBlN74fe5isA2PVozN3Y5pwNKriEgAXPOkDAc= +google.golang.org/api v0.258.0/go.mod h1:qhOMTQEZ6lUps63ZNq9jhODswwjkjYYguA7fA3TBFww= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= @@ -397,21 +396,21 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= -google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b h1:ULiyYQ0FdsJhwwZUwbaXpZF5yUE3h+RA+gxvBu37ucc= -google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:oDOGiMSXHL4sDTJvFvIB9nRQCGdLP1o/iVaqQK8zB+M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 h1:tRPGkdGHuewF4UisLzzHHr1spKw92qLM98nIzxbC0wY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 h1:mepRgnBZa07I4TRuomDE4sTIYieg/osKmzIf4USdWS4= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 h1:2I6GHUeJ/4shcDpoUlLs/2WPnhg7yJwvXtqcMJt9liA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= -google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM= +google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= -google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -421,6 +420,7 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/google/acctest/resource_test_utils.go b/google/acctest/resource_test_utils.go index cdaf439ab5d..0378c9c637d 100644 --- a/google/acctest/resource_test_utils.go +++ b/google/acctest/resource_test_utils.go @@ -127,6 +127,21 @@ func TestCheckAttributeValuesEqual(i *string, j *string) resource.TestCheckFunc } } +// ConditionTitleIfPresent returns empty string if condition is not preset and " {condition.0.title}" if it is. +func BuildIAMImportId(name, role, member, condition string) string { + ret := name + if role != "" { + ret += " " + role + } + if member != "" { + ret += " " + member + } + if condition != "" { + ret += " " + condition + } + return ret +} + // testStringValue returns string values from string pointers, handling nil pointers. func testStringValue(sPtr *string) string { if sPtr == nil { diff --git a/google/fwmodels/provider_model.go b/google/fwmodels/provider_model.go index cce41dda5e8..f2396f32eb7 100644 --- a/google/fwmodels/provider_model.go +++ b/google/fwmodels/provider_model.go @@ -64,6 +64,7 @@ type ProviderModel struct { BackupDRCustomEndpoint types.String `tfsdk:"backup_dr_custom_endpoint"` BeyondcorpCustomEndpoint types.String `tfsdk:"beyondcorp_custom_endpoint"` BiglakeCustomEndpoint types.String `tfsdk:"biglake_custom_endpoint"` + BiglakeIcebergCustomEndpoint types.String `tfsdk:"biglake_iceberg_custom_endpoint"` BigQueryCustomEndpoint types.String `tfsdk:"big_query_custom_endpoint"` BigqueryAnalyticsHubCustomEndpoint types.String `tfsdk:"bigquery_analytics_hub_custom_endpoint"` BigqueryConnectionCustomEndpoint types.String `tfsdk:"bigquery_connection_custom_endpoint"` diff --git a/google/fwprovider/framework_provider.go b/google/fwprovider/framework_provider.go index cf1d5c11cb7..8a0a805a1f3 100644 --- a/google/fwprovider/framework_provider.go +++ b/google/fwprovider/framework_provider.go @@ -249,6 +249,12 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest, transport_tpg.CustomEndpointValidator(), }, }, + "biglake_iceberg_custom_endpoint": &schema.StringAttribute{ + Optional: true, + Validators: []validator.String{ + transport_tpg.CustomEndpointValidator(), + }, + }, "big_query_custom_endpoint": &schema.StringAttribute{ Optional: true, Validators: []validator.String{ diff --git a/google/provider/provider.go b/google/provider/provider.go index af0f85f789b..caa779569eb 100644 --- a/google/provider/provider.go +++ b/google/provider/provider.go @@ -248,6 +248,11 @@ func Provider() *schema.Provider { Optional: true, ValidateFunc: transport_tpg.ValidateCustomEndpoint, }, + "biglake_iceberg_custom_endpoint": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: transport_tpg.ValidateCustomEndpoint, + }, "big_query_custom_endpoint": { Type: schema.TypeString, Optional: true, @@ -1157,6 +1162,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr config.BackupDRBasePath = d.Get("backup_dr_custom_endpoint").(string) config.BeyondcorpBasePath = d.Get("beyondcorp_custom_endpoint").(string) config.BiglakeBasePath = d.Get("biglake_custom_endpoint").(string) + config.BiglakeIcebergBasePath = d.Get("biglake_iceberg_custom_endpoint").(string) config.BigQueryBasePath = d.Get("big_query_custom_endpoint").(string) config.BigqueryAnalyticsHubBasePath = d.Get("bigquery_analytics_hub_custom_endpoint").(string) config.BigqueryConnectionBasePath = d.Get("bigquery_connection_custom_endpoint").(string) diff --git a/google/provider/provider_mmv1_resources.go b/google/provider/provider_mmv1_resources.go index cf5a2bd2ced..55c807aaabe 100644 --- a/google/provider/provider_mmv1_resources.go +++ b/google/provider/provider_mmv1_resources.go @@ -30,6 +30,7 @@ import ( "github.com/hashicorp/terraform-provider-google/google/services/backupdr" "github.com/hashicorp/terraform-provider-google/google/services/beyondcorp" "github.com/hashicorp/terraform-provider-google/google/services/biglake" + "github.com/hashicorp/terraform-provider-google/google/services/biglakeiceberg" "github.com/hashicorp/terraform-provider-google/google/services/bigquery" "github.com/hashicorp/terraform-provider-google/google/services/bigqueryanalyticshub" "github.com/hashicorp/terraform-provider-google/google/services/bigqueryconnection" @@ -204,6 +205,7 @@ var handwrittenDatasources = map[string]*schema.Resource{ "google_artifact_registry_tag": artifactregistry.DataSourceArtifactRegistryTag(), "google_artifact_registry_tags": artifactregistry.DataSourceArtifactRegistryTags(), "google_artifact_registry_version": artifactregistry.DataSourceArtifactRegistryVersion(), + "google_artifact_registry_versions": artifactregistry.DataSourceArtifactRegistryVersions(), "google_apphub_discovered_workload": apphub.DataSourceApphubDiscoveredWorkload(), "google_app_engine_default_service_account": appengine.DataSourceGoogleAppEngineDefaultServiceAccount(), "google_apphub_application": apphub.DataSourceGoogleApphubApplication(), @@ -238,6 +240,7 @@ var handwrittenDatasources = map[string]*schema.Resource{ "google_cloud_identity_group_memberships": cloudidentity.DataSourceGoogleCloudIdentityGroupMemberships(), "google_cloud_identity_group_transitive_memberships": cloudidentity.DataSourceGoogleCloudIdentityGroupTransitiveMemberships(), "google_cloud_identity_group_lookup": cloudidentity.DataSourceGoogleCloudIdentityGroupLookup(), + "google_cloud_identity_policies": cloudidentity.DataSourceGoogleCloudIdentityPolicies(), "google_cloud_identity_policy": cloudidentity.DataSourceGoogleCloudIdentityPolicy(), "google_cloud_quotas_quota_info": cloudquotas.DataSourceGoogleCloudQuotasQuotaInfo(), "google_cloud_quotas_quota_infos": cloudquotas.DataSourceGoogleCloudQuotasQuotaInfos(), @@ -286,6 +289,7 @@ var handwrittenDatasources = map[string]*schema.Resource{ "google_compute_region_instance_group_manager": compute.DataSourceGoogleComputeRegionInstanceGroupManager(), "google_compute_region_instance_template": compute.DataSourceGoogleComputeRegionInstanceTemplate(), "google_compute_region_network_endpoint_group": compute.DataSourceGoogleComputeRegionNetworkEndpointGroup(), + "google_compute_region_security_policy": compute.DataSourceGoogleComputeRegionSecurityPolicy(), "google_compute_region_ssl_certificate": compute.DataSourceGoogleRegionComputeSslCertificate(), "google_compute_region_ssl_policy": compute.DataSourceGoogleRegionComputeSslPolicy(), "google_compute_reservation": compute.DataSourceGoogleComputeReservation(), @@ -299,6 +303,7 @@ var handwrittenDatasources = map[string]*schema.Resource{ "google_compute_snapshot": compute.DataSourceGoogleComputeSnapshot(), "google_compute_ssl_certificate": compute.DataSourceGoogleComputeSslCertificate(), "google_compute_ssl_policy": compute.DataSourceGoogleComputeSslPolicy(), + "google_compute_storage_pool": compute.DataSourceGoogleComputeStoragePool(), "google_compute_storage_pool_types": compute.DataSourceGoogleComputeStoragePoolTypes(), "google_compute_subnetwork": compute.DataSourceGoogleComputeSubnetwork(), "google_compute_subnetworks": compute.DataSourceGoogleComputeSubnetworks(), @@ -461,6 +466,7 @@ var generatedIAMDatasources = map[string]*schema.Resource{ "google_artifact_registry_repository_iam_policy": tpgiamresource.DataSourceIamPolicy(artifactregistry.ArtifactRegistryRepositoryIamSchema, artifactregistry.ArtifactRegistryRepositoryIamUpdaterProducer), "google_beyondcorp_security_gateway_iam_policy": tpgiamresource.DataSourceIamPolicy(beyondcorp.BeyondcorpSecurityGatewayIamSchema, beyondcorp.BeyondcorpSecurityGatewayIamUpdaterProducer), "google_beyondcorp_security_gateway_application_iam_policy": tpgiamresource.DataSourceIamPolicy(beyondcorp.BeyondcorpSecurityGatewayApplicationIamSchema, beyondcorp.BeyondcorpSecurityGatewayApplicationIamUpdaterProducer), + "google_biglake_iceberg_catalog_iam_policy": tpgiamresource.DataSourceIamPolicy(biglakeiceberg.BiglakeIcebergIcebergCatalogIamSchema, biglakeiceberg.BiglakeIcebergIcebergCatalogIamUpdaterProducer), "google_bigquery_table_iam_policy": tpgiamresource.DataSourceIamPolicy(bigquery.BigQueryTableIamSchema, bigquery.BigQueryTableIamUpdaterProducer), "google_bigquery_analytics_hub_data_exchange_iam_policy": tpgiamresource.DataSourceIamPolicy(bigqueryanalyticshub.BigqueryAnalyticsHubDataExchangeIamSchema, bigqueryanalyticshub.BigqueryAnalyticsHubDataExchangeIamUpdaterProducer), "google_bigquery_analytics_hub_listing_iam_policy": tpgiamresource.DataSourceIamPolicy(bigqueryanalyticshub.BigqueryAnalyticsHubListingIamSchema, bigqueryanalyticshub.BigqueryAnalyticsHubListingIamUpdaterProducer), @@ -520,15 +526,15 @@ var generatedIAMDatasources = map[string]*schema.Resource{ "google_iam_workforce_pool_iam_policy": tpgiamresource.DataSourceIamPolicy(iamworkforcepool.IAMWorkforcePoolWorkforcePoolIamSchema, iamworkforcepool.IAMWorkforcePoolWorkforcePoolIamUpdaterProducer), "google_iap_app_engine_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapAppEngineServiceIamSchema, iap.IapAppEngineServiceIamUpdaterProducer), "google_iap_app_engine_version_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapAppEngineVersionIamSchema, iap.IapAppEngineVersionIamUpdaterProducer), - "google_iap_web_cloud_run_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer), - "google_iap_web_region_forwarding_rule_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer), - "google_iap_web_forwarding_rule_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer), "google_iap_tunnel_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapTunnelIamSchema, iap.IapTunnelIamUpdaterProducer), "google_iap_tunnel_dest_group_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapTunnelDestGroupIamSchema, iap.IapTunnelDestGroupIamUpdaterProducer), "google_iap_tunnel_instance_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapTunnelInstanceIamSchema, iap.IapTunnelInstanceIamUpdaterProducer), "google_iap_web_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebIamSchema, iap.IapWebIamUpdaterProducer), "google_iap_web_backend_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebBackendServiceIamSchema, iap.IapWebBackendServiceIamUpdaterProducer), + "google_iap_web_cloud_run_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer), + "google_iap_web_forwarding_rule_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer), "google_iap_web_region_backend_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebRegionBackendServiceIamSchema, iap.IapWebRegionBackendServiceIamUpdaterProducer), + "google_iap_web_region_forwarding_rule_service_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer), "google_iap_web_type_app_engine_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebTypeAppEngineIamSchema, iap.IapWebTypeAppEngineIamUpdaterProducer), "google_iap_web_type_compute_iam_policy": tpgiamresource.DataSourceIamPolicy(iap.IapWebTypeComputeIamSchema, iap.IapWebTypeComputeIamUpdaterProducer), "google_kms_ekm_connection_iam_policy": tpgiamresource.DataSourceIamPolicy(kms.KMSEkmConnectionIamSchema, kms.KMSEkmConnectionIamUpdaterProducer), @@ -584,9 +590,9 @@ var handwrittenIAMDatasources = map[string]*schema.Resource{ } // Resources -// Generated resources: 696 -// Generated IAM resources: 324 -// Total generated resources: 1020 +// Generated resources: 707 +// Generated IAM resources: 327 +// Total generated resources: 1034 var generatedResources = map[string]*schema.Resource{ "google_folder_access_approval_settings": accessapproval.ResourceAccessApprovalFolderSettings(), "google_organization_access_approval_settings": accessapproval.ResourceAccessApprovalOrganizationSettings(), @@ -643,6 +649,7 @@ var generatedResources = map[string]*schema.Resource{ "google_apigee_nat_address": apigee.ResourceApigeeNatAddress(), "google_apigee_organization": apigee.ResourceApigeeOrganization(), "google_apigee_security_action": apigee.ResourceApigeeSecurityAction(), + "google_apigee_security_feedback": apigee.ResourceApigeeSecurityFeedback(), "google_apigee_security_monitoring_condition": apigee.ResourceApigeeSecurityMonitoringCondition(), "google_apigee_security_profile_v2": apigee.ResourceApigeeSecurityProfileV2(), "google_apigee_sync_authorization": apigee.ResourceApigeeSyncAuthorization(), @@ -660,6 +667,7 @@ var generatedResources = map[string]*schema.Resource{ "google_app_engine_service_split_traffic": appengine.ResourceAppEngineServiceSplitTraffic(), "google_app_engine_standard_app_version": appengine.ResourceAppEngineStandardAppVersion(), "google_apphub_application": apphub.ResourceApphubApplication(), + "google_apphub_boundary": apphub.ResourceApphubBoundary(), "google_apphub_service": apphub.ResourceApphubService(), "google_apphub_service_project_attachment": apphub.ResourceApphubServiceProjectAttachment(), "google_apphub_workload": apphub.ResourceApphubWorkload(), @@ -686,6 +694,10 @@ var generatedResources = map[string]*schema.Resource{ "google_biglake_catalog": biglake.ResourceBiglakeCatalog(), "google_biglake_database": biglake.ResourceBiglakeDatabase(), "google_biglake_table": biglake.ResourceBiglakeTable(), + "google_biglake_iceberg_catalog": biglakeiceberg.ResourceBiglakeIcebergIcebergCatalog(), + "google_biglake_iceberg_catalog_iam_binding": tpgiamresource.ResourceIamBinding(biglakeiceberg.BiglakeIcebergIcebergCatalogIamSchema, biglakeiceberg.BiglakeIcebergIcebergCatalogIamUpdaterProducer, biglakeiceberg.BiglakeIcebergIcebergCatalogIdParseFunc), + "google_biglake_iceberg_catalog_iam_member": tpgiamresource.ResourceIamMember(biglakeiceberg.BiglakeIcebergIcebergCatalogIamSchema, biglakeiceberg.BiglakeIcebergIcebergCatalogIamUpdaterProducer, biglakeiceberg.BiglakeIcebergIcebergCatalogIdParseFunc), + "google_biglake_iceberg_catalog_iam_policy": tpgiamresource.ResourceIamPolicy(biglakeiceberg.BiglakeIcebergIcebergCatalogIamSchema, biglakeiceberg.BiglakeIcebergIcebergCatalogIamUpdaterProducer, biglakeiceberg.BiglakeIcebergIcebergCatalogIdParseFunc), "google_bigquery_dataset": bigquery.ResourceBigQueryDataset(), "google_bigquery_dataset_access": bigquery.ResourceBigQueryDatasetAccess(), "google_bigquery_job": bigquery.ResourceBigQueryJob(), @@ -825,6 +837,7 @@ var generatedResources = map[string]*schema.Resource{ "google_compute_backend_bucket_signed_url_key": compute.ResourceComputeBackendBucketSignedUrlKey(), "google_compute_backend_service": compute.ResourceComputeBackendService(), "google_compute_backend_service_signed_url_key": compute.ResourceComputeBackendServiceSignedUrlKey(), + "google_compute_cross_site_network": compute.ResourceComputeCrossSiteNetwork(), "google_compute_disk": compute.ResourceComputeDisk(), "google_compute_disk_iam_binding": tpgiamresource.ResourceIamBinding(compute.ComputeDiskIamSchema, compute.ComputeDiskIamUpdaterProducer, compute.ComputeDiskIdParseFunc), "google_compute_disk_iam_member": tpgiamresource.ResourceIamMember(compute.ComputeDiskIamSchema, compute.ComputeDiskIamUpdaterProducer, compute.ComputeDiskIdParseFunc), @@ -880,6 +893,7 @@ var generatedResources = map[string]*schema.Resource{ "google_compute_node_group": compute.ResourceComputeNodeGroup(), "google_compute_node_template": compute.ResourceComputeNodeTemplate(), "google_compute_organization_security_policy": compute.ResourceComputeOrganizationSecurityPolicy(), + "google_compute_organization_security_policy_association": compute.ResourceComputeOrganizationSecurityPolicyAssociation(), "google_compute_packet_mirroring": compute.ResourceComputePacketMirroring(), "google_compute_per_instance_config": compute.ResourceComputePerInstanceConfig(), "google_compute_preview_feature": compute.ResourceComputePreviewFeature(), @@ -945,6 +959,7 @@ var generatedResources = map[string]*schema.Resource{ "google_compute_url_map": compute.ResourceComputeUrlMap(), "google_compute_vpn_gateway": compute.ResourceComputeVpnGateway(), "google_compute_vpn_tunnel": compute.ResourceComputeVpnTunnel(), + "google_compute_wire_group": compute.ResourceComputeWireGroup(), "google_contact_center_insights_analysis_rule": contactcenterinsights.ResourceContactCenterInsightsAnalysisRule(), "google_contact_center_insights_view": contactcenterinsights.ResourceContactCenterInsightsView(), "google_container_analysis_note": containeranalysis.ResourceContainerAnalysisNote(), @@ -1221,15 +1236,6 @@ var generatedResources = map[string]*schema.Resource{ "google_iap_app_engine_version_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapAppEngineVersionIamSchema, iap.IapAppEngineVersionIamUpdaterProducer, iap.IapAppEngineVersionIdParseFunc), "google_iap_brand": iap.ResourceIapBrand(), "google_iap_client": iap.ResourceIapClient(), - "google_iap_web_cloud_run_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer, iap.IapWebCloudRunServiceIdParseFunc), - "google_iap_web_cloud_run_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer, iap.IapWebCloudRunServiceIdParseFunc), - "google_iap_web_cloud_run_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer, iap.IapWebCloudRunServiceIdParseFunc), - "google_iap_web_region_forwarding_rule_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer, iap.IapWebRegionForwardingRuleServiceIdParseFunc), - "google_iap_web_region_forwarding_rule_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer, iap.IapWebRegionForwardingRuleServiceIdParseFunc), - "google_iap_web_region_forwarding_rule_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer, iap.IapWebRegionForwardingRuleServiceIdParseFunc), - "google_iap_web_forwarding_rule_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer, iap.IapWebForwardingRuleServiceIdParseFunc), - "google_iap_web_forwarding_rule_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer, iap.IapWebForwardingRuleServiceIdParseFunc), - "google_iap_web_forwarding_rule_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer, iap.IapWebForwardingRuleServiceIdParseFunc), "google_iap_settings": iap.ResourceIapSettings(), "google_iap_tunnel_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapTunnelIamSchema, iap.IapTunnelIamUpdaterProducer, iap.IapTunnelIdParseFunc), "google_iap_tunnel_iam_member": tpgiamresource.ResourceIamMember(iap.IapTunnelIamSchema, iap.IapTunnelIamUpdaterProducer, iap.IapTunnelIdParseFunc), @@ -1247,9 +1253,18 @@ var generatedResources = map[string]*schema.Resource{ "google_iap_web_backend_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebBackendServiceIamSchema, iap.IapWebBackendServiceIamUpdaterProducer, iap.IapWebBackendServiceIdParseFunc), "google_iap_web_backend_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebBackendServiceIamSchema, iap.IapWebBackendServiceIamUpdaterProducer, iap.IapWebBackendServiceIdParseFunc), "google_iap_web_backend_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebBackendServiceIamSchema, iap.IapWebBackendServiceIamUpdaterProducer, iap.IapWebBackendServiceIdParseFunc), + "google_iap_web_cloud_run_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer, iap.IapWebCloudRunServiceIdParseFunc), + "google_iap_web_cloud_run_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer, iap.IapWebCloudRunServiceIdParseFunc), + "google_iap_web_cloud_run_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebCloudRunServiceIamSchema, iap.IapWebCloudRunServiceIamUpdaterProducer, iap.IapWebCloudRunServiceIdParseFunc), + "google_iap_web_forwarding_rule_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer, iap.IapWebForwardingRuleServiceIdParseFunc), + "google_iap_web_forwarding_rule_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer, iap.IapWebForwardingRuleServiceIdParseFunc), + "google_iap_web_forwarding_rule_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebForwardingRuleServiceIamSchema, iap.IapWebForwardingRuleServiceIamUpdaterProducer, iap.IapWebForwardingRuleServiceIdParseFunc), "google_iap_web_region_backend_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebRegionBackendServiceIamSchema, iap.IapWebRegionBackendServiceIamUpdaterProducer, iap.IapWebRegionBackendServiceIdParseFunc), "google_iap_web_region_backend_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebRegionBackendServiceIamSchema, iap.IapWebRegionBackendServiceIamUpdaterProducer, iap.IapWebRegionBackendServiceIdParseFunc), "google_iap_web_region_backend_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebRegionBackendServiceIamSchema, iap.IapWebRegionBackendServiceIamUpdaterProducer, iap.IapWebRegionBackendServiceIdParseFunc), + "google_iap_web_region_forwarding_rule_service_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer, iap.IapWebRegionForwardingRuleServiceIdParseFunc), + "google_iap_web_region_forwarding_rule_service_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer, iap.IapWebRegionForwardingRuleServiceIdParseFunc), + "google_iap_web_region_forwarding_rule_service_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebRegionForwardingRuleServiceIamSchema, iap.IapWebRegionForwardingRuleServiceIamUpdaterProducer, iap.IapWebRegionForwardingRuleServiceIdParseFunc), "google_iap_web_type_app_engine_iam_binding": tpgiamresource.ResourceIamBinding(iap.IapWebTypeAppEngineIamSchema, iap.IapWebTypeAppEngineIamUpdaterProducer, iap.IapWebTypeAppEngineIdParseFunc), "google_iap_web_type_app_engine_iam_member": tpgiamresource.ResourceIamMember(iap.IapWebTypeAppEngineIamSchema, iap.IapWebTypeAppEngineIamUpdaterProducer, iap.IapWebTypeAppEngineIdParseFunc), "google_iap_web_type_app_engine_iam_policy": tpgiamresource.ResourceIamPolicy(iap.IapWebTypeAppEngineIamSchema, iap.IapWebTypeAppEngineIamUpdaterProducer, iap.IapWebTypeAppEngineIdParseFunc), @@ -1324,8 +1339,10 @@ var generatedResources = map[string]*schema.Resource{ "google_netapp_volume_replication": netapp.ResourceNetappVolumeReplication(), "google_netapp_volume_snapshot": netapp.ResourceNetappVolumeSnapshot(), "google_netapp_kmsconfig": netapp.ResourceNetappkmsconfig(), + "google_network_connectivity_destination": networkconnectivity.ResourceNetworkConnectivityDestination(), "google_network_connectivity_group": networkconnectivity.ResourceNetworkConnectivityGroup(), "google_network_connectivity_hub": networkconnectivity.ResourceNetworkConnectivityHub(), + "google_network_connectivity_multicloud_data_transfer_config": networkconnectivity.ResourceNetworkConnectivityMulticloudDataTransferConfig(), "google_network_connectivity_policy_based_route": networkconnectivity.ResourceNetworkConnectivityPolicyBasedRoute(), "google_network_connectivity_regional_endpoint": networkconnectivity.ResourceNetworkConnectivityRegionalEndpoint(), "google_network_connectivity_spoke": networkconnectivity.ResourceNetworkConnectivitySpoke(), @@ -1338,6 +1355,7 @@ var generatedResources = map[string]*schema.Resource{ "google_network_security_authz_policy": networksecurity.ResourceNetworkSecurityAuthzPolicy(), "google_network_security_backend_authentication_config": networksecurity.ResourceNetworkSecurityBackendAuthenticationConfig(), "google_network_security_client_tls_policy": networksecurity.ResourceNetworkSecurityClientTlsPolicy(), + "google_network_security_dns_threat_detector": networksecurity.ResourceNetworkSecurityDnsThreatDetector(), "google_network_security_firewall_endpoint": networksecurity.ResourceNetworkSecurityFirewallEndpoint(), "google_network_security_firewall_endpoint_association": networksecurity.ResourceNetworkSecurityFirewallEndpointAssociation(), "google_network_security_gateway_security_policy": networksecurity.ResourceNetworkSecurityGatewaySecurityPolicy(), @@ -1374,6 +1392,8 @@ var generatedResources = map[string]*schema.Resource{ "google_network_services_multicast_domain": networkservices.ResourceNetworkServicesMulticastDomain(), "google_network_services_multicast_domain_activation": networkservices.ResourceNetworkServicesMulticastDomainActivation(), "google_network_services_multicast_domain_group": networkservices.ResourceNetworkServicesMulticastDomainGroup(), + "google_network_services_multicast_group_consumer_activation": networkservices.ResourceNetworkServicesMulticastGroupConsumerActivation(), + "google_network_services_multicast_group_producer_activation": networkservices.ResourceNetworkServicesMulticastGroupProducerActivation(), "google_network_services_multicast_group_range": networkservices.ResourceNetworkServicesMulticastGroupRange(), "google_network_services_multicast_group_range_activation": networkservices.ResourceNetworkServicesMulticastGroupRangeActivation(), "google_network_services_multicast_producer_association": networkservices.ResourceNetworkServicesMulticastProducerAssociation(), @@ -1756,6 +1776,7 @@ func UseGeneratedProducts() { var _ = backupdr.ProductName var _ = beyondcorp.ProductName var _ = biglake.ProductName + var _ = biglakeiceberg.ProductName var _ = bigquery.ProductName var _ = bigqueryanalyticshub.ProductName var _ = bigqueryconnection.ProductName diff --git a/google/services/accessapproval/resource_folder_access_approval_settings_generated_meta.yaml b/google/services/accessapproval/resource_folder_access_approval_settings_generated_meta.yaml index b55b476243e..f9c0e1577b5 100644 --- a/google/services/accessapproval/resource_folder_access_approval_settings_generated_meta.yaml +++ b/google/services/accessapproval/resource_folder_access_approval_settings_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_folder_access_approval_settings' -generation_type: 'mmv1' -source_file: 'products/accessapproval/FolderSettings.yaml' -api_service_name: 'accessapproval.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccessApprovalSettings' +resource: google_folder_access_approval_settings +generation_type: mmv1 +source_file: products/accessapproval/FolderSettings.yaml +api_service_name: accessapproval.googleapis.com +api_version: v1 +api_resource_type_kind: AccessApprovalSettings api_variant_patterns: - - 'folders/{folder}/accessApprovalSettings' + - folders/{folder}/accessApprovalSettings fields: - - api_field: 'activeKeyVersion' - - api_field: 'ancestorHasActiveKeyVersion' - - api_field: 'enrolledAncestor' - - api_field: 'enrolledServices.cloudProduct' - - api_field: 'enrolledServices.enrollmentLevel' - - field: 'folder_id' - provider_only: true - - api_field: 'invalidKeyVersion' - - api_field: 'name' - - api_field: 'notificationEmails' + - api_field: activeKeyVersion + - api_field: ancestorHasActiveKeyVersion + - api_field: enrolledAncestor + - api_field: enrolledServices.cloudProduct + - api_field: enrolledServices.enrollmentLevel + - field: folder_id + provider_only: true + - api_field: invalidKeyVersion + - api_field: name + - api_field: notificationEmails diff --git a/google/services/accessapproval/resource_organization_access_approval_settings_generated_meta.yaml b/google/services/accessapproval/resource_organization_access_approval_settings_generated_meta.yaml index c5204802ca7..f40312cc9aa 100644 --- a/google/services/accessapproval/resource_organization_access_approval_settings_generated_meta.yaml +++ b/google/services/accessapproval/resource_organization_access_approval_settings_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_organization_access_approval_settings' -generation_type: 'mmv1' -source_file: 'products/accessapproval/OrganizationSettings.yaml' -api_service_name: 'accessapproval.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccessApprovalSettings' +resource: google_organization_access_approval_settings +generation_type: mmv1 +source_file: products/accessapproval/OrganizationSettings.yaml +api_service_name: accessapproval.googleapis.com +api_version: v1 +api_resource_type_kind: AccessApprovalSettings api_variant_patterns: - - 'organizations/{organization}/accessApprovalSettings' + - organizations/{organization}/accessApprovalSettings fields: - - api_field: 'activeKeyVersion' - - api_field: 'ancestorHasActiveKeyVersion' - - api_field: 'enrolledAncestor' - - api_field: 'enrolledServices.cloudProduct' - - api_field: 'enrolledServices.enrollmentLevel' - - api_field: 'invalidKeyVersion' - - api_field: 'name' - - api_field: 'notificationEmails' - - field: 'organization_id' - provider_only: true + - api_field: activeKeyVersion + - api_field: ancestorHasActiveKeyVersion + - api_field: enrolledAncestor + - api_field: enrolledServices.cloudProduct + - api_field: enrolledServices.enrollmentLevel + - api_field: invalidKeyVersion + - api_field: name + - api_field: notificationEmails + - field: organization_id + provider_only: true diff --git a/google/services/accessapproval/resource_project_access_approval_settings_generated_meta.yaml b/google/services/accessapproval/resource_project_access_approval_settings_generated_meta.yaml index d1aa8e7b506..b2dcfce1145 100644 --- a/google/services/accessapproval/resource_project_access_approval_settings_generated_meta.yaml +++ b/google/services/accessapproval/resource_project_access_approval_settings_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_project_access_approval_settings' -generation_type: 'mmv1' -source_file: 'products/accessapproval/ProjectSettings.yaml' -api_service_name: 'accessapproval.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccessApprovalSettings' +resource: google_project_access_approval_settings +generation_type: mmv1 +source_file: products/accessapproval/ProjectSettings.yaml +api_service_name: accessapproval.googleapis.com +api_version: v1 +api_resource_type_kind: AccessApprovalSettings api_variant_patterns: - - 'projects/{project}/accessApprovalSettings' + - projects/{project}/accessApprovalSettings fields: - - api_field: 'activeKeyVersion' - - api_field: 'ancestorHasActiveKeyVersion' - - api_field: 'enrolledAncestor' - - api_field: 'enrolledServices.cloudProduct' - - api_field: 'enrolledServices.enrollmentLevel' - - api_field: 'invalidKeyVersion' - - api_field: 'name' - - api_field: 'notificationEmails' - - api_field: 'project' - - field: 'project_id' - provider_only: true + - api_field: activeKeyVersion + - api_field: ancestorHasActiveKeyVersion + - api_field: enrolledAncestor + - api_field: enrolledServices.cloudProduct + - api_field: enrolledServices.enrollmentLevel + - api_field: invalidKeyVersion + - api_field: name + - api_field: notificationEmails + - api_field: project + - field: project_id + provider_only: true diff --git a/google/services/accesscontextmanager/resource_access_context_manager_access_level_condition_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_access_level_condition_generated_meta.yaml index be8c5acbcec..249e6f7d832 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_access_level_condition_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_access_level_condition_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_access_context_manager_access_level_condition' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/AccessLevelCondition.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccessLevel' +resource: google_access_context_manager_access_level_condition +generation_type: mmv1 +source_file: products/accesscontextmanager/AccessLevelCondition.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: AccessLevel fields: - - field: 'access_level' - provider_only: true - - api_field: 'accessPolicyId' - - api_field: 'devicePolicy.allowedDeviceManagementLevels' - - api_field: 'devicePolicy.allowedEncryptionStatuses' - - api_field: 'devicePolicy.osConstraints.minimumVersion' - - api_field: 'devicePolicy.osConstraints.osType' - - api_field: 'devicePolicy.requireAdminApproval' - - api_field: 'devicePolicy.requireCorpOwned' - - api_field: 'devicePolicy.requireScreenlock' - field: 'device_policy.require_screen_lock' - - api_field: 'ipSubnetworks' - - api_field: 'members' - - api_field: 'negate' - - api_field: 'regions' - - api_field: 'requiredAccessLevels' - - api_field: 'vpcNetworkSources.vpcSubnetwork.network' - - api_field: 'vpcNetworkSources.vpcSubnetwork.vpcIpSubnetworks' + - field: access_level + provider_only: true + - api_field: accessPolicyId + - api_field: devicePolicy.allowedDeviceManagementLevels + - api_field: devicePolicy.allowedEncryptionStatuses + - api_field: devicePolicy.osConstraints.minimumVersion + - api_field: devicePolicy.osConstraints.osType + - api_field: devicePolicy.requireAdminApproval + - api_field: devicePolicy.requireCorpOwned + - api_field: devicePolicy.requireScreenlock + field: device_policy.require_screen_lock + - api_field: ipSubnetworks + - api_field: members + - api_field: negate + - api_field: regions + - api_field: requiredAccessLevels + - api_field: vpcNetworkSources.vpcSubnetwork.network + - api_field: vpcNetworkSources.vpcSubnetwork.vpcIpSubnetworks diff --git a/google/services/accesscontextmanager/resource_access_context_manager_access_level_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_access_level_generated_meta.yaml index 4ca733e2c89..767e3c90d59 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_access_level_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_access_level_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_access_context_manager_access_level' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/AccessLevel.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccessLevel' +resource: google_access_context_manager_access_level +generation_type: mmv1 +source_file: products/accesscontextmanager/AccessLevel.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: AccessLevel fields: - - api_field: 'basic.combiningFunction' - - api_field: 'basic.conditions.devicePolicy.allowedDeviceManagementLevels' - - api_field: 'basic.conditions.devicePolicy.allowedEncryptionStatuses' - - api_field: 'basic.conditions.devicePolicy.osConstraints.minimumVersion' - - api_field: 'basic.conditions.devicePolicy.osConstraints.osType' - - api_field: 'basic.conditions.devicePolicy.osConstraints.requireVerifiedChromeOs' - - api_field: 'basic.conditions.devicePolicy.requireAdminApproval' - - api_field: 'basic.conditions.devicePolicy.requireCorpOwned' - - api_field: 'basic.conditions.devicePolicy.requireScreenlock' - field: 'basic.conditions.device_policy.require_screen_lock' - - api_field: 'basic.conditions.ipSubnetworks' - - api_field: 'basic.conditions.members' - - api_field: 'basic.conditions.negate' - - api_field: 'basic.conditions.regions' - - api_field: 'basic.conditions.requiredAccessLevels' - - api_field: 'basic.conditions.vpcNetworkSources.vpcSubnetwork.network' - - api_field: 'basic.conditions.vpcNetworkSources.vpcSubnetwork.vpcIpSubnetworks' - - api_field: 'custom.expr.description' - - api_field: 'custom.expr.expression' - - api_field: 'custom.expr.location' - - api_field: 'custom.expr.title' - - api_field: 'description' - - api_field: 'name' - - api_field: 'parent' - - api_field: 'title' + - api_field: basic.combiningFunction + - api_field: basic.conditions.devicePolicy.allowedDeviceManagementLevels + - api_field: basic.conditions.devicePolicy.allowedEncryptionStatuses + - api_field: basic.conditions.devicePolicy.osConstraints.minimumVersion + - api_field: basic.conditions.devicePolicy.osConstraints.osType + - api_field: basic.conditions.devicePolicy.osConstraints.requireVerifiedChromeOs + - api_field: basic.conditions.devicePolicy.requireAdminApproval + - api_field: basic.conditions.devicePolicy.requireCorpOwned + - api_field: basic.conditions.devicePolicy.requireScreenlock + field: basic.conditions.device_policy.require_screen_lock + - api_field: basic.conditions.ipSubnetworks + - api_field: basic.conditions.members + - api_field: basic.conditions.negate + - api_field: basic.conditions.regions + - api_field: basic.conditions.requiredAccessLevels + - api_field: basic.conditions.vpcNetworkSources.vpcSubnetwork.network + - api_field: basic.conditions.vpcNetworkSources.vpcSubnetwork.vpcIpSubnetworks + - api_field: custom.expr.description + - api_field: custom.expr.expression + - api_field: custom.expr.location + - api_field: custom.expr.title + - api_field: description + - api_field: name + - api_field: parent + - api_field: title diff --git a/google/services/accesscontextmanager/resource_access_context_manager_access_levels_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_access_levels_generated_meta.yaml index 97078062cc6..10c63acd7d7 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_access_levels_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_access_levels_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_access_context_manager_access_levels' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/AccessLevels.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccessLevel' +resource: google_access_context_manager_access_levels +generation_type: mmv1 +source_file: products/accesscontextmanager/AccessLevels.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: AccessLevel fields: - - api_field: 'accessLevels.basic.combiningFunction' - - api_field: 'accessLevels.basic.conditions.devicePolicy.allowedDeviceManagementLevels' - - api_field: 'accessLevels.basic.conditions.devicePolicy.allowedEncryptionStatuses' - - api_field: 'accessLevels.basic.conditions.devicePolicy.osConstraints.minimumVersion' - - api_field: 'accessLevels.basic.conditions.devicePolicy.osConstraints.osType' - - api_field: 'accessLevels.basic.conditions.devicePolicy.requireAdminApproval' - - api_field: 'accessLevels.basic.conditions.devicePolicy.requireCorpOwned' - - api_field: 'accessLevels.basic.conditions.devicePolicy.requireScreenlock' - field: 'access_levels.basic.conditions.device_policy.require_screen_lock' - - api_field: 'accessLevels.basic.conditions.ipSubnetworks' - - api_field: 'accessLevels.basic.conditions.members' - - api_field: 'accessLevels.basic.conditions.negate' - - api_field: 'accessLevels.basic.conditions.regions' - - api_field: 'accessLevels.basic.conditions.requiredAccessLevels' - - api_field: 'accessLevels.basic.conditions.vpcNetworkSources.vpcSubnetwork.network' - - api_field: 'accessLevels.basic.conditions.vpcNetworkSources.vpcSubnetwork.vpcIpSubnetworks' - - api_field: 'accessLevels.custom.expr.description' - - api_field: 'accessLevels.custom.expr.expression' - - api_field: 'accessLevels.custom.expr.location' - - api_field: 'accessLevels.custom.expr.title' - - api_field: 'accessLevels.description' - - api_field: 'accessLevels.name' - - api_field: 'accessLevels.title' - - field: 'parent' - provider_only: true + - api_field: accessLevels.basic.combiningFunction + - api_field: accessLevels.basic.conditions.devicePolicy.allowedDeviceManagementLevels + - api_field: accessLevels.basic.conditions.devicePolicy.allowedEncryptionStatuses + - api_field: accessLevels.basic.conditions.devicePolicy.osConstraints.minimumVersion + - api_field: accessLevels.basic.conditions.devicePolicy.osConstraints.osType + - api_field: accessLevels.basic.conditions.devicePolicy.requireAdminApproval + - api_field: accessLevels.basic.conditions.devicePolicy.requireCorpOwned + - api_field: accessLevels.basic.conditions.devicePolicy.requireScreenlock + field: access_levels.basic.conditions.device_policy.require_screen_lock + - api_field: accessLevels.basic.conditions.ipSubnetworks + - api_field: accessLevels.basic.conditions.members + - api_field: accessLevels.basic.conditions.negate + - api_field: accessLevels.basic.conditions.regions + - api_field: accessLevels.basic.conditions.requiredAccessLevels + - api_field: accessLevels.basic.conditions.vpcNetworkSources.vpcSubnetwork.network + - api_field: accessLevels.basic.conditions.vpcNetworkSources.vpcSubnetwork.vpcIpSubnetworks + - api_field: accessLevels.custom.expr.description + - api_field: accessLevels.custom.expr.expression + - api_field: accessLevels.custom.expr.location + - api_field: accessLevels.custom.expr.title + - api_field: accessLevels.description + - api_field: accessLevels.name + - api_field: accessLevels.title + - field: parent + provider_only: true diff --git a/google/services/accesscontextmanager/resource_access_context_manager_access_policy_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_access_policy_generated_meta.yaml index 6cc02c4827d..ba6af04e0e7 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_access_policy_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_access_policy_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_access_context_manager_access_policy' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/AccessPolicy.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccessPolicy' -cai_asset_name_format: '//accesscontextmanager.googleapis.com/accessPolicies/{{name}}' +resource: google_access_context_manager_access_policy +generation_type: mmv1 +source_file: products/accesscontextmanager/AccessPolicy.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: AccessPolicy +cai_asset_name_format: //accesscontextmanager.googleapis.com/accessPolicies/{{name}} fields: - - api_field: 'createTime' - - api_field: 'name' - - api_field: 'parent' - - api_field: 'scopes' - - api_field: 'title' - - api_field: 'updateTime' + - api_field: createTime + - api_field: name + - api_field: parent + - api_field: scopes + - api_field: title + - api_field: updateTime diff --git a/google/services/accesscontextmanager/resource_access_context_manager_authorized_orgs_desc_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_authorized_orgs_desc_generated_meta.yaml index dc04f26e5cf..d4d1b9b26da 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_authorized_orgs_desc_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_authorized_orgs_desc_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_access_context_manager_authorized_orgs_desc' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/AuthorizedOrgsDesc.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AuthorizedOrgsDesc' +resource: google_access_context_manager_authorized_orgs_desc +generation_type: mmv1 +source_file: products/accesscontextmanager/AuthorizedOrgsDesc.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: AuthorizedOrgsDesc fields: - - api_field: 'assetType' - - api_field: 'authorizationDirection' - - api_field: 'authorizationType' - - api_field: 'createTime' - - api_field: 'name' - - api_field: 'orgs' - - api_field: 'parent' - - api_field: 'updateTime' + - api_field: assetType + - api_field: authorizationDirection + - api_field: authorizationType + - api_field: createTime + - api_field: name + - api_field: orgs + - api_field: parent + - api_field: updateTime diff --git a/google/services/accesscontextmanager/resource_access_context_manager_egress_policy_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_egress_policy_generated_meta.yaml index 42a09d46ec4..f0f4058c339 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_egress_policy_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_egress_policy_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_access_context_manager_egress_policy' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/EgressPolicy.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_egress_policy +generation_type: mmv1 +source_file: products/accesscontextmanager/EgressPolicy.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - field: 'egress_policy_name' - provider_only: true - - api_field: 'resource' + - api_field: accessPolicyId + - field: egress_policy_name + provider_only: true + - api_field: resource diff --git a/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_generated_meta.yaml index 141b9155c50..f47b0395eea 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_access_context_manager_gcp_user_access_binding' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/GcpUserAccessBinding.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GcpUserAccessBinding' +resource: google_access_context_manager_gcp_user_access_binding +generation_type: mmv1 +source_file: products/accesscontextmanager/GcpUserAccessBinding.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: GcpUserAccessBinding fields: - - api_field: 'accessLevels' - - api_field: 'groupKey' - - api_field: 'name' - - field: 'organization_id' - provider_only: true - - api_field: 'scopedAccessSettings.activeSettings.accessLevels' - - api_field: 'scopedAccessSettings.activeSettings.sessionSettings.maxInactivity' - - api_field: 'scopedAccessSettings.activeSettings.sessionSettings.sessionLength' - - api_field: 'scopedAccessSettings.activeSettings.sessionSettings.sessionLengthEnabled' - - api_field: 'scopedAccessSettings.activeSettings.sessionSettings.sessionReauthMethod' - - api_field: 'scopedAccessSettings.activeSettings.sessionSettings.useOidcMaxAge' - - api_field: 'scopedAccessSettings.dryRunSettings.accessLevels' - - api_field: 'scopedAccessSettings.scope.clientScope.restrictedClientApplication.clientId' - - api_field: 'scopedAccessSettings.scope.clientScope.restrictedClientApplication.name' - - api_field: 'sessionSettings.maxInactivity' - - api_field: 'sessionSettings.sessionLength' - - api_field: 'sessionSettings.sessionLengthEnabled' - - api_field: 'sessionSettings.sessionReauthMethod' - - api_field: 'sessionSettings.useOidcMaxAge' + - api_field: accessLevels + - api_field: groupKey + - api_field: name + - field: organization_id + provider_only: true + - api_field: scopedAccessSettings.activeSettings.accessLevels + - api_field: scopedAccessSettings.activeSettings.sessionSettings.maxInactivity + - api_field: scopedAccessSettings.activeSettings.sessionSettings.sessionLength + - api_field: scopedAccessSettings.activeSettings.sessionSettings.sessionLengthEnabled + - api_field: scopedAccessSettings.activeSettings.sessionSettings.sessionReauthMethod + - api_field: scopedAccessSettings.activeSettings.sessionSettings.useOidcMaxAge + - api_field: scopedAccessSettings.dryRunSettings.accessLevels + - api_field: scopedAccessSettings.scope.clientScope.restrictedClientApplication.clientId + - api_field: scopedAccessSettings.scope.clientScope.restrictedClientApplication.name + - api_field: sessionSettings.maxInactivity + - api_field: sessionSettings.sessionLength + - api_field: sessionSettings.sessionLengthEnabled + - api_field: sessionSettings.sessionReauthMethod + - api_field: sessionSettings.useOidcMaxAge diff --git a/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_test.go b/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_test.go index 407f8ac6625..d1407dbb2d7 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_test.go +++ b/google/services/accesscontextmanager/resource_access_context_manager_gcp_user_access_binding_test.go @@ -36,6 +36,10 @@ import ( func testAccAccessContextManagerGcpUserAccessBinding_basicTest(t *testing.T) { t.Parallel() + // Skip in VCR until the test issue is resolved + // https://github.com/hashicorp/terraform-provider-google/issues/24833 + acctest.SkipIfVcr(t) + context := map[string]interface{}{ "org_id": envvar.GetTestOrgFromEnv(t), "org_domain": envvar.GetTestOrgDomainFromEnv(t), diff --git a/google/services/accesscontextmanager/resource_access_context_manager_ingress_policy_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_ingress_policy_generated_meta.yaml index eeb1826a02a..0f55321df30 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_ingress_policy_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_ingress_policy_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_access_context_manager_ingress_policy' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/IngressPolicy.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_ingress_policy +generation_type: mmv1 +source_file: products/accesscontextmanager/IngressPolicy.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - field: 'ingress_policy_name' - provider_only: true - - api_field: 'resource' + - api_field: accessPolicyId + - field: ingress_policy_name + provider_only: true + - api_field: resource diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_egress_policy_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_egress_policy_generated_meta.yaml index 4a396e2b256..006fcc016b1 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_egress_policy_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_egress_policy_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_access_context_manager_service_perimeter_dry_run_egress_policy' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeterDryRunEgressPolicy.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeter_dry_run_egress_policy +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeterDryRunEgressPolicy.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - api_field: 'egressFrom.identities' - - api_field: 'egressFrom.identityType' - - api_field: 'egressFrom.sourceRestriction' - - api_field: 'egressFrom.sources.accessLevel' - - api_field: 'egressFrom.sources.resource' - - api_field: 'egressTo.externalResources' - - api_field: 'egressTo.operations.methodSelectors.method' - - api_field: 'egressTo.operations.methodSelectors.permission' - - api_field: 'egressTo.operations.serviceName' - - api_field: 'egressTo.resources' - - api_field: 'egressTo.roles' - - api_field: 'etag' - - field: 'perimeter' - provider_only: true - - api_field: 'title' + - api_field: accessPolicyId + - api_field: egressFrom.identities + - api_field: egressFrom.identityType + - api_field: egressFrom.sourceRestriction + - api_field: egressFrom.sources.accessLevel + - api_field: egressFrom.sources.resource + - api_field: egressTo.externalResources + - api_field: egressTo.operations.methodSelectors.method + - api_field: egressTo.operations.methodSelectors.permission + - api_field: egressTo.operations.serviceName + - api_field: egressTo.resources + - api_field: egressTo.roles + - api_field: etag + - field: perimeter + provider_only: true + - api_field: title diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_ingress_policy_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_ingress_policy_generated_meta.yaml index bafb11ec1bb..3de86009fb8 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_ingress_policy_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_ingress_policy_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_access_context_manager_service_perimeter_dry_run_ingress_policy' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeterDryRunIngressPolicy.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeter_dry_run_ingress_policy +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeterDryRunIngressPolicy.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - api_field: 'etag' - - api_field: 'ingressFrom.identities' - - api_field: 'ingressFrom.identityType' - - api_field: 'ingressFrom.sources.accessLevel' - - api_field: 'ingressFrom.sources.resource' - - api_field: 'ingressTo.operations.methodSelectors.method' - - api_field: 'ingressTo.operations.methodSelectors.permission' - - api_field: 'ingressTo.operations.serviceName' - - api_field: 'ingressTo.resources' - - api_field: 'ingressTo.roles' - - field: 'perimeter' - provider_only: true - - api_field: 'title' + - api_field: accessPolicyId + - api_field: etag + - api_field: ingressFrom.identities + - api_field: ingressFrom.identityType + - api_field: ingressFrom.sources.accessLevel + - api_field: ingressFrom.sources.resource + - api_field: ingressTo.operations.methodSelectors.method + - api_field: ingressTo.operations.methodSelectors.permission + - api_field: ingressTo.operations.serviceName + - api_field: ingressTo.resources + - api_field: ingressTo.roles + - field: perimeter + provider_only: true + - api_field: title diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_resource_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_resource_generated_meta.yaml index 7b438047e2f..e669eaf2a49 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_resource_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_dry_run_resource_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_access_context_manager_service_perimeter_dry_run_resource' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeterDryRunResource.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeter_dry_run_resource +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeterDryRunResource.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - api_field: 'etag' - - field: 'perimeter_name' - provider_only: true - - api_field: 'resource' + - api_field: accessPolicyId + - api_field: etag + - field: perimeter_name + provider_only: true + - api_field: resource diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_egress_policy_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_egress_policy_generated_meta.yaml index dc2ef4b7fbf..4426d9919da 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_egress_policy_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_egress_policy_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_access_context_manager_service_perimeter_egress_policy' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeterEgressPolicy.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeter_egress_policy +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeterEgressPolicy.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - api_field: 'egressFrom.identities' - - api_field: 'egressFrom.identityType' - - api_field: 'egressFrom.sourceRestriction' - - api_field: 'egressFrom.sources.accessLevel' - - api_field: 'egressFrom.sources.resource' - - api_field: 'egressTo.externalResources' - - api_field: 'egressTo.operations.methodSelectors.method' - - api_field: 'egressTo.operations.methodSelectors.permission' - - api_field: 'egressTo.operations.serviceName' - - api_field: 'egressTo.resources' - - api_field: 'egressTo.roles' - - api_field: 'etag' - - field: 'perimeter' - provider_only: true - - api_field: 'title' + - api_field: accessPolicyId + - api_field: egressFrom.identities + - api_field: egressFrom.identityType + - api_field: egressFrom.sourceRestriction + - api_field: egressFrom.sources.accessLevel + - api_field: egressFrom.sources.resource + - api_field: egressTo.externalResources + - api_field: egressTo.operations.methodSelectors.method + - api_field: egressTo.operations.methodSelectors.permission + - api_field: egressTo.operations.serviceName + - api_field: egressTo.resources + - api_field: egressTo.roles + - api_field: etag + - field: perimeter + provider_only: true + - api_field: title diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_generated_meta.yaml index 7d1b5fff76c..98be31bb033 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_generated_meta.yaml @@ -1,69 +1,69 @@ -resource: 'google_access_context_manager_service_perimeter' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeter.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeter +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeter.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'name' - - api_field: 'parent' - - api_field: 'perimeterType' - - api_field: 'spec.accessLevels' - - api_field: 'spec.egressPolicies.egressFrom.identities' - - api_field: 'spec.egressPolicies.egressFrom.identityType' - - api_field: 'spec.egressPolicies.egressFrom.sourceRestriction' - - api_field: 'spec.egressPolicies.egressFrom.sources.accessLevel' - - api_field: 'spec.egressPolicies.egressFrom.sources.resource' - - api_field: 'spec.egressPolicies.egressTo.externalResources' - - api_field: 'spec.egressPolicies.egressTo.operations.methodSelectors.method' - - api_field: 'spec.egressPolicies.egressTo.operations.methodSelectors.permission' - - api_field: 'spec.egressPolicies.egressTo.operations.serviceName' - - api_field: 'spec.egressPolicies.egressTo.resources' - - api_field: 'spec.egressPolicies.egressTo.roles' - - api_field: 'spec.egressPolicies.title' - - api_field: 'spec.ingressPolicies.ingressFrom.identities' - - api_field: 'spec.ingressPolicies.ingressFrom.identityType' - - api_field: 'spec.ingressPolicies.ingressFrom.sources.accessLevel' - - api_field: 'spec.ingressPolicies.ingressFrom.sources.resource' - - api_field: 'spec.ingressPolicies.ingressTo.operations.methodSelectors.method' - - api_field: 'spec.ingressPolicies.ingressTo.operations.methodSelectors.permission' - - api_field: 'spec.ingressPolicies.ingressTo.operations.serviceName' - - api_field: 'spec.ingressPolicies.ingressTo.resources' - - api_field: 'spec.ingressPolicies.ingressTo.roles' - - api_field: 'spec.ingressPolicies.title' - - api_field: 'spec.resources' - - api_field: 'spec.restrictedServices' - - api_field: 'spec.vpcAccessibleServices.allowedServices' - - api_field: 'spec.vpcAccessibleServices.enableRestriction' - - api_field: 'status.accessLevels' - - api_field: 'status.egressPolicies.egressFrom.identities' - - api_field: 'status.egressPolicies.egressFrom.identityType' - - api_field: 'status.egressPolicies.egressFrom.sourceRestriction' - - api_field: 'status.egressPolicies.egressFrom.sources.accessLevel' - - api_field: 'status.egressPolicies.egressFrom.sources.resource' - - api_field: 'status.egressPolicies.egressTo.externalResources' - - api_field: 'status.egressPolicies.egressTo.operations.methodSelectors.method' - - api_field: 'status.egressPolicies.egressTo.operations.methodSelectors.permission' - - api_field: 'status.egressPolicies.egressTo.operations.serviceName' - - api_field: 'status.egressPolicies.egressTo.resources' - - api_field: 'status.egressPolicies.egressTo.roles' - - api_field: 'status.egressPolicies.title' - - api_field: 'status.ingressPolicies.ingressFrom.identities' - - api_field: 'status.ingressPolicies.ingressFrom.identityType' - - api_field: 'status.ingressPolicies.ingressFrom.sources.accessLevel' - - api_field: 'status.ingressPolicies.ingressFrom.sources.resource' - - api_field: 'status.ingressPolicies.ingressTo.operations.methodSelectors.method' - - api_field: 'status.ingressPolicies.ingressTo.operations.methodSelectors.permission' - - api_field: 'status.ingressPolicies.ingressTo.operations.serviceName' - - api_field: 'status.ingressPolicies.ingressTo.resources' - - api_field: 'status.ingressPolicies.ingressTo.roles' - - api_field: 'status.ingressPolicies.title' - - api_field: 'status.resources' - - api_field: 'status.restrictedServices' - - api_field: 'status.vpcAccessibleServices.allowedServices' - - api_field: 'status.vpcAccessibleServices.enableRestriction' - - api_field: 'title' - - api_field: 'updateTime' - - api_field: 'useExplicitDryRunSpec' + - api_field: createTime + - api_field: description + - api_field: name + - api_field: parent + - api_field: perimeterType + - api_field: spec.accessLevels + - api_field: spec.egressPolicies.egressFrom.identities + - api_field: spec.egressPolicies.egressFrom.identityType + - api_field: spec.egressPolicies.egressFrom.sourceRestriction + - api_field: spec.egressPolicies.egressFrom.sources.accessLevel + - api_field: spec.egressPolicies.egressFrom.sources.resource + - api_field: spec.egressPolicies.egressTo.externalResources + - api_field: spec.egressPolicies.egressTo.operations.methodSelectors.method + - api_field: spec.egressPolicies.egressTo.operations.methodSelectors.permission + - api_field: spec.egressPolicies.egressTo.operations.serviceName + - api_field: spec.egressPolicies.egressTo.resources + - api_field: spec.egressPolicies.egressTo.roles + - api_field: spec.egressPolicies.title + - api_field: spec.ingressPolicies.ingressFrom.identities + - api_field: spec.ingressPolicies.ingressFrom.identityType + - api_field: spec.ingressPolicies.ingressFrom.sources.accessLevel + - api_field: spec.ingressPolicies.ingressFrom.sources.resource + - api_field: spec.ingressPolicies.ingressTo.operations.methodSelectors.method + - api_field: spec.ingressPolicies.ingressTo.operations.methodSelectors.permission + - api_field: spec.ingressPolicies.ingressTo.operations.serviceName + - api_field: spec.ingressPolicies.ingressTo.resources + - api_field: spec.ingressPolicies.ingressTo.roles + - api_field: spec.ingressPolicies.title + - api_field: spec.resources + - api_field: spec.restrictedServices + - api_field: spec.vpcAccessibleServices.allowedServices + - api_field: spec.vpcAccessibleServices.enableRestriction + - api_field: status.accessLevels + - api_field: status.egressPolicies.egressFrom.identities + - api_field: status.egressPolicies.egressFrom.identityType + - api_field: status.egressPolicies.egressFrom.sourceRestriction + - api_field: status.egressPolicies.egressFrom.sources.accessLevel + - api_field: status.egressPolicies.egressFrom.sources.resource + - api_field: status.egressPolicies.egressTo.externalResources + - api_field: status.egressPolicies.egressTo.operations.methodSelectors.method + - api_field: status.egressPolicies.egressTo.operations.methodSelectors.permission + - api_field: status.egressPolicies.egressTo.operations.serviceName + - api_field: status.egressPolicies.egressTo.resources + - api_field: status.egressPolicies.egressTo.roles + - api_field: status.egressPolicies.title + - api_field: status.ingressPolicies.ingressFrom.identities + - api_field: status.ingressPolicies.ingressFrom.identityType + - api_field: status.ingressPolicies.ingressFrom.sources.accessLevel + - api_field: status.ingressPolicies.ingressFrom.sources.resource + - api_field: status.ingressPolicies.ingressTo.operations.methodSelectors.method + - api_field: status.ingressPolicies.ingressTo.operations.methodSelectors.permission + - api_field: status.ingressPolicies.ingressTo.operations.serviceName + - api_field: status.ingressPolicies.ingressTo.resources + - api_field: status.ingressPolicies.ingressTo.roles + - api_field: status.ingressPolicies.title + - api_field: status.resources + - api_field: status.restrictedServices + - api_field: status.vpcAccessibleServices.allowedServices + - api_field: status.vpcAccessibleServices.enableRestriction + - api_field: title + - api_field: updateTime + - api_field: useExplicitDryRunSpec diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_ingress_policy_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_ingress_policy_generated_meta.yaml index 35a4b679a15..2c1b293520e 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_ingress_policy_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_ingress_policy_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_access_context_manager_service_perimeter_ingress_policy' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeterIngressPolicy.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeter_ingress_policy +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeterIngressPolicy.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - api_field: 'etag' - - api_field: 'ingressFrom.identities' - - api_field: 'ingressFrom.identityType' - - api_field: 'ingressFrom.sources.accessLevel' - - api_field: 'ingressFrom.sources.resource' - - api_field: 'ingressTo.operations.methodSelectors.method' - - api_field: 'ingressTo.operations.methodSelectors.permission' - - api_field: 'ingressTo.operations.serviceName' - - api_field: 'ingressTo.resources' - - api_field: 'ingressTo.roles' - - field: 'perimeter' - provider_only: true - - api_field: 'title' + - api_field: accessPolicyId + - api_field: etag + - api_field: ingressFrom.identities + - api_field: ingressFrom.identityType + - api_field: ingressFrom.sources.accessLevel + - api_field: ingressFrom.sources.resource + - api_field: ingressTo.operations.methodSelectors.method + - api_field: ingressTo.operations.methodSelectors.permission + - api_field: ingressTo.operations.serviceName + - api_field: ingressTo.resources + - api_field: ingressTo.roles + - field: perimeter + provider_only: true + - api_field: title diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_resource_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_resource_generated_meta.yaml index 785f859eb1f..963d681b99f 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_resource_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeter_resource_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_access_context_manager_service_perimeter_resource' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeterResource.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeter_resource +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeterResource.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'accessPolicyId' - - api_field: 'etag' - - field: 'perimeter_name' - provider_only: true - - api_field: 'resource' + - api_field: accessPolicyId + - api_field: etag + - field: perimeter_name + provider_only: true + - api_field: resource diff --git a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeters_generated_meta.yaml b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeters_generated_meta.yaml index 8cb04453276..2b2f9c0f645 100644 --- a/google/services/accesscontextmanager/resource_access_context_manager_service_perimeters_generated_meta.yaml +++ b/google/services/accesscontextmanager/resource_access_context_manager_service_perimeters_generated_meta.yaml @@ -1,69 +1,69 @@ -resource: 'google_access_context_manager_service_perimeters' -generation_type: 'mmv1' -source_file: 'products/accesscontextmanager/ServicePerimeters.yaml' -api_service_name: 'accesscontextmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServicePerimeter' +resource: google_access_context_manager_service_perimeters +generation_type: mmv1 +source_file: products/accesscontextmanager/ServicePerimeters.yaml +api_service_name: accesscontextmanager.googleapis.com +api_version: v1 +api_resource_type_kind: ServicePerimeter fields: - - api_field: 'parent' - - api_field: 'servicePerimeters.createTime' - - api_field: 'servicePerimeters.description' - - api_field: 'servicePerimeters.name' - - api_field: 'servicePerimeters.perimeterType' - - api_field: 'servicePerimeters.spec.accessLevels' - - api_field: 'servicePerimeters.spec.egressPolicies.egressFrom.identities' - - api_field: 'servicePerimeters.spec.egressPolicies.egressFrom.identityType' - - api_field: 'servicePerimeters.spec.egressPolicies.egressFrom.sourceRestriction' - - api_field: 'servicePerimeters.spec.egressPolicies.egressFrom.sources.accessLevel' - - api_field: 'servicePerimeters.spec.egressPolicies.egressFrom.sources.resource' - - api_field: 'servicePerimeters.spec.egressPolicies.egressTo.externalResources' - - api_field: 'servicePerimeters.spec.egressPolicies.egressTo.operations.methodSelectors.method' - - api_field: 'servicePerimeters.spec.egressPolicies.egressTo.operations.methodSelectors.permission' - - api_field: 'servicePerimeters.spec.egressPolicies.egressTo.operations.serviceName' - - api_field: 'servicePerimeters.spec.egressPolicies.egressTo.resources' - - api_field: 'servicePerimeters.spec.egressPolicies.egressTo.roles' - - api_field: 'servicePerimeters.spec.egressPolicies.title' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressFrom.identities' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressFrom.identityType' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressFrom.sources.accessLevel' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressFrom.sources.resource' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressTo.operations.methodSelectors.method' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressTo.operations.methodSelectors.permission' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressTo.operations.serviceName' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressTo.resources' - - api_field: 'servicePerimeters.spec.ingressPolicies.ingressTo.roles' - - api_field: 'servicePerimeters.spec.ingressPolicies.title' - - api_field: 'servicePerimeters.spec.resources' - - api_field: 'servicePerimeters.spec.restrictedServices' - - api_field: 'servicePerimeters.spec.vpcAccessibleServices.allowedServices' - - api_field: 'servicePerimeters.spec.vpcAccessibleServices.enableRestriction' - - api_field: 'servicePerimeters.status.accessLevels' - - api_field: 'servicePerimeters.status.egressPolicies.egressFrom.identities' - - api_field: 'servicePerimeters.status.egressPolicies.egressFrom.identityType' - - api_field: 'servicePerimeters.status.egressPolicies.egressFrom.sourceRestriction' - - api_field: 'servicePerimeters.status.egressPolicies.egressFrom.sources.accessLevel' - - api_field: 'servicePerimeters.status.egressPolicies.egressFrom.sources.resource' - - api_field: 'servicePerimeters.status.egressPolicies.egressTo.externalResources' - - api_field: 'servicePerimeters.status.egressPolicies.egressTo.operations.methodSelectors.method' - - api_field: 'servicePerimeters.status.egressPolicies.egressTo.operations.methodSelectors.permission' - - api_field: 'servicePerimeters.status.egressPolicies.egressTo.operations.serviceName' - - api_field: 'servicePerimeters.status.egressPolicies.egressTo.resources' - - api_field: 'servicePerimeters.status.egressPolicies.egressTo.roles' - - api_field: 'servicePerimeters.status.egressPolicies.title' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressFrom.identities' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressFrom.identityType' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressFrom.sources.accessLevel' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressFrom.sources.resource' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressTo.operations.methodSelectors.method' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressTo.operations.methodSelectors.permission' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressTo.operations.serviceName' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressTo.resources' - - api_field: 'servicePerimeters.status.ingressPolicies.ingressTo.roles' - - api_field: 'servicePerimeters.status.ingressPolicies.title' - - api_field: 'servicePerimeters.status.resources' - - api_field: 'servicePerimeters.status.restrictedServices' - - api_field: 'servicePerimeters.status.vpcAccessibleServices.allowedServices' - - api_field: 'servicePerimeters.status.vpcAccessibleServices.enableRestriction' - - api_field: 'servicePerimeters.title' - - api_field: 'servicePerimeters.updateTime' - - api_field: 'servicePerimeters.useExplicitDryRunSpec' + - api_field: parent + - api_field: servicePerimeters.createTime + - api_field: servicePerimeters.description + - api_field: servicePerimeters.name + - api_field: servicePerimeters.perimeterType + - api_field: servicePerimeters.spec.accessLevels + - api_field: servicePerimeters.spec.egressPolicies.egressFrom.identities + - api_field: servicePerimeters.spec.egressPolicies.egressFrom.identityType + - api_field: servicePerimeters.spec.egressPolicies.egressFrom.sourceRestriction + - api_field: servicePerimeters.spec.egressPolicies.egressFrom.sources.accessLevel + - api_field: servicePerimeters.spec.egressPolicies.egressFrom.sources.resource + - api_field: servicePerimeters.spec.egressPolicies.egressTo.externalResources + - api_field: servicePerimeters.spec.egressPolicies.egressTo.operations.methodSelectors.method + - api_field: servicePerimeters.spec.egressPolicies.egressTo.operations.methodSelectors.permission + - api_field: servicePerimeters.spec.egressPolicies.egressTo.operations.serviceName + - api_field: servicePerimeters.spec.egressPolicies.egressTo.resources + - api_field: servicePerimeters.spec.egressPolicies.egressTo.roles + - api_field: servicePerimeters.spec.egressPolicies.title + - api_field: servicePerimeters.spec.ingressPolicies.ingressFrom.identities + - api_field: servicePerimeters.spec.ingressPolicies.ingressFrom.identityType + - api_field: servicePerimeters.spec.ingressPolicies.ingressFrom.sources.accessLevel + - api_field: servicePerimeters.spec.ingressPolicies.ingressFrom.sources.resource + - api_field: servicePerimeters.spec.ingressPolicies.ingressTo.operations.methodSelectors.method + - api_field: servicePerimeters.spec.ingressPolicies.ingressTo.operations.methodSelectors.permission + - api_field: servicePerimeters.spec.ingressPolicies.ingressTo.operations.serviceName + - api_field: servicePerimeters.spec.ingressPolicies.ingressTo.resources + - api_field: servicePerimeters.spec.ingressPolicies.ingressTo.roles + - api_field: servicePerimeters.spec.ingressPolicies.title + - api_field: servicePerimeters.spec.resources + - api_field: servicePerimeters.spec.restrictedServices + - api_field: servicePerimeters.spec.vpcAccessibleServices.allowedServices + - api_field: servicePerimeters.spec.vpcAccessibleServices.enableRestriction + - api_field: servicePerimeters.status.accessLevels + - api_field: servicePerimeters.status.egressPolicies.egressFrom.identities + - api_field: servicePerimeters.status.egressPolicies.egressFrom.identityType + - api_field: servicePerimeters.status.egressPolicies.egressFrom.sourceRestriction + - api_field: servicePerimeters.status.egressPolicies.egressFrom.sources.accessLevel + - api_field: servicePerimeters.status.egressPolicies.egressFrom.sources.resource + - api_field: servicePerimeters.status.egressPolicies.egressTo.externalResources + - api_field: servicePerimeters.status.egressPolicies.egressTo.operations.methodSelectors.method + - api_field: servicePerimeters.status.egressPolicies.egressTo.operations.methodSelectors.permission + - api_field: servicePerimeters.status.egressPolicies.egressTo.operations.serviceName + - api_field: servicePerimeters.status.egressPolicies.egressTo.resources + - api_field: servicePerimeters.status.egressPolicies.egressTo.roles + - api_field: servicePerimeters.status.egressPolicies.title + - api_field: servicePerimeters.status.ingressPolicies.ingressFrom.identities + - api_field: servicePerimeters.status.ingressPolicies.ingressFrom.identityType + - api_field: servicePerimeters.status.ingressPolicies.ingressFrom.sources.accessLevel + - api_field: servicePerimeters.status.ingressPolicies.ingressFrom.sources.resource + - api_field: servicePerimeters.status.ingressPolicies.ingressTo.operations.methodSelectors.method + - api_field: servicePerimeters.status.ingressPolicies.ingressTo.operations.methodSelectors.permission + - api_field: servicePerimeters.status.ingressPolicies.ingressTo.operations.serviceName + - api_field: servicePerimeters.status.ingressPolicies.ingressTo.resources + - api_field: servicePerimeters.status.ingressPolicies.ingressTo.roles + - api_field: servicePerimeters.status.ingressPolicies.title + - api_field: servicePerimeters.status.resources + - api_field: servicePerimeters.status.restrictedServices + - api_field: servicePerimeters.status.vpcAccessibleServices.allowedServices + - api_field: servicePerimeters.status.vpcAccessibleServices.enableRestriction + - api_field: servicePerimeters.title + - api_field: servicePerimeters.updateTime + - api_field: servicePerimeters.useExplicitDryRunSpec diff --git a/google/services/activedirectory/resource_active_directory_domain_generated_meta.yaml b/google/services/activedirectory/resource_active_directory_domain_generated_meta.yaml index ba5f079118f..86b1e1bf327 100644 --- a/google/services/activedirectory/resource_active_directory_domain_generated_meta.yaml +++ b/google/services/activedirectory/resource_active_directory_domain_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_active_directory_domain' -generation_type: 'mmv1' -source_file: 'products/activedirectory/Domain.yaml' -api_service_name: 'managedidentities.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Domain' +resource: google_active_directory_domain +generation_type: mmv1 +source_file: products/activedirectory/Domain.yaml +api_service_name: managedidentities.googleapis.com +api_version: v1 +api_resource_type_kind: Domain fields: - - api_field: 'admin' - - api_field: 'authorizedNetworks' - - field: 'deletion_protection' - provider_only: true - - field: 'domain_name' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'fqdn' - - api_field: 'labels' - - api_field: 'locations' - - api_field: 'name' - - api_field: 'reservedIpRange' - - field: 'terraform_labels' - provider_only: true + - api_field: admin + - api_field: authorizedNetworks + - field: deletion_protection + provider_only: true + - field: domain_name + provider_only: true + - field: effective_labels + provider_only: true + - api_field: fqdn + - api_field: labels + - api_field: locations + - api_field: name + - api_field: reservedIpRange + - field: terraform_labels + provider_only: true diff --git a/google/services/activedirectory/resource_active_directory_domain_trust_generated_meta.yaml b/google/services/activedirectory/resource_active_directory_domain_trust_generated_meta.yaml index f467425f9df..0542d731c0f 100644 --- a/google/services/activedirectory/resource_active_directory_domain_trust_generated_meta.yaml +++ b/google/services/activedirectory/resource_active_directory_domain_trust_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_active_directory_domain_trust' -generation_type: 'mmv1' -source_file: 'products/activedirectory/DomainTrust.yaml' -api_service_name: 'managedidentities.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Domain' +resource: google_active_directory_domain_trust +generation_type: mmv1 +source_file: products/activedirectory/DomainTrust.yaml +api_service_name: managedidentities.googleapis.com +api_version: v1 +api_resource_type_kind: Domain fields: - - field: 'domain' - provider_only: true - - api_field: 'selectiveAuthentication' - - api_field: 'targetDnsIpAddresses' - - api_field: 'targetDomainName' - - api_field: 'trustDirection' - - api_field: 'trustHandshakeSecret' - - api_field: 'trustType' + - field: domain + provider_only: true + - api_field: selectiveAuthentication + - api_field: targetDnsIpAddresses + - api_field: targetDomainName + - api_field: trustDirection + - api_field: trustHandshakeSecret + - api_field: trustType diff --git a/google/services/alloydb/resource_alloydb_backup_generated_meta.yaml b/google/services/alloydb/resource_alloydb_backup_generated_meta.yaml index 9a7ace61af4..c09d6b0655b 100644 --- a/google/services/alloydb/resource_alloydb_backup_generated_meta.yaml +++ b/google/services/alloydb/resource_alloydb_backup_generated_meta.yaml @@ -1,39 +1,39 @@ -resource: 'google_alloydb_backup' -generation_type: 'mmv1' -source_file: 'products/alloydb/Backup.yaml' -api_service_name: 'alloydb.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Backup' +resource: google_alloydb_backup +generation_type: mmv1 +source_file: products/alloydb/Backup.yaml +api_service_name: alloydb.googleapis.com +api_version: v1 +api_resource_type_kind: Backup fields: - - api_field: 'annotations' - - field: 'backup_id' - provider_only: true - - api_field: 'clusterName' - - api_field: 'clusterUid' - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionConfig.kmsKeyName' - - api_field: 'encryptionInfo.encryptionType' - - api_field: 'encryptionInfo.kmsKeyVersions' - - api_field: 'etag' - - api_field: 'expiryQuantity.retentionCount' - - api_field: 'expiryQuantity.totalRetentionCount' - - api_field: 'expiryTime' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - api_field: 'sizeBytes' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - field: backup_id + provider_only: true + - api_field: clusterName + - api_field: clusterUid + - api_field: createTime + - api_field: deleteTime + - api_field: description + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: encryptionConfig.kmsKeyName + - api_field: encryptionInfo.encryptionType + - api_field: encryptionInfo.kmsKeyVersions + - api_field: etag + - api_field: expiryQuantity.retentionCount + - api_field: expiryQuantity.totalRetentionCount + - api_field: expiryTime + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: reconciling + - api_field: sizeBytes + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: uid + - api_field: updateTime diff --git a/google/services/alloydb/resource_alloydb_cluster_generated_meta.yaml b/google/services/alloydb/resource_alloydb_cluster_generated_meta.yaml index 14bfdcd00c8..2ec27d9f14a 100644 --- a/google/services/alloydb/resource_alloydb_cluster_generated_meta.yaml +++ b/google/services/alloydb/resource_alloydb_cluster_generated_meta.yaml @@ -1,80 +1,80 @@ -resource: 'google_alloydb_cluster' -generation_type: 'mmv1' -source_file: 'products/alloydb/Cluster.yaml' -api_service_name: 'alloydb.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Cluster' +resource: google_alloydb_cluster +generation_type: mmv1 +source_file: products/alloydb/Cluster.yaml +api_service_name: alloydb.googleapis.com +api_version: v1 +api_resource_type_kind: Cluster fields: - - api_field: 'annotations' - - api_field: 'automatedBackupPolicy.backupWindow' - - api_field: 'automatedBackupPolicy.enabled' - - api_field: 'automatedBackupPolicy.encryptionConfig.kmsKeyName' - - api_field: 'automatedBackupPolicy.labels' - - api_field: 'automatedBackupPolicy.location' - - api_field: 'automatedBackupPolicy.quantityBasedRetention.count' - - api_field: 'automatedBackupPolicy.timeBasedRetention.retentionPeriod' - - api_field: 'automatedBackupPolicy.weeklySchedule.daysOfWeek' - - api_field: 'automatedBackupPolicy.weeklySchedule.startTimes.hours' - - api_field: 'automatedBackupPolicy.weeklySchedule.startTimes.minutes' - - api_field: 'automatedBackupPolicy.weeklySchedule.startTimes.nanos' - - api_field: 'automatedBackupPolicy.weeklySchedule.startTimes.seconds' - - api_field: 'backupSource.backupName' - - field: 'cluster_id' - provider_only: true - - api_field: 'clusterType' - - api_field: 'continuousBackupConfig.enabled' - - api_field: 'continuousBackupConfig.encryptionConfig.kmsKeyName' - - api_field: 'continuousBackupConfig.recoveryWindowDays' - - api_field: 'continuousBackupInfo.earliestRestorableTime' - - api_field: 'continuousBackupInfo.enabledTime' - - api_field: 'continuousBackupInfo.encryptionInfo.encryptionType' - - api_field: 'continuousBackupInfo.encryptionInfo.kmsKeyVersions' - - api_field: 'continuousBackupInfo.schedule' - - api_field: 'databaseVersion' - - field: 'deletion_policy' - provider_only: true - - field: 'deletion_protection' - provider_only: true - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionConfig.kmsKeyName' - - api_field: 'encryptionInfo.encryptionType' - - api_field: 'encryptionInfo.kmsKeyVersions' - - api_field: 'etag' - - api_field: 'initialUser.password' - - api_field: 'initialUser.user' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'maintenanceUpdatePolicy.maintenanceWindows.day' - - api_field: 'maintenanceUpdatePolicy.maintenanceWindows.startTime.hours' - - api_field: 'maintenanceUpdatePolicy.maintenanceWindows.startTime.minutes' - - api_field: 'maintenanceUpdatePolicy.maintenanceWindows.startTime.nanos' - - api_field: 'maintenanceUpdatePolicy.maintenanceWindows.startTime.seconds' - - api_field: 'migrationSource.hostPort' - - api_field: 'migrationSource.referenceId' - - api_field: 'migrationSource.sourceType' - - api_field: 'name' - - api_field: 'networkConfig.allocatedIpRange' - - api_field: 'networkConfig.network' - - api_field: 'pscConfig.pscEnabled' - - api_field: 'pscConfig.serviceOwnedProjectNumber' - - api_field: 'reconciling' - - api_field: 'restoreBackupSource.backupName' - - api_field: 'restoreContinuousBackupSource.cluster' - - api_field: 'restoreContinuousBackupSource.pointInTime' - - api_field: 'secondaryConfig.primaryClusterName' - - field: 'skip_await_major_version_upgrade' - provider_only: true - - api_field: 'state' - - api_field: 'subscriptionType' - - field: 'terraform_labels' - provider_only: true - - api_field: 'trialMetadata.endTime' - - api_field: 'trialMetadata.graceEndTime' - - api_field: 'trialMetadata.startTime' - - api_field: 'trialMetadata.upgradeTime' - - api_field: 'uid' + - api_field: annotations + - api_field: automatedBackupPolicy.backupWindow + - api_field: automatedBackupPolicy.enabled + - api_field: automatedBackupPolicy.encryptionConfig.kmsKeyName + - api_field: automatedBackupPolicy.labels + - api_field: automatedBackupPolicy.location + - api_field: automatedBackupPolicy.quantityBasedRetention.count + - api_field: automatedBackupPolicy.timeBasedRetention.retentionPeriod + - api_field: automatedBackupPolicy.weeklySchedule.daysOfWeek + - api_field: automatedBackupPolicy.weeklySchedule.startTimes.hours + - api_field: automatedBackupPolicy.weeklySchedule.startTimes.minutes + - api_field: automatedBackupPolicy.weeklySchedule.startTimes.nanos + - api_field: automatedBackupPolicy.weeklySchedule.startTimes.seconds + - api_field: backupSource.backupName + - field: cluster_id + provider_only: true + - api_field: clusterType + - api_field: continuousBackupConfig.enabled + - api_field: continuousBackupConfig.encryptionConfig.kmsKeyName + - api_field: continuousBackupConfig.recoveryWindowDays + - api_field: continuousBackupInfo.earliestRestorableTime + - api_field: continuousBackupInfo.enabledTime + - api_field: continuousBackupInfo.encryptionInfo.encryptionType + - api_field: continuousBackupInfo.encryptionInfo.kmsKeyVersions + - api_field: continuousBackupInfo.schedule + - api_field: databaseVersion + - field: deletion_policy + provider_only: true + - field: deletion_protection + provider_only: true + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: encryptionConfig.kmsKeyName + - api_field: encryptionInfo.encryptionType + - api_field: encryptionInfo.kmsKeyVersions + - api_field: etag + - api_field: initialUser.password + - api_field: initialUser.user + - api_field: labels + - field: location + provider_only: true + - api_field: maintenanceUpdatePolicy.maintenanceWindows.day + - api_field: maintenanceUpdatePolicy.maintenanceWindows.startTime.hours + - api_field: maintenanceUpdatePolicy.maintenanceWindows.startTime.minutes + - api_field: maintenanceUpdatePolicy.maintenanceWindows.startTime.nanos + - api_field: maintenanceUpdatePolicy.maintenanceWindows.startTime.seconds + - api_field: migrationSource.hostPort + - api_field: migrationSource.referenceId + - api_field: migrationSource.sourceType + - api_field: name + - api_field: networkConfig.allocatedIpRange + - api_field: networkConfig.network + - api_field: pscConfig.pscEnabled + - api_field: pscConfig.serviceOwnedProjectNumber + - api_field: reconciling + - api_field: restoreBackupSource.backupName + - api_field: restoreContinuousBackupSource.cluster + - api_field: restoreContinuousBackupSource.pointInTime + - api_field: secondaryConfig.primaryClusterName + - field: skip_await_major_version_upgrade + provider_only: true + - api_field: state + - api_field: subscriptionType + - field: terraform_labels + provider_only: true + - api_field: trialMetadata.endTime + - api_field: trialMetadata.graceEndTime + - api_field: trialMetadata.startTime + - api_field: trialMetadata.upgradeTime + - api_field: uid diff --git a/google/services/alloydb/resource_alloydb_instance.go b/google/services/alloydb/resource_alloydb_instance.go index 35533648a43..0772a055016 100644 --- a/google/services/alloydb/resource_alloydb_instance.go +++ b/google/services/alloydb/resource_alloydb_instance.go @@ -224,6 +224,40 @@ Possible values are: 'AVAILABILITY_TYPE_UNSPECIFIED', 'ZONAL', 'REGIONAL'.' Poss }, }, }, + "connection_pool_config": { + Type: schema.TypeList, + Optional: true, + Description: `Configuration for Managed Connection Pool.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + Description: `Whether to enabled Managed Connection Pool.`, + }, + "flags": { + Type: schema.TypeMap, + Optional: true, + Description: `Flags for configuring managed connection pooling when it is enabled. +These flags will only be set if 'connection_pool_config.enabled' is +true. +Please see +https://cloud.google.com/alloydb/docs/configure-managed-connection-pooling#configuration-options +for a comprehensive list of flags that can be set. To specify the flags +in Terraform, please remove the "connection-pooling-" prefix and use +underscores instead of dashes in the name. For example, +"connection-pooling-pool-mode" would be "pool_mode".`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "pooler_count": { + Type: schema.TypeInt, + Computed: true, + Description: `The number of running poolers per instance.`, + }, + }, + }, + }, "database_flags": { Type: schema.TypeMap, Computed: true, @@ -617,6 +651,12 @@ func resourceAlloydbInstanceCreate(d *schema.ResourceData, meta interface{}) err } else if v, ok := d.GetOkExists("network_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(networkConfigProp)) && (ok || !reflect.DeepEqual(v, networkConfigProp)) { obj["networkConfig"] = networkConfigProp } + connectionPoolConfigProp, err := expandAlloydbInstanceConnectionPoolConfig(d.Get("connection_pool_config"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("connection_pool_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(connectionPoolConfigProp)) && (ok || !reflect.DeepEqual(v, connectionPoolConfigProp)) { + obj["connectionPoolConfig"] = connectionPoolConfigProp + } effectiveLabelsProp, err := expandAlloydbInstanceEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -804,6 +844,9 @@ func resourceAlloydbInstanceRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("outbound_public_ip_addresses", flattenAlloydbInstanceOutboundPublicIpAddresses(res["outboundPublicIpAddresses"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } + if err := d.Set("connection_pool_config", flattenAlloydbInstanceConnectionPoolConfig(res["connectionPoolConfig"], d, config)); err != nil { + return fmt.Errorf("Error reading Instance: %s", err) + } if err := d.Set("terraform_labels", flattenAlloydbInstanceTerraformLabels(res["labels"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } @@ -939,6 +982,12 @@ func resourceAlloydbInstanceUpdate(d *schema.ResourceData, meta interface{}) err } else if v, ok := d.GetOkExists("network_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, networkConfigProp)) { obj["networkConfig"] = networkConfigProp } + connectionPoolConfigProp, err := expandAlloydbInstanceConnectionPoolConfig(d.Get("connection_pool_config"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("connection_pool_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, connectionPoolConfigProp)) { + obj["connectionPoolConfig"] = connectionPoolConfigProp + } effectiveLabelsProp, err := expandAlloydbInstanceEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -1005,6 +1054,10 @@ func resourceAlloydbInstanceUpdate(d *schema.ResourceData, meta interface{}) err updateMask = append(updateMask, "networkConfig") } + if d.HasChange("connection_pool_config") { + updateMask = append(updateMask, "connectionPoolConfig") + } + if d.HasChange("effective_labels") { updateMask = append(updateMask, "labels") } @@ -1543,6 +1596,59 @@ func flattenAlloydbInstanceOutboundPublicIpAddresses(v interface{}, d *schema.Re return v } +func flattenAlloydbInstanceConnectionPoolConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return flattenAlloyDBInstanceEmptyConnectionPoolConfig(v, d, config) + } + transformed := make(map[string]interface{}) + transformed["enabled"] = + flattenAlloydbInstanceConnectionPoolConfigEnabled(original["enabled"], d, config) + transformed["pooler_count"] = + flattenAlloydbInstanceConnectionPoolConfigPoolerCount(original["poolerCount"], d, config) + transformed["flags"] = + flattenAlloydbInstanceConnectionPoolConfigFlags(original["flags"], d, config) + return []interface{}{transformed} +} + +func flattenAlloyDBInstanceEmptyConnectionPoolConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // The API returns an nil/empty value for connectionPoolConfig.enabled when + // it's set to false. So keep the user's value to avoid a permadiff. + return []interface{}{ + map[string]interface{}{ + "enabled": d.Get("connection_pool_config.0.enabled"), + }, + } +} + +func flattenAlloydbInstanceConnectionPoolConfigEnabled(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenAlloydbInstanceConnectionPoolConfigPoolerCount(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenAlloydbInstanceConnectionPoolConfigFlags(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenAlloydbInstanceTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v @@ -2026,6 +2132,61 @@ func expandAlloydbInstanceNetworkConfigAllocatedIpRangeOverride(v interface{}, d return v, nil } +func expandAlloydbInstanceConnectionPoolConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedEnabled, err := expandAlloydbInstanceConnectionPoolConfigEnabled(original["enabled"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedEnabled); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["enabled"] = transformedEnabled + } + + transformedPoolerCount, err := expandAlloydbInstanceConnectionPoolConfigPoolerCount(original["pooler_count"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPoolerCount); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["poolerCount"] = transformedPoolerCount + } + + transformedFlags, err := expandAlloydbInstanceConnectionPoolConfigFlags(original["flags"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedFlags); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["flags"] = transformedFlags + } + + return transformed, nil +} + +func expandAlloydbInstanceConnectionPoolConfigEnabled(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandAlloydbInstanceConnectionPoolConfigPoolerCount(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandAlloydbInstanceConnectionPoolConfigFlags(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} + func expandAlloydbInstanceEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { if v == nil { return map[string]string{}, nil diff --git a/google/services/alloydb/resource_alloydb_instance_generated_meta.yaml b/google/services/alloydb/resource_alloydb_instance_generated_meta.yaml index 94540662371..eeb1d847ab9 100644 --- a/google/services/alloydb/resource_alloydb_instance_generated_meta.yaml +++ b/google/services/alloydb/resource_alloydb_instance_generated_meta.yaml @@ -1,56 +1,59 @@ -resource: 'google_alloydb_instance' -generation_type: 'mmv1' -source_file: 'products/alloydb/Instance.yaml' -api_service_name: 'alloydb.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_alloydb_instance +generation_type: mmv1 +source_file: products/alloydb/Instance.yaml +api_service_name: alloydb.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'activationPolicy' - - api_field: 'annotations' - - api_field: 'availabilityType' - - api_field: 'clientConnectionConfig.requireConnectors' - - api_field: 'clientConnectionConfig.sslConfig.sslMode' - - field: 'cluster' - provider_only: true - - api_field: 'createTime' - - api_field: 'databaseFlags' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'gceZone' - - field: 'instance_id' - provider_only: true - - api_field: 'instanceType' - - api_field: 'ipAddress' - - api_field: 'labels' - - api_field: 'machineConfig.cpuCount' - - api_field: 'machineConfig.machineType' - - api_field: 'name' - - api_field: 'networkConfig.allocatedIpRangeOverride' - - api_field: 'networkConfig.authorizedExternalNetworks.cidrRange' - - api_field: 'networkConfig.enableOutboundPublicIp' - - api_field: 'networkConfig.enablePublicIp' - - api_field: 'outboundPublicIpAddresses' - - api_field: 'pscInstanceConfig.allowedConsumerProjects' - - api_field: 'pscInstanceConfig.pscAutoConnections.consumerNetwork' - - api_field: 'pscInstanceConfig.pscAutoConnections.consumerNetworkStatus' - - api_field: 'pscInstanceConfig.pscAutoConnections.consumerProject' - - api_field: 'pscInstanceConfig.pscAutoConnections.ipAddress' - - api_field: 'pscInstanceConfig.pscAutoConnections.status' - - api_field: 'pscInstanceConfig.pscDnsName' - - api_field: 'pscInstanceConfig.pscInterfaceConfigs.networkAttachmentResource' - - api_field: 'pscInstanceConfig.serviceAttachmentLink' - - api_field: 'publicIpAddress' - - api_field: 'queryInsightsConfig.queryPlansPerMinute' - - api_field: 'queryInsightsConfig.queryStringLength' - - api_field: 'queryInsightsConfig.recordApplicationTags' - - api_field: 'queryInsightsConfig.recordClientAddress' - - api_field: 'readPoolConfig.nodeCount' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: activationPolicy + - api_field: annotations + - api_field: availabilityType + - api_field: clientConnectionConfig.requireConnectors + - api_field: clientConnectionConfig.sslConfig.sslMode + - field: cluster + provider_only: true + - api_field: connectionPoolConfig.enabled + - api_field: connectionPoolConfig.flags + - api_field: connectionPoolConfig.poolerCount + - api_field: createTime + - api_field: databaseFlags + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: gceZone + - field: instance_id + provider_only: true + - api_field: instanceType + - api_field: ipAddress + - api_field: labels + - api_field: machineConfig.cpuCount + - api_field: machineConfig.machineType + - api_field: name + - api_field: networkConfig.allocatedIpRangeOverride + - api_field: networkConfig.authorizedExternalNetworks.cidrRange + - api_field: networkConfig.enableOutboundPublicIp + - api_field: networkConfig.enablePublicIp + - api_field: outboundPublicIpAddresses + - api_field: pscInstanceConfig.allowedConsumerProjects + - api_field: pscInstanceConfig.pscAutoConnections.consumerNetwork + - api_field: pscInstanceConfig.pscAutoConnections.consumerNetworkStatus + - api_field: pscInstanceConfig.pscAutoConnections.consumerProject + - api_field: pscInstanceConfig.pscAutoConnections.ipAddress + - api_field: pscInstanceConfig.pscAutoConnections.status + - api_field: pscInstanceConfig.pscDnsName + - api_field: pscInstanceConfig.pscInterfaceConfigs.networkAttachmentResource + - api_field: pscInstanceConfig.serviceAttachmentLink + - api_field: publicIpAddress + - api_field: queryInsightsConfig.queryPlansPerMinute + - api_field: queryInsightsConfig.queryStringLength + - api_field: queryInsightsConfig.recordApplicationTags + - api_field: queryInsightsConfig.recordClientAddress + - api_field: readPoolConfig.nodeCount + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/alloydb/resource_alloydb_instance_test.go b/google/services/alloydb/resource_alloydb_instance_test.go index c18386b4de0..3a4edd9e7ac 100644 --- a/google/services/alloydb/resource_alloydb_instance_test.go +++ b/google/services/alloydb/resource_alloydb_instance_test.go @@ -90,6 +90,27 @@ data "google_compute_network" "default" { `, context) } +func testAccAlloydbInstance_deleteInstance(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_alloydb_cluster" "default" { + cluster_id = "tf-test-alloydb-cluster%{random_suffix}" + location = "us-central1" + network_config { + network = data.google_compute_network.default.id + } + initial_user { + password = "tf-test-alloydb-cluster%{random_suffix}" + } + + deletion_protection = false +} + +data "google_compute_network" "default" { + name = "%{network_name}" +} +`, context) +} + func testAccAlloydbInstance_update(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_alloydb_instance" "default" { @@ -682,7 +703,7 @@ resource "google_alloydb_instance" "default" { client_connection_config { require_connectors = %{require_connectors} - } + } } resource "google_alloydb_cluster" "default" { @@ -719,7 +740,7 @@ resource "google_alloydb_instance" "default" { ssl_config { ssl_mode = "%{ssl_mode}" } - } + } } resource "google_alloydb_cluster" "default" { @@ -853,7 +874,7 @@ resource "google_alloydb_instance" "default" { enable_public_ip = %{enable_public_ip} enable_outbound_public_ip = %{enable_outbound_public_ip} %{authorized_external_networks} - } + } } resource "google_alloydb_cluster" "default" { @@ -893,7 +914,7 @@ resource "google_alloydb_instance" "default" { authorized_external_networks { cidr_range = "%{cidr_range}" } - } + } } resource "google_alloydb_cluster" "default" { @@ -1233,3 +1254,472 @@ data "google_compute_global_address" "private_ip_alloc" { } `, context) } + +// This test passes if an instance is able to do the following: +// - Be created with only managed connection pooling enabled +// - Be created with managed connection pooling enabled with some flags set +// - Be updated to disable managed connection pooling +// - Be updated to only enable managed connection pooling +// - Be updated to enable managed connection pooling and its flags +// - Be update to only update a few flags +func TestAccAlloydbInstance_connectionPoolConfig(t *testing.T) { + t.Parallel() + + suffix := acctest.RandString(t, 10) + networkName := acctest.BootstrapSharedServiceNetworkingConnection(t, "alloydbinstance-connection-pool-config") + + context := map[string]interface{}{ + "random_suffix": suffix, + "network_name": networkName, + "enabled": true, + "pool_mode": "transaction", + "max_pool_size": 1000, + "min_pool_size": 50, + "max_client_connections": 250, + "client_connection_idle_timeout": 60, + "server_connection_idle_timeout": 60, + "query_wait_timeout": 30, + "max_prepared_statements": 10, + "ignore_startup_parameters": "timezone,lc_monetary,icu_validation_level", + "server_lifetime": 600, + "stats_users": "foo,bar", + } + context2 := map[string]interface{}{ + "random_suffix": suffix, + "network_name": networkName, + "enabled": false, + } + context3 := map[string]interface{}{ + "random_suffix": suffix, + "network_name": networkName, + "enabled": true, + } + context4 := map[string]interface{}{ + "random_suffix": suffix, + "network_name": networkName, + "enabled": true, + "pool_mode": "session", + "min_pool_size": 100, + "query_wait_timeout": 120, + "ignore_startup_parameters": "timezone,icu_validation_level,client_encoding,datestyle,intervalstyle", + "stats_users": "bar,baz,qux", + } + context5 := map[string]interface{}{ + "random_suffix": suffix, + "network_name": networkName, + "enabled": true, + "pool_mode": "session", + "max_pool_size": 1000, + "min_pool_size": 100, + "max_client_connections": 250, + "client_connection_idle_timeout": 60, + "server_connection_idle_timeout": 60, + "query_wait_timeout": 120, + "max_prepared_statements": 10, + "ignore_startup_parameters": "timezone,icu_validation_level,client_encoding,datestyle,intervalstyle", + "server_lifetime": 600, + "stats_users": "bar,baz,qux", + } + context6 := map[string]interface{}{ + "random_suffix": suffix, + "network_name": networkName, + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckAlloydbInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccAlloydbInstance_connectionPoolConfigNoFlags(context3), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "true"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + Config: testAccAlloydbInstance_deleteInstance(context6), + Destroy: true, + }, + { + Config: testAccAlloydbInstance_connectionPoolConfigWithAllFlags(context), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "true"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.pool_mode", "transaction"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_pool_size", "1000"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.min_pool_size", "50"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_client_connections", "250"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.client_connection_idle_timeout", "60"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.server_connection_idle_timeout", "60"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.query_wait_timeout", "30"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_prepared_statements", "10"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.ignore_startup_parameters", "timezone,lc_monetary,icu_validation_level"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.server_lifetime", "600"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.stats_users", "foo,bar"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + Config: testAccAlloydbInstance_connectionPoolConfigNoFlags(context2), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "false"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + Config: testAccAlloydbInstance_connectionPoolConfigNoFlags(context3), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "true"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + Config: testAccAlloydbInstance_connectionPoolConfigWithAllFlags(context), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "true"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.pool_mode", "transaction"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_pool_size", "1000"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.min_pool_size", "50"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_client_connections", "250"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.client_connection_idle_timeout", "60"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.server_connection_idle_timeout", "60"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.query_wait_timeout", "30"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_prepared_statements", "10"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.ignore_startup_parameters", "timezone,lc_monetary,icu_validation_level"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.server_lifetime", "600"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.stats_users", "foo,bar"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + Config: testAccAlloydbInstance_connectionPoolConfigWithAllFlags(context5), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "true"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.pool_mode", "session"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_pool_size", "1000"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.min_pool_size", "100"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_client_connections", "250"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.client_connection_idle_timeout", "60"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.server_connection_idle_timeout", "60"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.query_wait_timeout", "120"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.max_prepared_statements", "10"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.ignore_startup_parameters", "timezone,icu_validation_level,client_encoding,datestyle,intervalstyle"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.server_lifetime", "600"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.stats_users", "bar,baz,qux"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + Config: testAccAlloydbInstance_connectionPoolConfigNoFlags(context2), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "false"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + { + Config: testAccAlloydbInstance_connectionPoolConfigWithSomeFlags(context4), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.enabled", "true"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.pool_mode", "session"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.min_pool_size", "100"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.query_wait_timeout", "120"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.ignore_startup_parameters", "timezone,icu_validation_level,client_encoding,datestyle,intervalstyle"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "connection_pool_config.0.flags.stats_users", "bar,baz,qux"), + ), + }, + { + ResourceName: "google_alloydb_instance.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cluster", "instance_id", "reconciling", "update_time"}, + }, + }, + }) +} + +func testAccAlloydbInstance_connectionPoolConfigNoFlags(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_alloydb_instance" "default" { + cluster = google_alloydb_cluster.default.name + instance_id = "tf-test-alloydb-instance%{random_suffix}" + instance_type = "PRIMARY" + connection_pool_config { + enabled = %{enabled} + } +} + +resource "google_alloydb_cluster" "default" { + cluster_id = "tf-test-alloydb-cluster%{random_suffix}" + location = "us-central1" + network_config { + network = data.google_compute_network.default.id + } + + deletion_protection = false +} + +data "google_project" "project" {} + +data "google_compute_network" "default" { + name = "%{network_name}" +} +`, context) +} + +func testAccAlloydbInstance_connectionPoolConfigWithAllFlags(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_alloydb_instance" "default" { + cluster = google_alloydb_cluster.default.name + instance_id = "tf-test-alloydb-instance%{random_suffix}" + instance_type = "PRIMARY" + connection_pool_config { + enabled = %{enabled} + flags = { + "pool_mode" = "%{pool_mode}" + "max_pool_size" = %{max_pool_size} + "min_pool_size" = %{min_pool_size} + "max_client_connections" = %{max_client_connections} + "client_connection_idle_timeout" = %{client_connection_idle_timeout} + "server_connection_idle_timeout" = %{server_connection_idle_timeout} + "query_wait_timeout" = %{query_wait_timeout} + "max_prepared_statements" = %{max_prepared_statements} + "ignore_startup_parameters" = "%{ignore_startup_parameters}" + "server_lifetime" = %{server_lifetime} + "stats_users" = "%{stats_users}" + } + } +} + +resource "google_alloydb_cluster" "default" { + cluster_id = "tf-test-alloydb-cluster%{random_suffix}" + location = "us-central1" + network_config { + network = data.google_compute_network.default.id + } + + deletion_protection = false +} + +data "google_project" "project" {} + +data "google_compute_network" "default" { + name = "%{network_name}" +} +`, context) +} + +func testAccAlloydbInstance_connectionPoolConfigWithSomeFlags(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_alloydb_instance" "default" { + cluster = google_alloydb_cluster.default.name + instance_id = "tf-test-alloydb-instance%{random_suffix}" + instance_type = "PRIMARY" + connection_pool_config { + enabled = %{enabled} + flags = { + "pool_mode" = "%{pool_mode}" + "min_pool_size" = %{min_pool_size} + "query_wait_timeout" = %{query_wait_timeout} + "ignore_startup_parameters" = "%{ignore_startup_parameters}" + "stats_users" = "%{stats_users}" + } + } +} + +resource "google_alloydb_cluster" "default" { + cluster_id = "tf-test-alloydb-cluster%{random_suffix}" + location = "us-central1" + network_config { + network = data.google_compute_network.default.id + } + + deletion_protection = false +} + +data "google_project" "project" {} + +data "google_compute_network" "default" { + name = "%{network_name}" +} +`, context) +} + +func TestAccAlloydbInstance_ObservabilityConfig_Update(t *testing.T) { + t.Parallel() + random_suffix := acctest.RandString(t, 10) + networkName := acctest.BootstrapSharedServiceNetworkingConnection(t, "alloydb-1") + + // 1. Initial State: Everything Enabled + contextEnableAll := map[string]interface{}{ + "random_suffix": random_suffix, + "network_name": networkName, + "enabled": true, + "preserve_comments": true, + "track_wait_events": true, + "max_query_string_length": 1024, + "record_application_tags": true, + "query_plans_per_minute": 10, + "track_active_queries": true, + "assistive_experiences_enabled": false, + } + + contextDisable := map[string]interface{}{ + "random_suffix": random_suffix, + "network_name": networkName, + } + + // 3. Re-Enable Main Toggle, but Disable Sub-features (Test Case 2) + contextEnabledButSubFeaturesDisabled := map[string]interface{}{ + "random_suffix": random_suffix, + "network_name": networkName, + "enabled": true, + "preserve_comments": false, + "track_wait_events": false, + "max_query_string_length": 2048, + "record_application_tags": false, + "query_plans_per_minute": 5, + "track_active_queries": false, + "assistive_experiences_enabled": false, + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckAlloydbInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccAlloydbInstance_ObservabilityConfig(contextEnableAll), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.enabled", "true"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.max_query_string_length", "1024"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.track_wait_events", "true"), + ), + }, + { + Config: testAccAlloydbInstance_ObservabilityConfig_Disabled(contextDisable), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.enabled", "false"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.max_query_string_length", "10240"), // Disabled default value + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.query_plans_per_minute", "20"), // default value + ), + }, + // Step 3: Mark enabled = true and turn all the other booleans to false + { + Config: testAccAlloydbInstance_ObservabilityConfig(contextEnabledButSubFeaturesDisabled), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.enabled", "true"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.preserve_comments", "false"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.track_wait_events", "false"), + resource.TestCheckResourceAttr("google_alloydb_instance.default", "observability_config.0.max_query_string_length", "2048"), + ), + }, + }, + }) +} + +func testAccAlloydbInstance_ObservabilityConfig_Disabled(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_alloydb_instance" "default" { + cluster = google_alloydb_cluster.default.name + instance_id = "tf-test-alloydb-instance%{random_suffix}" + instance_type = "PRIMARY" + machine_config { + cpu_count = 2 + } + observability_config { + enabled = false + } +} +resource "google_alloydb_cluster" "default" { + cluster_id = "tf-test-alloydb-cluster%{random_suffix}" + location = "us-central1" + network_config { + network = data.google_compute_network.default.id + } + initial_user { + password = "tf-test-alloydb-cluster%{random_suffix}" + } + deletion_protection = false +} +data "google_compute_network" "default" { + name = "%{network_name}" +} +`, context) +} +func testAccAlloydbInstance_ObservabilityConfig(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_alloydb_instance" "default" { + cluster = google_alloydb_cluster.default.name + instance_id = "tf-test-alloydb-instance%{random_suffix}" + instance_type = "PRIMARY" + machine_config { + cpu_count = 2 + } + observability_config { + enabled = %{enabled} + preserve_comments = %{preserve_comments} + track_wait_events = %{track_wait_events} + max_query_string_length = %{max_query_string_length} + record_application_tags = %{record_application_tags} + query_plans_per_minute = %{query_plans_per_minute} + track_active_queries = %{track_active_queries} + assistive_experiences_enabled = %{assistive_experiences_enabled} + } +} +resource "google_alloydb_cluster" "default" { + cluster_id = "tf-test-alloydb-cluster%{random_suffix}" + location = "us-central1" + network_config { + network = data.google_compute_network.default.id + } + initial_user { + password = "tf-test-alloydb-cluster%{random_suffix}" + } + deletion_protection = false +} +data "google_compute_network" "default" { + name = "%{network_name}" +} +`, context) +} diff --git a/google/services/alloydb/resource_alloydb_user_generated_meta.yaml b/google/services/alloydb/resource_alloydb_user_generated_meta.yaml index 038627552ff..c1f8042587a 100644 --- a/google/services/alloydb/resource_alloydb_user_generated_meta.yaml +++ b/google/services/alloydb/resource_alloydb_user_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_alloydb_user' -generation_type: 'mmv1' -source_file: 'products/alloydb/User.yaml' -api_service_name: 'alloydb.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'User' +resource: google_alloydb_user +generation_type: mmv1 +source_file: products/alloydb/User.yaml +api_service_name: alloydb.googleapis.com +api_version: v1 +api_resource_type_kind: User fields: - - field: 'cluster' - provider_only: true - - api_field: 'databaseRoles' - - api_field: 'name' - - api_field: 'password' - - api_field: 'password' - field: 'password_wo' - - field: 'password_wo_version' - provider_only: true - - field: 'user_id' - provider_only: true - - api_field: 'userType' + - field: cluster + provider_only: true + - api_field: databaseRoles + - api_field: name + - api_field: password + - api_field: password + field: password_wo + - field: password_wo_version + provider_only: true + - field: user_id + provider_only: true + - api_field: userType diff --git a/google/services/apigee/iam_apigee_environment_generated_test.go b/google/services/apigee/iam_apigee_environment_generated_test.go index 35764531c37..1c6b1fd14a9 100644 --- a/google/services/apigee/iam_apigee_environment_generated_test.go +++ b/google/services/apigee/iam_apigee_environment_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccApigeeEnvironmentIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_apigee_environment_iam_binding.foo", - ImportStateId: fmt.Sprintf("%s/environments/%s roles/viewer", fmt.Sprintf("organizations/tf-test%s", context["random_suffix"]), fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateApigeeEnvironmentIAMBindingStateID("google_apigee_environment_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccApigeeEnvironmentIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_apigee_environment_iam_binding.foo", - ImportStateId: fmt.Sprintf("%s/environments/%s roles/viewer", fmt.Sprintf("organizations/tf-test%s", context["random_suffix"]), fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateApigeeEnvironmentIAMBindingStateID("google_apigee_environment_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccApigeeEnvironmentIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_apigee_environment_iam_member.foo", - ImportStateId: fmt.Sprintf("%s/environments/%s roles/viewer user:admin@hashicorptest.com", fmt.Sprintf("organizations/tf-test%s", context["random_suffix"]), fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateApigeeEnvironmentIAMMemberStateID("google_apigee_environment_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccApigeeEnvironmentIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_apigee_environment_iam_policy.foo", - ImportStateId: fmt.Sprintf("%s/environments/%s", fmt.Sprintf("organizations/tf-test%s", context["random_suffix"]), fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateApigeeEnvironmentIAMPolicyStateID("google_apigee_environment_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccApigeeEnvironmentIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_apigee_environment_iam_policy.foo", - ImportStateId: fmt.Sprintf("%s/environments/%s", fmt.Sprintf("organizations/tf-test%s", context["random_suffix"]), fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateApigeeEnvironmentIAMPolicyStateID("google_apigee_environment_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -599,3 +600,54 @@ resource "google_apigee_environment_iam_binding" "foo" { } `, context) } + +func generateApigeeEnvironmentIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + org_id := rawState["org_id"] + env_id := tpgresource.GetResourceNameFromSelfLink(rawState["env_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/environments/%s", org_id, env_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateApigeeEnvironmentIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + org_id := rawState["org_id"] + env_id := tpgresource.GetResourceNameFromSelfLink(rawState["env_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/environments/%s", org_id, env_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateApigeeEnvironmentIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + org_id := rawState["org_id"] + env_id := tpgresource.GetResourceNameFromSelfLink(rawState["env_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/environments/%s", org_id, env_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/apigee/resource_apigee_addons_config_generated_meta.yaml b/google/services/apigee/resource_apigee_addons_config_generated_meta.yaml index 2d316511c9a..1b83f3a3cd9 100644 --- a/google/services/apigee/resource_apigee_addons_config_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_addons_config_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_apigee_addons_config' -generation_type: 'mmv1' -source_file: 'products/apigee/AddonsConfig.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AddonsConfig' +resource: google_apigee_addons_config +generation_type: mmv1 +source_file: products/apigee/AddonsConfig.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: AddonsConfig fields: - - api_field: 'addonsConfig.advancedApiOpsConfig.enabled' - - api_field: 'addonsConfig.apiSecurityConfig.enabled' - - api_field: 'addonsConfig.apiSecurityConfig.expiresAt' - - api_field: 'addonsConfig.connectorsPlatformConfig.enabled' - - api_field: 'addonsConfig.connectorsPlatformConfig.expiresAt' - - api_field: 'addonsConfig.integrationConfig.enabled' - - api_field: 'addonsConfig.monetizationConfig.enabled' - - field: 'org' - provider_only: true + - api_field: addonsConfig.advancedApiOpsConfig.enabled + - api_field: addonsConfig.apiSecurityConfig.enabled + - api_field: addonsConfig.apiSecurityConfig.expiresAt + - api_field: addonsConfig.connectorsPlatformConfig.enabled + - api_field: addonsConfig.connectorsPlatformConfig.expiresAt + - api_field: addonsConfig.integrationConfig.enabled + - api_field: addonsConfig.monetizationConfig.enabled + - field: org + provider_only: true diff --git a/google/services/apigee/resource_apigee_api_deployment_generated_meta.yaml b/google/services/apigee/resource_apigee_api_deployment_generated_meta.yaml index 7bda8a50052..3bb3404dc61 100644 --- a/google/services/apigee/resource_apigee_api_deployment_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_api_deployment_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_apigee_api_deployment' -generation_type: 'mmv1' -source_file: 'products/apigee/ApiDeployment.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ApiDeployment' +resource: google_apigee_api_deployment +generation_type: mmv1 +source_file: products/apigee/ApiDeployment.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: ApiDeployment fields: - - field: 'environment' - provider_only: true - - api_field: 'id' - - field: 'org_id' - provider_only: true - - field: 'proxy_id' - provider_only: true - - field: 'revision' - provider_only: true + - field: environment + provider_only: true + - api_field: id + - field: org_id + provider_only: true + - field: proxy_id + provider_only: true + - field: revision + provider_only: true diff --git a/google/services/apigee/resource_apigee_api_product_generated_meta.yaml b/google/services/apigee/resource_apigee_api_product_generated_meta.yaml index c2498d62c9e..a99bb112105 100644 --- a/google/services/apigee/resource_apigee_api_product_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_api_product_generated_meta.yaml @@ -1,52 +1,52 @@ -resource: 'google_apigee_api_product' -generation_type: 'mmv1' -source_file: 'products/apigee/ApiProduct.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ApiProduct' +resource: google_apigee_api_product +generation_type: mmv1 +source_file: products/apigee/ApiProduct.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: ApiProduct fields: - - api_field: 'apiResources' - - api_field: 'approvalType' - - api_field: 'attributes.name' - - api_field: 'attributes.value' - - api_field: 'createdAt' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'environments' - - api_field: 'graphqlOperationGroup.operationConfigType' - - api_field: 'graphqlOperationGroup.operationConfigs.apiSource' - - api_field: 'graphqlOperationGroup.operationConfigs.attributes.name' - - api_field: 'graphqlOperationGroup.operationConfigs.attributes.value' - - api_field: 'graphqlOperationGroup.operationConfigs.operations.operation' - - api_field: 'graphqlOperationGroup.operationConfigs.operations.operationTypes' - - api_field: 'graphqlOperationGroup.operationConfigs.quota.interval' - - api_field: 'graphqlOperationGroup.operationConfigs.quota.limit' - - api_field: 'graphqlOperationGroup.operationConfigs.quota.timeUnit' - - api_field: 'grpcOperationGroup.operationConfigs.apiSource' - - api_field: 'grpcOperationGroup.operationConfigs.attributes.name' - - api_field: 'grpcOperationGroup.operationConfigs.attributes.value' - - api_field: 'grpcOperationGroup.operationConfigs.methods' - - api_field: 'grpcOperationGroup.operationConfigs.quota.interval' - - api_field: 'grpcOperationGroup.operationConfigs.quota.limit' - - api_field: 'grpcOperationGroup.operationConfigs.quota.timeUnit' - - api_field: 'grpcOperationGroup.operationConfigs.service' - - api_field: 'lastModifiedAt' - - api_field: 'name' - - api_field: 'operationGroup.operationConfigType' - - api_field: 'operationGroup.operationConfigs.apiSource' - - api_field: 'operationGroup.operationConfigs.attributes.name' - - api_field: 'operationGroup.operationConfigs.attributes.value' - - api_field: 'operationGroup.operationConfigs.operations.methods' - - api_field: 'operationGroup.operationConfigs.operations.resource' - - api_field: 'operationGroup.operationConfigs.quota.interval' - - api_field: 'operationGroup.operationConfigs.quota.limit' - - api_field: 'operationGroup.operationConfigs.quota.timeUnit' - - field: 'org_id' - provider_only: true - - api_field: 'proxies' - - api_field: 'quota' - - api_field: 'quotaCounterScope' - - api_field: 'quotaInterval' - - api_field: 'quotaTimeUnit' - - api_field: 'scopes' - - api_field: 'space' + - api_field: apiResources + - api_field: approvalType + - api_field: attributes.name + - api_field: attributes.value + - api_field: createdAt + - api_field: description + - api_field: displayName + - api_field: environments + - api_field: graphqlOperationGroup.operationConfigType + - api_field: graphqlOperationGroup.operationConfigs.apiSource + - api_field: graphqlOperationGroup.operationConfigs.attributes.name + - api_field: graphqlOperationGroup.operationConfigs.attributes.value + - api_field: graphqlOperationGroup.operationConfigs.operations.operation + - api_field: graphqlOperationGroup.operationConfigs.operations.operationTypes + - api_field: graphqlOperationGroup.operationConfigs.quota.interval + - api_field: graphqlOperationGroup.operationConfigs.quota.limit + - api_field: graphqlOperationGroup.operationConfigs.quota.timeUnit + - api_field: grpcOperationGroup.operationConfigs.apiSource + - api_field: grpcOperationGroup.operationConfigs.attributes.name + - api_field: grpcOperationGroup.operationConfigs.attributes.value + - api_field: grpcOperationGroup.operationConfigs.methods + - api_field: grpcOperationGroup.operationConfigs.quota.interval + - api_field: grpcOperationGroup.operationConfigs.quota.limit + - api_field: grpcOperationGroup.operationConfigs.quota.timeUnit + - api_field: grpcOperationGroup.operationConfigs.service + - api_field: lastModifiedAt + - api_field: name + - api_field: operationGroup.operationConfigType + - api_field: operationGroup.operationConfigs.apiSource + - api_field: operationGroup.operationConfigs.attributes.name + - api_field: operationGroup.operationConfigs.attributes.value + - api_field: operationGroup.operationConfigs.operations.methods + - api_field: operationGroup.operationConfigs.operations.resource + - api_field: operationGroup.operationConfigs.quota.interval + - api_field: operationGroup.operationConfigs.quota.limit + - api_field: operationGroup.operationConfigs.quota.timeUnit + - field: org_id + provider_only: true + - api_field: proxies + - api_field: quota + - api_field: quotaCounterScope + - api_field: quotaInterval + - api_field: quotaTimeUnit + - api_field: scopes + - api_field: space diff --git a/google/services/apigee/resource_apigee_api_product_generated_test.go b/google/services/apigee/resource_apigee_api_product_generated_test.go index b17a8b40e29..71c13015f85 100644 --- a/google/services/apigee/resource_apigee_api_product_generated_test.go +++ b/google/services/apigee/resource_apigee_api_product_generated_test.go @@ -290,6 +290,17 @@ resource "google_apigee_instance" "apigee_instance" { peering_cidr_range = "SLASH_22" } +resource "google_apigee_environment" "env_dev" { + name = "dev" + org_id = google_apigee_organization.apigee_org.id +} + +resource "google_apigee_api" "test_apigee_api" { + name = "hello-world" + org_id = google_apigee_organization.apigee_org.name + config_bundle = "./test-fixtures/apigee_api_bundle.zip" +} + resource "google_apigee_api_product" "apigee_api_product" { org_id = google_apigee_organization.apigee_org.id name = "legacy-operation-api-product" @@ -304,7 +315,7 @@ resource "google_apigee_api_product" "apigee_api_product" { value = "private" } - environments = ["dev", "hom"] + environments = ["dev"] proxies = ["hello-world"] api_resources = [ "/", @@ -321,7 +332,9 @@ resource "google_apigee_api_product" "apigee_api_product" { quota_counter_scope = "PROXY" depends_on = [ - google_apigee_instance.apigee_instance + google_apigee_instance.apigee_instance, + google_apigee_environment.env_dev, + google_apigee_api.test_apigee_api ] } `, context) @@ -440,6 +453,11 @@ resource "google_apigee_instance" "apigee_instance" { peering_cidr_range = "SLASH_22" } +resource "google_apigee_environment" "env_dev" { + name = "dev" + org_id = google_apigee_organization.apigee_org.id +} + resource "google_apigee_api_product" "apigee_api_product" { org_id = google_apigee_organization.apigee_org.id name = "full-api-product" @@ -454,7 +472,7 @@ resource "google_apigee_api_product" "apigee_api_product" { quota_time_unit = "day" quota_counter_scope = "PROXY" - environments = ["dev", "hom"] + environments = ["dev"] scopes = [ "read:weather", "write:reports" @@ -596,7 +614,8 @@ resource "google_apigee_api_product" "apigee_api_product" { } depends_on = [ - google_apigee_instance.apigee_instance + google_apigee_instance.apigee_instance, + google_apigee_environment.env_dev ] } `, context) diff --git a/google/services/apigee/resource_apigee_api_product_update_test.go b/google/services/apigee/resource_apigee_api_product_update_test.go index 890664f5dcd..e96266c9842 100644 --- a/google/services/apigee/resource_apigee_api_product_update_test.go +++ b/google/services/apigee/resource_apigee_api_product_update_test.go @@ -134,6 +134,10 @@ resource "google_apigee_instance" "apigee_instance" { org_id = google_apigee_organization.apigee_org.id peering_cidr_range = "SLASH_22" } +resource "google_apigee_environment" "env_dev" { + name = "dev" + org_id = google_apigee_organization.apigee_org.id +} resource "google_apigee_api_product" "apigee_api_product" { org_id = google_apigee_organization.apigee_org.id name = "tf-test%{random_suffix}" @@ -148,7 +152,7 @@ resource "google_apigee_api_product" "apigee_api_product" { quota_time_unit = "day" quota_counter_scope = "PROXY" - environments = ["dev", "hom"] + environments = ["dev"] scopes = [ "read:weather", "write:reports" @@ -290,7 +294,8 @@ resource "google_apigee_api_product" "apigee_api_product" { } depends_on = [ - google_apigee_instance.apigee_instance + google_apigee_instance.apigee_instance, + google_apigee_environment.env_dev ] } `, context) @@ -372,6 +377,14 @@ resource "google_apigee_developer" "apigee_developer" { google_apigee_instance.apigee_instance ] } +resource "google_apigee_environment" "env_dev" { + name = "dev" + org_id = google_apigee_organization.apigee_org.id +} +resource "google_apigee_environment" "env_hom" { + name = "hom" + org_id = google_apigee_organization.apigee_org.id +} resource "google_apigee_api_product" "apigee_api_product" { org_id = google_apigee_organization.apigee_org.id name = "tf-test%{random_suffix}" @@ -386,7 +399,7 @@ resource "google_apigee_api_product" "apigee_api_product" { quota_time_unit = "day" quota_counter_scope = "PROXY" - environments = ["dev"] + environments = ["dev", "hom"] scopes = [ "read:weather" ] @@ -527,7 +540,9 @@ resource "google_apigee_api_product" "apigee_api_product" { } depends_on = [ - google_apigee_instance.apigee_instance + google_apigee_instance.apigee_instance, + google_apigee_environment.env_dev, + google_apigee_environment.env_hom ] } `, context) diff --git a/google/services/apigee/resource_apigee_app_group_generated_meta.yaml b/google/services/apigee/resource_apigee_app_group_generated_meta.yaml index edd0b786017..1737a1b6524 100644 --- a/google/services/apigee/resource_apigee_app_group_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_app_group_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_apigee_app_group' -generation_type: 'mmv1' -source_file: 'products/apigee/AppGroup.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AppGroup' +resource: google_apigee_app_group +generation_type: mmv1 +source_file: products/apigee/AppGroup.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: AppGroup fields: - - api_field: 'appGroupId' - - api_field: 'attributes.name' - - api_field: 'attributes.value' - - api_field: 'channelId' - - api_field: 'channelUri' - - api_field: 'createdAt' - - api_field: 'displayName' - - api_field: 'lastModifiedAt' - - api_field: 'name' - - field: 'org_id' - provider_only: true - - api_field: 'organization' - - api_field: 'status' + - api_field: appGroupId + - api_field: attributes.name + - api_field: attributes.value + - api_field: channelId + - api_field: channelUri + - api_field: createdAt + - api_field: displayName + - api_field: lastModifiedAt + - api_field: name + - field: org_id + provider_only: true + - api_field: organization + - api_field: status diff --git a/google/services/apigee/resource_apigee_control_plane_access_generated_meta.yaml b/google/services/apigee/resource_apigee_control_plane_access_generated_meta.yaml index 4c0ba32cc95..3fae818295d 100644 --- a/google/services/apigee/resource_apigee_control_plane_access_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_control_plane_access_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_apigee_control_plane_access' -generation_type: 'mmv1' -source_file: 'products/apigee/ControlPlaneAccess.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ControlPlaneAccess' +resource: google_apigee_control_plane_access +generation_type: mmv1 +source_file: products/apigee/ControlPlaneAccess.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: ControlPlaneAccess fields: - - api_field: 'analyticsPublisherIdentities' - - field: 'name' - provider_only: true - - api_field: 'synchronizerIdentities' + - api_field: analyticsPublisherIdentities + - field: name + provider_only: true + - api_field: synchronizerIdentities diff --git a/google/services/apigee/resource_apigee_developer_app_generated_meta.yaml b/google/services/apigee/resource_apigee_developer_app_generated_meta.yaml index d31acc8ed55..c20edd904ce 100644 --- a/google/services/apigee/resource_apigee_developer_app_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_developer_app_generated_meta.yaml @@ -1,34 +1,34 @@ -resource: 'google_apigee_developer_app' -generation_type: 'mmv1' -source_file: 'products/apigee/DeveloperApp.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DeveloperApp' +resource: google_apigee_developer_app +generation_type: mmv1 +source_file: products/apigee/DeveloperApp.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: DeveloperApp fields: - - api_field: 'apiProducts' - - api_field: 'appFamily' - - api_field: 'appId' - - api_field: 'attributes.name' - - api_field: 'attributes.value' - - api_field: 'callbackUrl' - - api_field: 'createdAt' - - api_field: 'credentials.apiProducts.apiproduct' - - api_field: 'credentials.apiProducts.status' - - api_field: 'credentials.attributes.name' - - api_field: 'credentials.attributes.value' - - api_field: 'credentials.consumerKey' - - api_field: 'credentials.consumerSecret' - - api_field: 'credentials.expiresAt' - - api_field: 'credentials.issuedAt' - - api_field: 'credentials.scopes' - - api_field: 'credentials.status' - - field: 'developer_email' - provider_only: true - - api_field: 'developerId' - - api_field: 'keyExpiresIn' - - api_field: 'lastModifiedAt' - - api_field: 'name' - - field: 'org_id' - provider_only: true - - api_field: 'scopes' - - api_field: 'status' + - api_field: apiProducts + - api_field: appFamily + - api_field: appId + - api_field: attributes.name + - api_field: attributes.value + - api_field: callbackUrl + - api_field: createdAt + - api_field: credentials.apiProducts.apiproduct + - api_field: credentials.apiProducts.status + - api_field: credentials.attributes.name + - api_field: credentials.attributes.value + - api_field: credentials.consumerKey + - api_field: credentials.consumerSecret + - api_field: credentials.expiresAt + - api_field: credentials.issuedAt + - api_field: credentials.scopes + - api_field: credentials.status + - field: developer_email + provider_only: true + - api_field: developerId + - api_field: keyExpiresIn + - api_field: lastModifiedAt + - api_field: name + - field: org_id + provider_only: true + - api_field: scopes + - api_field: status diff --git a/google/services/apigee/resource_apigee_developer_generated_meta.yaml b/google/services/apigee/resource_apigee_developer_generated_meta.yaml index cd308feed22..8764351b626 100644 --- a/google/services/apigee/resource_apigee_developer_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_developer_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_apigee_developer' -generation_type: 'mmv1' -source_file: 'products/apigee/Developer.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Developer' +resource: google_apigee_developer +generation_type: mmv1 +source_file: products/apigee/Developer.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Developer fields: - - api_field: 'attributes.name' - - api_field: 'attributes.value' - - api_field: 'createdAt' - - api_field: 'email' - - api_field: 'firstName' - - api_field: 'lastModifiedAt' - - api_field: 'lastName' - - field: 'org_id' - provider_only: true - - api_field: 'organizatioName' - - api_field: 'status' - - api_field: 'userName' + - api_field: attributes.name + - api_field: attributes.value + - api_field: createdAt + - api_field: email + - api_field: firstName + - api_field: lastModifiedAt + - api_field: lastName + - field: org_id + provider_only: true + - api_field: organizatioName + - api_field: status + - api_field: userName diff --git a/google/services/apigee/resource_apigee_dns_zone_generated_meta.yaml b/google/services/apigee/resource_apigee_dns_zone_generated_meta.yaml index 972f88c495e..2e794120fbe 100644 --- a/google/services/apigee/resource_apigee_dns_zone_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_dns_zone_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_apigee_dns_zone' -generation_type: 'mmv1' -source_file: 'products/apigee/DnsZone.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DnsZone' +resource: google_apigee_dns_zone +generation_type: mmv1 +source_file: products/apigee/DnsZone.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: DnsZone fields: - - api_field: 'description' - - field: 'dns_zone_id' - provider_only: true - - api_field: 'domain' - - api_field: 'name' - - field: 'org_id' - provider_only: true - - api_field: 'peeringConfig.targetNetworkId' - - api_field: 'peeringConfig.targetProjectId' + - api_field: description + - field: dns_zone_id + provider_only: true + - api_field: domain + - api_field: name + - field: org_id + provider_only: true + - api_field: peeringConfig.targetNetworkId + - api_field: peeringConfig.targetProjectId diff --git a/google/services/apigee/resource_apigee_endpoint_attachment_generated_meta.yaml b/google/services/apigee/resource_apigee_endpoint_attachment_generated_meta.yaml index 961d5b14317..c8d26f0faf6 100644 --- a/google/services/apigee/resource_apigee_endpoint_attachment_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_endpoint_attachment_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_apigee_endpoint_attachment' -generation_type: 'mmv1' -source_file: 'products/apigee/EndpointAttachment.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EndpointAttachment' +resource: google_apigee_endpoint_attachment +generation_type: mmv1 +source_file: products/apigee/EndpointAttachment.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: EndpointAttachment fields: - - api_field: 'connectionState' - - field: 'endpoint_attachment_id' - provider_only: true - - api_field: 'host' - - api_field: 'location' - - api_field: 'name' - - field: 'org_id' - provider_only: true - - api_field: 'serviceAttachment' + - api_field: connectionState + - field: endpoint_attachment_id + provider_only: true + - api_field: host + - api_field: location + - api_field: name + - field: org_id + provider_only: true + - api_field: serviceAttachment diff --git a/google/services/apigee/resource_apigee_env_keystore_generated_meta.yaml b/google/services/apigee/resource_apigee_env_keystore_generated_meta.yaml index 97338668766..234cb6967ec 100644 --- a/google/services/apigee/resource_apigee_env_keystore_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_env_keystore_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_apigee_env_keystore' -generation_type: 'mmv1' -source_file: 'products/apigee/EnvKeystore.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Keystore' +resource: google_apigee_env_keystore +generation_type: mmv1 +source_file: products/apigee/EnvKeystore.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Keystore fields: - - api_field: 'aliases' - - field: 'env_id' - provider_only: true - - api_field: 'name' + - api_field: aliases + - field: env_id + provider_only: true + - api_field: name diff --git a/google/services/apigee/resource_apigee_env_references_generated_meta.yaml b/google/services/apigee/resource_apigee_env_references_generated_meta.yaml index 5edc987d9be..09856d365af 100644 --- a/google/services/apigee/resource_apigee_env_references_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_env_references_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_apigee_env_references' -generation_type: 'mmv1' -source_file: 'products/apigee/EnvReferences.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Reference' +resource: google_apigee_env_references +generation_type: mmv1 +source_file: products/apigee/EnvReferences.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Reference fields: - - api_field: 'description' - - field: 'env_id' - provider_only: true - - api_field: 'name' - - api_field: 'refers' - - api_field: 'resourceType' + - api_field: description + - field: env_id + provider_only: true + - api_field: name + - api_field: refers + - api_field: resourceType diff --git a/google/services/apigee/resource_apigee_envgroup_attachment_generated_meta.yaml b/google/services/apigee/resource_apigee_envgroup_attachment_generated_meta.yaml index 1fc059a3400..806f4d3ad4c 100644 --- a/google/services/apigee/resource_apigee_envgroup_attachment_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_envgroup_attachment_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_apigee_envgroup_attachment' -generation_type: 'mmv1' -source_file: 'products/apigee/EnvgroupAttachment.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EnvironmentGroupAttachment' +resource: google_apigee_envgroup_attachment +generation_type: mmv1 +source_file: products/apigee/EnvgroupAttachment.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: EnvironmentGroupAttachment fields: - - field: 'envgroup_id' - provider_only: true - - api_field: 'environment' - - api_field: 'name' + - field: envgroup_id + provider_only: true + - api_field: environment + - api_field: name diff --git a/google/services/apigee/resource_apigee_envgroup_generated_meta.yaml b/google/services/apigee/resource_apigee_envgroup_generated_meta.yaml index dd7aedb17e2..a44c45243ec 100644 --- a/google/services/apigee/resource_apigee_envgroup_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_envgroup_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_apigee_envgroup' -generation_type: 'mmv1' -source_file: 'products/apigee/Envgroup.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EnvironmentGroup' +resource: google_apigee_envgroup +generation_type: mmv1 +source_file: products/apigee/Envgroup.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: EnvironmentGroup fields: - - api_field: 'hostnames' - - api_field: 'name' - - field: 'org_id' - provider_only: true + - api_field: hostnames + - api_field: name + - field: org_id + provider_only: true diff --git a/google/services/apigee/resource_apigee_environment_addons_config_generated_meta.yaml b/google/services/apigee/resource_apigee_environment_addons_config_generated_meta.yaml index 93f9fe91e0c..36ee4c6bdcc 100644 --- a/google/services/apigee/resource_apigee_environment_addons_config_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_environment_addons_config_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_apigee_environment_addons_config' -generation_type: 'mmv1' -source_file: 'products/apigee/EnvironmentAddonsConfig.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AddonsConfig' +resource: google_apigee_environment_addons_config +generation_type: mmv1 +source_file: products/apigee/EnvironmentAddonsConfig.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: AddonsConfig fields: - - api_field: 'analyticsEnabled' - - field: 'env_id' - provider_only: true + - api_field: analyticsEnabled + - field: env_id + provider_only: true diff --git a/google/services/apigee/resource_apigee_environment_api_revision_deployment_generated_meta.yaml b/google/services/apigee/resource_apigee_environment_api_revision_deployment_generated_meta.yaml index fb87be2ec49..970492b3b23 100644 --- a/google/services/apigee/resource_apigee_environment_api_revision_deployment_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_environment_api_revision_deployment_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_apigee_environment_api_revision_deployment' -generation_type: 'mmv1' -source_file: 'products/apigee/EnvironmentApiRevisionDeployment.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EnvironmentApiRevisionDeployment' +resource: google_apigee_environment_api_revision_deployment +generation_type: mmv1 +source_file: products/apigee/EnvironmentApiRevisionDeployment.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: EnvironmentApiRevisionDeployment fields: - - field: 'api' - provider_only: true - - api_field: 'basePath' - field: 'basepaths' - - api_field: 'deployStartTime' - - field: 'environment' - provider_only: true - - field: 'org_id' - provider_only: true - - field: 'override' - provider_only: true - - field: 'revision' - provider_only: true - - field: 'sequenced_rollout' - provider_only: true - - field: 'service_account' - provider_only: true - - api_field: 'state' + - field: api + provider_only: true + - api_field: basePath + field: basepaths + - api_field: deployStartTime + - field: environment + provider_only: true + - field: org_id + provider_only: true + - field: override + provider_only: true + - field: revision + provider_only: true + - field: sequenced_rollout + provider_only: true + - field: service_account + provider_only: true + - api_field: state diff --git a/google/services/apigee/resource_apigee_environment_generated_meta.yaml b/google/services/apigee/resource_apigee_environment_generated_meta.yaml index 478800e4857..1f5fc1768b7 100644 --- a/google/services/apigee/resource_apigee_environment_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_environment_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_apigee_environment' -generation_type: 'mmv1' -source_file: 'products/apigee/Environment.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Environment' +resource: google_apigee_environment +generation_type: mmv1 +source_file: products/apigee/Environment.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Environment fields: - - api_field: 'apiProxyType' - - api_field: 'clientIpResolutionConfig.headerIndexAlgorithm.ipHeaderIndex' - - api_field: 'clientIpResolutionConfig.headerIndexAlgorithm.ipHeaderName' - - api_field: 'deploymentType' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'forwardProxyUri' - - api_field: 'name' - - api_field: 'nodeConfig.currentAggregateNodeCount' - - api_field: 'nodeConfig.maxNodeCount' - - api_field: 'nodeConfig.minNodeCount' - - field: 'org_id' - provider_only: true - - api_field: 'properties.property.name' - - api_field: 'properties.property.value' - - api_field: 'type' + - api_field: apiProxyType + - api_field: clientIpResolutionConfig.headerIndexAlgorithm.ipHeaderIndex + - api_field: clientIpResolutionConfig.headerIndexAlgorithm.ipHeaderName + - api_field: deploymentType + - api_field: description + - api_field: displayName + - api_field: forwardProxyUri + - api_field: name + - api_field: nodeConfig.currentAggregateNodeCount + - api_field: nodeConfig.maxNodeCount + - api_field: nodeConfig.minNodeCount + - field: org_id + provider_only: true + - api_field: properties.property.name + - api_field: properties.property.value + - api_field: type diff --git a/google/services/apigee/resource_apigee_environment_keyvaluemaps_entries_generated_meta.yaml b/google/services/apigee/resource_apigee_environment_keyvaluemaps_entries_generated_meta.yaml index 1aecf6defd3..ad0772822c3 100644 --- a/google/services/apigee/resource_apigee_environment_keyvaluemaps_entries_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_environment_keyvaluemaps_entries_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_apigee_environment_keyvaluemaps_entries' -generation_type: 'mmv1' -source_file: 'products/apigee/EnvironmentKeyvaluemapsEntries.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'KeyValueEntry' +resource: google_apigee_environment_keyvaluemaps_entries +generation_type: mmv1 +source_file: products/apigee/EnvironmentKeyvaluemapsEntries.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: KeyValueEntry fields: - - field: 'env_keyvaluemap_id' - provider_only: true - - api_field: 'name' - - api_field: 'value' + - field: env_keyvaluemap_id + provider_only: true + - api_field: name + - api_field: value diff --git a/google/services/apigee/resource_apigee_environment_keyvaluemaps_generated_meta.yaml b/google/services/apigee/resource_apigee_environment_keyvaluemaps_generated_meta.yaml index 88fe8b012af..15816a6471e 100644 --- a/google/services/apigee/resource_apigee_environment_keyvaluemaps_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_environment_keyvaluemaps_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_apigee_environment_keyvaluemaps' -generation_type: 'mmv1' -source_file: 'products/apigee/EnvironmentKeyvaluemaps.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'KeyValueMap' +resource: google_apigee_environment_keyvaluemaps +generation_type: mmv1 +source_file: products/apigee/EnvironmentKeyvaluemaps.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: KeyValueMap fields: - - field: 'env_id' - provider_only: true - - api_field: 'name' + - field: env_id + provider_only: true + - api_field: name diff --git a/google/services/apigee/resource_apigee_instance_attachment_generated_meta.yaml b/google/services/apigee/resource_apigee_instance_attachment_generated_meta.yaml index 0a93015a644..0bbf1f2f165 100644 --- a/google/services/apigee/resource_apigee_instance_attachment_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_instance_attachment_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_apigee_instance_attachment' -generation_type: 'mmv1' -source_file: 'products/apigee/InstanceAttachment.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceAttachment' +resource: google_apigee_instance_attachment +generation_type: mmv1 +source_file: products/apigee/InstanceAttachment.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceAttachment fields: - - api_field: 'environment' - - field: 'instance_id' - provider_only: true - - api_field: 'name' + - api_field: environment + - field: instance_id + provider_only: true + - api_field: name diff --git a/google/services/apigee/resource_apigee_instance_generated_meta.yaml b/google/services/apigee/resource_apigee_instance_generated_meta.yaml index 1a0fe2ed024..7c919ef24a9 100644 --- a/google/services/apigee/resource_apigee_instance_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_instance_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_apigee_instance' -generation_type: 'mmv1' -source_file: 'products/apigee/Instance.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_apigee_instance +generation_type: mmv1 +source_file: products/apigee/Instance.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'accessLoggingConfig.enabled' - - api_field: 'accessLoggingConfig.filter' - - api_field: 'consumerAcceptList' - - api_field: 'description' - - api_field: 'diskEncryptionKeyName' - - api_field: 'displayName' - - api_field: 'host' - - api_field: 'ipRange' - - api_field: 'location' - - api_field: 'name' - - field: 'org_id' - provider_only: true - - api_field: 'peeringCidrRange' - - api_field: 'port' - - api_field: 'serviceAttachment' + - api_field: accessLoggingConfig.enabled + - api_field: accessLoggingConfig.filter + - api_field: consumerAcceptList + - api_field: description + - api_field: diskEncryptionKeyName + - api_field: displayName + - api_field: host + - api_field: ipRange + - api_field: location + - api_field: name + - field: org_id + provider_only: true + - api_field: peeringCidrRange + - api_field: port + - api_field: serviceAttachment diff --git a/google/services/apigee/resource_apigee_keystores_aliases_self_signed_cert_generated_meta.yaml b/google/services/apigee/resource_apigee_keystores_aliases_self_signed_cert_generated_meta.yaml index db89f265eaa..1d42fcd8c1d 100644 --- a/google/services/apigee/resource_apigee_keystores_aliases_self_signed_cert_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_keystores_aliases_self_signed_cert_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_apigee_keystores_aliases_self_signed_cert' -generation_type: 'mmv1' -source_file: 'products/apigee/KeystoresAliasesSelfSignedCert.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Alias' +resource: google_apigee_keystores_aliases_self_signed_cert +generation_type: mmv1 +source_file: products/apigee/KeystoresAliasesSelfSignedCert.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Alias fields: - - api_field: 'alias' - - api_field: 'certValidityInDays' - - api_field: 'certsInfo.certInfo.basicConstraints' - - api_field: 'certsInfo.certInfo.expiryDate' - - api_field: 'certsInfo.certInfo.isValid' - - api_field: 'certsInfo.certInfo.issuer' - - api_field: 'certsInfo.certInfo.publicKey' - - api_field: 'certsInfo.certInfo.serialNumber' - - api_field: 'certsInfo.certInfo.sigAlgName' - - api_field: 'certsInfo.certInfo.subject' - - api_field: 'certsInfo.certInfo.subjectAlternativeNames' - - api_field: 'certsInfo.certInfo.validFrom' - - api_field: 'certsInfo.certInfo.version' - - field: 'environment' - provider_only: true - - api_field: 'keySize' - - field: 'keystore' - provider_only: true - - field: 'org_id' - provider_only: true - - api_field: 'sigAlg' - - api_field: 'subject.commonName' - - api_field: 'subject.countryCode' - - api_field: 'subject.email' - - api_field: 'subject.locality' - - api_field: 'subject.org' - - api_field: 'subject.orgUnit' - - api_field: 'subject.state' - - api_field: 'subjectAlternativeDnsNames.subjectAlternativeName' - - api_field: 'type' + - api_field: alias + - api_field: certValidityInDays + - api_field: certsInfo.certInfo.basicConstraints + - api_field: certsInfo.certInfo.expiryDate + - api_field: certsInfo.certInfo.isValid + - api_field: certsInfo.certInfo.issuer + - api_field: certsInfo.certInfo.publicKey + - api_field: certsInfo.certInfo.serialNumber + - api_field: certsInfo.certInfo.sigAlgName + - api_field: certsInfo.certInfo.subject + - api_field: certsInfo.certInfo.subjectAlternativeNames + - api_field: certsInfo.certInfo.validFrom + - api_field: certsInfo.certInfo.version + - field: environment + provider_only: true + - api_field: keySize + - field: keystore + provider_only: true + - field: org_id + provider_only: true + - api_field: sigAlg + - api_field: subject.commonName + - api_field: subject.countryCode + - api_field: subject.email + - api_field: subject.locality + - api_field: subject.org + - api_field: subject.orgUnit + - api_field: subject.state + - api_field: subjectAlternativeDnsNames.subjectAlternativeName + - api_field: type diff --git a/google/services/apigee/resource_apigee_nat_address_generated_meta.yaml b/google/services/apigee/resource_apigee_nat_address_generated_meta.yaml index 88f327ebf09..6c1334db0f2 100644 --- a/google/services/apigee/resource_apigee_nat_address_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_nat_address_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_apigee_nat_address' -generation_type: 'mmv1' -source_file: 'products/apigee/NatAddress.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NatAddress' +resource: google_apigee_nat_address +generation_type: mmv1 +source_file: products/apigee/NatAddress.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: NatAddress fields: - - api_field: 'activate' - - field: 'instance_id' - provider_only: true - - api_field: 'ipAddress' - - api_field: 'name' - - api_field: 'state' + - api_field: activate + - field: instance_id + provider_only: true + - api_field: ipAddress + - api_field: name + - api_field: state diff --git a/google/services/apigee/resource_apigee_organization_generated_meta.yaml b/google/services/apigee/resource_apigee_organization_generated_meta.yaml index 063a674d951..61cffd4743c 100644 --- a/google/services/apigee/resource_apigee_organization_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_organization_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_apigee_organization' -generation_type: 'mmv1' -source_file: 'products/apigee/Organization.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Organization' +resource: google_apigee_organization +generation_type: mmv1 +source_file: products/apigee/Organization.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Organization fields: - - api_field: 'analyticsRegion' - - api_field: 'apiConsumerDataEncryptionKeyName' - - api_field: 'apiConsumerDataLocation' - - api_field: 'apigeeProjectId' - - api_field: 'authorizedNetwork' - - api_field: 'billingType' - - api_field: 'caCertificate' - - api_field: 'controlPlaneEncryptionKeyName' - - api_field: 'description' - - api_field: 'disableVpcPeering' - - api_field: 'displayName' - - api_field: 'name' - - field: 'project_id' - provider_only: true - - api_field: 'properties.property.name' - - api_field: 'properties.property.value' - - field: 'retention' - provider_only: true - - api_field: 'runtimeDatabaseEncryptionKeyName' - - api_field: 'runtimeType' - - api_field: 'subscriptionType' + - api_field: analyticsRegion + - api_field: apiConsumerDataEncryptionKeyName + - api_field: apiConsumerDataLocation + - api_field: apigeeProjectId + - api_field: authorizedNetwork + - api_field: billingType + - api_field: caCertificate + - api_field: controlPlaneEncryptionKeyName + - api_field: description + - api_field: disableVpcPeering + - api_field: displayName + - api_field: name + - field: project_id + provider_only: true + - api_field: properties.property.name + - api_field: properties.property.value + - field: retention + provider_only: true + - api_field: runtimeDatabaseEncryptionKeyName + - api_field: runtimeType + - api_field: subscriptionType diff --git a/google/services/apigee/resource_apigee_security_action_generated_meta.yaml b/google/services/apigee/resource_apigee_security_action_generated_meta.yaml index 1145f7add49..81005aba2c8 100644 --- a/google/services/apigee/resource_apigee_security_action_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_security_action_generated_meta.yaml @@ -1,35 +1,35 @@ -resource: 'google_apigee_security_action' -generation_type: 'mmv1' -source_file: 'products/apigee/SecurityAction.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityAction' +resource: google_apigee_security_action +generation_type: mmv1 +source_file: products/apigee/SecurityAction.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityAction fields: - - api_field: 'allow' - - api_field: 'apiProxies' - - api_field: 'conditionConfig.accessTokens' - - api_field: 'conditionConfig.apiKeys' - - api_field: 'conditionConfig.apiProducts' - - api_field: 'conditionConfig.asns' - - api_field: 'conditionConfig.botReasons' - - api_field: 'conditionConfig.developerApps' - - api_field: 'conditionConfig.developers' - - api_field: 'conditionConfig.httpMethods' - - api_field: 'conditionConfig.ipAddressRanges' - - api_field: 'conditionConfig.regionCodes' - - api_field: 'conditionConfig.userAgents' - - api_field: 'createTime' - - api_field: 'deny.responseCode' - - api_field: 'description' - - field: 'env_id' - provider_only: true - - api_field: 'expireTime' - - api_field: 'flag.headers.name' - - api_field: 'flag.headers.value' - - field: 'org_id' - provider_only: true - - field: 'security_action_id' - provider_only: true - - api_field: 'state' - - api_field: 'ttl' - - api_field: 'updateTime' + - api_field: allow + - api_field: apiProxies + - api_field: conditionConfig.accessTokens + - api_field: conditionConfig.apiKeys + - api_field: conditionConfig.apiProducts + - api_field: conditionConfig.asns + - api_field: conditionConfig.botReasons + - api_field: conditionConfig.developerApps + - api_field: conditionConfig.developers + - api_field: conditionConfig.httpMethods + - api_field: conditionConfig.ipAddressRanges + - api_field: conditionConfig.regionCodes + - api_field: conditionConfig.userAgents + - api_field: createTime + - api_field: deny.responseCode + - api_field: description + - field: env_id + provider_only: true + - api_field: expireTime + - api_field: flag.headers.name + - api_field: flag.headers.value + - field: org_id + provider_only: true + - field: security_action_id + provider_only: true + - api_field: state + - api_field: ttl + - api_field: updateTime diff --git a/google/services/apigee/resource_apigee_security_feedback.go b/google/services/apigee/resource_apigee_security_feedback.go new file mode 100644 index 00000000000..4fbe01b6051 --- /dev/null +++ b/google/services/apigee/resource_apigee_security_feedback.go @@ -0,0 +1,650 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/apigee/SecurityFeedback.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package apigee + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceApigeeSecurityFeedback() *schema.Resource { + return &schema.Resource{ + Create: resourceApigeeSecurityFeedbackCreate, + Read: resourceApigeeSecurityFeedbackRead, + Update: resourceApigeeSecurityFeedbackUpdate, + Delete: resourceApigeeSecurityFeedbackDelete, + + Importer: &schema.ResourceImporter{ + State: resourceApigeeSecurityFeedbackImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "org_id": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "feedback_id": { + Type: schema.TypeString, + RequiredForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "feedback_contexts": { + Type: schema.TypeList, + Required: true, + Description: `One or more attribute/value pairs for constraining the feedback.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "attribute": { + Type: schema.TypeString, + Required: true, + ValidateFunc: verify.ValidateEnum([]string{"ATTRIBUTE_ENVIRONMENTS", "ATTRIBUTE_IP_ADDRESS_RANGES"}), + Description: `The attribute the user is providing feedback about. Possible values: ["ATTRIBUTE_ENVIRONMENTS", "ATTRIBUTE_IP_ADDRESS_RANGES"]`, + }, + "values": { + Type: schema.TypeList, + Required: true, + Description: `The values of the attribute the user is providing feedback about, separated by commas.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "feedback_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `Resource ID of the security feedback.`, + }, + "feedback_type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: verify.ValidateEnum([]string{"EXCLUDED_DETECTION"}), + Description: `The type of feedback being submitted. Possible values: ["EXCLUDED_DETECTION"]`, + }, + "org_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The Apigee Organization associated with the Apigee Security Feedback, +in the format 'organizations/{{org_name}}'.`, + }, + "comment": { + Type: schema.TypeString, + Optional: true, + Description: `Optional text the user can provide for additional, unstructured context.`, + }, + "display_name": { + Type: schema.TypeString, + Optional: true, + Description: `The display name of the feedback.`, + }, + "reason": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: verify.ValidateEnum([]string{"INTERNAL_SYSTEM", "NON_RISK_CLIENT", "NAT", "PENETRATION_TEST", "OTHER", ""}), + Description: `The reason for the feedback. Possible values: ["INTERNAL_SYSTEM", "NON_RISK_CLIENT", "NAT", "PENETRATION_TEST", "OTHER"]`, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `The time when this specific feedback id was created.`, + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: `Name of the security feedback resource, +in the format 'organizations/{{org_name}}/securityFeedback/{{feedback_id}}'.`, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `The time when this specific feedback id was updated.`, + }, + }, + UseJSONNumber: true, + } +} + +func resourceApigeeSecurityFeedbackCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + displayNameProp, err := expandApigeeSecurityFeedbackDisplayName(d.Get("display_name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("display_name"); !tpgresource.IsEmptyValue(reflect.ValueOf(displayNameProp)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { + obj["displayName"] = displayNameProp + } + feedbackContextsProp, err := expandApigeeSecurityFeedbackFeedbackContexts(d.Get("feedback_contexts"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("feedback_contexts"); !tpgresource.IsEmptyValue(reflect.ValueOf(feedbackContextsProp)) && (ok || !reflect.DeepEqual(v, feedbackContextsProp)) { + obj["feedbackContexts"] = feedbackContextsProp + } + feedbackTypeProp, err := expandApigeeSecurityFeedbackFeedbackType(d.Get("feedback_type"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("feedback_type"); !tpgresource.IsEmptyValue(reflect.ValueOf(feedbackTypeProp)) && (ok || !reflect.DeepEqual(v, feedbackTypeProp)) { + obj["feedbackType"] = feedbackTypeProp + } + reasonProp, err := expandApigeeSecurityFeedbackReason(d.Get("reason"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("reason"); !tpgresource.IsEmptyValue(reflect.ValueOf(reasonProp)) && (ok || !reflect.DeepEqual(v, reasonProp)) { + obj["reason"] = reasonProp + } + commentProp, err := expandApigeeSecurityFeedbackComment(d.Get("comment"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("comment"); !tpgresource.IsEmptyValue(reflect.ValueOf(commentProp)) && (ok || !reflect.DeepEqual(v, commentProp)) { + obj["comment"] = commentProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ApigeeBasePath}}{{org_id}}/securityFeedback?security_feedback_id={{feedback_id}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new SecurityFeedback: %#v", obj) + billingProject := "" + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating SecurityFeedback: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "{{org_id}}/securityFeedback/{{feedback_id}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if orgIdValue, ok := d.GetOk("org_id"); ok && orgIdValue.(string) != "" { + if err = identity.Set("org_id", orgIdValue.(string)); err != nil { + return fmt.Errorf("Error setting org_id: %s", err) + } + } + if feedbackIdValue, ok := d.GetOk("feedback_id"); ok && feedbackIdValue.(string) != "" { + if err = identity.Set("feedback_id", feedbackIdValue.(string)); err != nil { + return fmt.Errorf("Error setting feedback_id: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + log.Printf("[DEBUG] Finished creating SecurityFeedback %q: %#v", d.Id(), res) + + return resourceApigeeSecurityFeedbackRead(d, meta) +} + +func resourceApigeeSecurityFeedbackRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ApigeeBasePath}}{{org_id}}/securityFeedback/{{feedback_id}}") + if err != nil { + return err + } + + billingProject := "" + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("ApigeeSecurityFeedback %q", d.Id())) + } + + if err := d.Set("name", flattenApigeeSecurityFeedbackName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + if err := d.Set("display_name", flattenApigeeSecurityFeedbackDisplayName(res["displayName"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + if err := d.Set("feedback_contexts", flattenApigeeSecurityFeedbackFeedbackContexts(res["feedbackContexts"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + if err := d.Set("feedback_type", flattenApigeeSecurityFeedbackFeedbackType(res["feedbackType"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + if err := d.Set("create_time", flattenApigeeSecurityFeedbackCreateTime(res["createTime"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + if err := d.Set("update_time", flattenApigeeSecurityFeedbackUpdateTime(res["updateTime"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + if err := d.Set("reason", flattenApigeeSecurityFeedbackReason(res["reason"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + if err := d.Set("comment", flattenApigeeSecurityFeedbackComment(res["comment"], d, config)); err != nil { + return fmt.Errorf("Error reading SecurityFeedback: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("org_id"); !ok && v == "" { + err = identity.Set("org_id", d.Get("org_id").(string)) + if err != nil { + return fmt.Errorf("Error setting org_id: %s", err) + } + } + if v, ok := identity.GetOk("feedback_id"); !ok && v == "" { + err = identity.Set("feedback_id", d.Get("feedback_id").(string)) + if err != nil { + return fmt.Errorf("Error setting feedback_id: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceApigeeSecurityFeedbackUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if orgIdValue, ok := d.GetOk("org_id"); ok && orgIdValue.(string) != "" { + if err = identity.Set("org_id", orgIdValue.(string)); err != nil { + return fmt.Errorf("Error setting org_id: %s", err) + } + } + if feedbackIdValue, ok := d.GetOk("feedback_id"); ok && feedbackIdValue.(string) != "" { + if err = identity.Set("feedback_id", feedbackIdValue.(string)); err != nil { + return fmt.Errorf("Error setting feedback_id: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + obj := make(map[string]interface{}) + displayNameProp, err := expandApigeeSecurityFeedbackDisplayName(d.Get("display_name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("display_name"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, displayNameProp)) { + obj["displayName"] = displayNameProp + } + feedbackContextsProp, err := expandApigeeSecurityFeedbackFeedbackContexts(d.Get("feedback_contexts"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("feedback_contexts"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, feedbackContextsProp)) { + obj["feedbackContexts"] = feedbackContextsProp + } + feedbackTypeProp, err := expandApigeeSecurityFeedbackFeedbackType(d.Get("feedback_type"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("feedback_type"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, feedbackTypeProp)) { + obj["feedbackType"] = feedbackTypeProp + } + reasonProp, err := expandApigeeSecurityFeedbackReason(d.Get("reason"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("reason"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, reasonProp)) { + obj["reason"] = reasonProp + } + commentProp, err := expandApigeeSecurityFeedbackComment(d.Get("comment"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("comment"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, commentProp)) { + obj["comment"] = commentProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ApigeeBasePath}}{{org_id}}/securityFeedback/{{feedback_id}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating SecurityFeedback %q: %#v", d.Id(), obj) + headers := make(http.Header) + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating SecurityFeedback %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating SecurityFeedback %q: %#v", d.Id(), res) + } + + return resourceApigeeSecurityFeedbackRead(d, meta) +} + +func resourceApigeeSecurityFeedbackDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + url, err := tpgresource.ReplaceVars(d, config, "{{ApigeeBasePath}}{{org_id}}/securityFeedback/{{feedback_id}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting SecurityFeedback %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "SecurityFeedback") + } + + log.Printf("[DEBUG] Finished deleting SecurityFeedback %q: %#v", d.Id(), res) + return nil +} + +func resourceApigeeSecurityFeedbackImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + + // current import_formats cannot import fields with forward slashes in their value + if err := tpgresource.ParseImportId([]string{"(?P.+)"}, d, config); err != nil { + return nil, err + } + + nameParts := strings.Split(d.Get("name").(string), "/") + if len(nameParts) == 4 { + // `organizations/{{org_name}}/securityFeedback/{{feedback_id}}` + orgId := fmt.Sprintf("organizations/%s", nameParts[1]) + if err := d.Set("org_id", orgId); err != nil { + return nil, fmt.Errorf("Error setting org_id: %s", err) + } + if err := d.Set("feedback_id", nameParts[3]); err != nil { + return nil, fmt.Errorf("Error setting feedback_id: %s", err) + } + } else { + return nil, fmt.Errorf( + "Saw %s when the name is expected to have shape %s", + d.Get("name"), + "organizations/{{org_name}}/securityFeedback/{{name}}") + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "{{org_id}}/securityFeedback/{{feedback_id}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenApigeeSecurityFeedbackName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackDisplayName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackFeedbackContexts(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "attribute": flattenApigeeSecurityFeedbackFeedbackContextsAttribute(original["attribute"], d, config), + "values": flattenApigeeSecurityFeedbackFeedbackContextsValues(original["values"], d, config), + }) + } + return transformed +} +func flattenApigeeSecurityFeedbackFeedbackContextsAttribute(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackFeedbackContextsValues(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackFeedbackType(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackReason(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApigeeSecurityFeedbackComment(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandApigeeSecurityFeedbackDisplayName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandApigeeSecurityFeedbackFeedbackContexts(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + req := make([]interface{}, 0, len(l)) + for _, raw := range l { + if raw == nil { + continue + } + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedAttribute, err := expandApigeeSecurityFeedbackFeedbackContextsAttribute(original["attribute"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedAttribute); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["attribute"] = transformedAttribute + } + + transformedValues, err := expandApigeeSecurityFeedbackFeedbackContextsValues(original["values"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedValues); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["values"] = transformedValues + } + + req = append(req, transformed) + } + return req, nil +} + +func expandApigeeSecurityFeedbackFeedbackContextsAttribute(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandApigeeSecurityFeedbackFeedbackContextsValues(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandApigeeSecurityFeedbackFeedbackType(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandApigeeSecurityFeedbackReason(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandApigeeSecurityFeedbackComment(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} diff --git a/google/services/apigee/resource_apigee_security_feedback_generated_meta.yaml b/google/services/apigee/resource_apigee_security_feedback_generated_meta.yaml new file mode 100644 index 00000000000..99decb74709 --- /dev/null +++ b/google/services/apigee/resource_apigee_security_feedback_generated_meta.yaml @@ -0,0 +1,20 @@ +resource: google_apigee_security_feedback +generation_type: mmv1 +source_file: products/apigee/SecurityFeedback.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityFeedback +fields: + - api_field: comment + - api_field: createTime + - api_field: displayName + - api_field: feedbackContexts.attribute + - api_field: feedbackContexts.values + - field: feedback_id + provider_only: true + - api_field: feedbackType + - api_field: name + - field: org_id + provider_only: true + - api_field: reason + - api_field: updateTime diff --git a/google/services/apigee/resource_apigee_security_feedback_generated_test.go b/google/services/apigee/resource_apigee_security_feedback_generated_test.go new file mode 100644 index 00000000000..5571a841d3e --- /dev/null +++ b/google/services/apigee/resource_apigee_security_feedback_generated_test.go @@ -0,0 +1,234 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package apigee_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccApigeeSecurityFeedback_apigeeSecurityFeedbackBasicTestExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "billing_account": envvar.GetTestBillingAccountFromEnv(t), + "org_id": envvar.GetTestOrgFromEnv(t), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + ExternalProviders: map[string]resource.ExternalProvider{ + "time": {}, + }, + CheckDestroy: testAccCheckApigeeSecurityFeedbackDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccApigeeSecurityFeedback_apigeeSecurityFeedbackBasicTestExample(context), + }, + { + ResourceName: "google_apigee_security_feedback.security_feedback", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"feedback_id", "org_id"}, + }, + { + ResourceName: "google_apigee_security_feedback.security_feedback", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccApigeeSecurityFeedback_apigeeSecurityFeedbackBasicTestExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_project" "project" { + project_id = "tf-test%{random_suffix}" + name = "tf-test%{random_suffix}" + org_id = "%{org_id}" + billing_account = "%{billing_account}" + deletion_policy = "DELETE" +} + +resource "time_sleep" "wait_60_seconds" { + create_duration = "60s" + depends_on = [google_project.project] +} + +resource "google_project_service" "apigee" { + project = google_project.project.project_id + service = "apigee.googleapis.com" + depends_on = [time_sleep.wait_60_seconds] +} + +resource "google_project_service" "servicenetworking" { + project = google_project.project.project_id + service = "servicenetworking.googleapis.com" + depends_on = [google_project_service.apigee] +} +resource "time_sleep" "wait_120_seconds" { + create_duration = "120s" + depends_on = [google_project_service.servicenetworking] +} +resource "google_project_service" "compute" { + project = google_project.project.project_id + service = "compute.googleapis.com" + depends_on = [google_project_service.servicenetworking] +} + +resource "google_compute_network" "apigee_network" { + name = "apigee-network" + project = google_project.project.project_id + depends_on = [google_project_service.compute, time_sleep.wait_120_seconds] +} + +resource "google_compute_global_address" "apigee_range" { + name = "apigee-range" + purpose = "VPC_PEERING" + address_type = "INTERNAL" + prefix_length = 16 + network = google_compute_network.apigee_network.id + project = google_project.project.project_id +} + +resource "google_service_networking_connection" "apigee_vpc_connection" { + network = google_compute_network.apigee_network.id + service = "servicenetworking.googleapis.com" + reserved_peering_ranges = [google_compute_global_address.apigee_range.name] + depends_on = [google_project_service.servicenetworking] +} + +resource "google_apigee_organization" "apigee_org" { + analytics_region = "us-central1" + project_id = google_project.project.project_id + authorized_network = google_compute_network.apigee_network.id + depends_on = [ + google_service_networking_connection.apigee_vpc_connection, + google_project_service.apigee, + ] +} + +resource "google_apigee_environment" "apigee_environment" { + org_id = google_apigee_organization.apigee_org.id + name = "tf-test-env-%{random_suffix}" + description = "Apigee Environment" + display_name = "environment-1" +} + +resource "google_apigee_addons_config" "apigee_org_security_addons_config" { + org = google_apigee_organization.apigee_org.name + addons_config { + api_security_config { + enabled = true + } + } +} + +resource "google_apigee_security_feedback" "security_feedback" { + org_id = google_apigee_organization.apigee_org.id + feedback_id = "tf-test-feedback-id" + display_name = "Exclude internal test systems" + feedback_type = "EXCLUDED_DETECTION" + reason = "INTERNAL_SYSTEM" + comment = "Excluding IP ranges and environments used by internal QA." + + feedback_contexts { + attribute = "ATTRIBUTE_ENVIRONMENTS" + values = [google_apigee_environment.apigee_environment.name] + } + feedback_contexts { + attribute = "ATTRIBUTE_IP_ADDRESS_RANGES" + values = ["10.0.0.0", "172.16.0.0/12"] + } + + depends_on = [ + google_apigee_addons_config.apigee_org_security_addons_config + ] +} +`, context) +} + +func testAccCheckApigeeSecurityFeedbackDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_apigee_security_feedback" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{ApigeeBasePath}}{{org_id}}/securityFeedback/{{feedback_id}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("ApigeeSecurityFeedback still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/apigee/resource_apigee_security_monitoring_condition_generated_meta.yaml b/google/services/apigee/resource_apigee_security_monitoring_condition_generated_meta.yaml index 9b16919b67e..34b813a20b8 100644 --- a/google/services/apigee/resource_apigee_security_monitoring_condition_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_security_monitoring_condition_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_apigee_security_monitoring_condition' -generation_type: 'mmv1' -source_file: 'products/apigee/SecurityMonitoringCondition.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityMonitoringCondition' +resource: google_apigee_security_monitoring_condition +generation_type: mmv1 +source_file: products/apigee/SecurityMonitoringCondition.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityMonitoringCondition fields: - - field: 'condition_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'includeAllResources' - - api_field: 'name' - - field: 'org_id' - provider_only: true - - api_field: 'profile' - - api_field: 'scope' - - api_field: 'totalDeployedResources' - - api_field: 'totalMonitoredResources' - - api_field: 'updateTime' + - field: condition_id + provider_only: true + - api_field: createTime + - api_field: includeAllResources + - api_field: name + - field: org_id + provider_only: true + - api_field: profile + - api_field: scope + - api_field: totalDeployedResources + - api_field: totalMonitoredResources + - api_field: updateTime diff --git a/google/services/apigee/resource_apigee_security_profile_v2_generated_meta.yaml b/google/services/apigee/resource_apigee_security_profile_v2_generated_meta.yaml index aa707afcbb8..c20814fc243 100644 --- a/google/services/apigee/resource_apigee_security_profile_v2_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_security_profile_v2_generated_meta.yaml @@ -1,16 +1,19 @@ -resource: 'google_apigee_security_profile_v2' -generation_type: 'mmv1' -source_file: 'products/apigee/SecurityProfileV2.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityProfileV2' +resource: google_apigee_security_profile_v2 +generation_type: mmv1 +source_file: products/apigee/SecurityProfileV2.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityProfileV2 fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'name' - - field: 'org_id' - provider_only: true - - api_field: 'profileAssessmentConfigs.profileAssessmentConfig.weight' - - field: 'profile_id' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: name + - field: org_id + provider_only: true + - api_field: profileAssessmentConfigs.key + field: profile_assessment_configs.assessment + - api_field: profileAssessmentConfigs.value.weight + field: profile_assessment_configs.weight + - field: profile_id + provider_only: true + - api_field: updateTime diff --git a/google/services/apigee/resource_apigee_sync_authorization_generated_meta.yaml b/google/services/apigee/resource_apigee_sync_authorization_generated_meta.yaml index a0d8ccf9564..ae077668e77 100644 --- a/google/services/apigee/resource_apigee_sync_authorization_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_sync_authorization_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_apigee_sync_authorization' -generation_type: 'mmv1' -source_file: 'products/apigee/SyncAuthorization.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Organization' +resource: google_apigee_sync_authorization +generation_type: mmv1 +source_file: products/apigee/SyncAuthorization.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: Organization fields: - - api_field: 'etag' - - api_field: 'identities' - - field: 'name' - provider_only: true + - api_field: etag + - api_field: identities + - field: name + provider_only: true diff --git a/google/services/apigee/resource_apigee_target_server_generated_meta.yaml b/google/services/apigee/resource_apigee_target_server_generated_meta.yaml index 05aa529fcb0..9c90e511d0a 100644 --- a/google/services/apigee/resource_apigee_target_server_generated_meta.yaml +++ b/google/services/apigee/resource_apigee_target_server_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_apigee_target_server' -generation_type: 'mmv1' -source_file: 'products/apigee/TargetServer.yaml' -api_service_name: 'apigee.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetServer' +resource: google_apigee_target_server +generation_type: mmv1 +source_file: products/apigee/TargetServer.yaml +api_service_name: apigee.googleapis.com +api_version: v1 +api_resource_type_kind: TargetServer fields: - - api_field: 'description' - - field: 'env_id' - provider_only: true - - api_field: 'host' - - api_field: 'isEnabled' - - api_field: 'name' - - api_field: 'port' - - api_field: 'protocol' - - api_field: 'sSLInfo.ciphers' - - api_field: 'sSLInfo.clientAuthEnabled' - - api_field: 'sSLInfo.commonName.value' - - api_field: 'sSLInfo.commonName.wildcardMatch' - - api_field: 'sSLInfo.enabled' - - api_field: 'sSLInfo.enforce' - - api_field: 'sSLInfo.ignoreValidationErrors' - - api_field: 'sSLInfo.keyAlias' - - api_field: 'sSLInfo.keyStore' - - api_field: 'sSLInfo.protocols' - - api_field: 'sSLInfo.trustStore' + - api_field: description + - field: env_id + provider_only: true + - api_field: host + - api_field: isEnabled + - api_field: name + - api_field: port + - api_field: protocol + - api_field: sSLInfo.ciphers + - api_field: sSLInfo.clientAuthEnabled + - api_field: sSLInfo.commonName.value + - api_field: sSLInfo.commonName.wildcardMatch + - api_field: sSLInfo.enabled + - api_field: sSLInfo.enforce + - api_field: sSLInfo.ignoreValidationErrors + - api_field: sSLInfo.keyAlias + - api_field: sSLInfo.keyStore + - api_field: sSLInfo.protocols + - api_field: sSLInfo.trustStore diff --git a/google/services/apihub/resource_apihub_api_hub_instance_generated_meta.yaml b/google/services/apihub/resource_apihub_api_hub_instance_generated_meta.yaml index 45351ab83bd..d22731847d8 100644 --- a/google/services/apihub/resource_apihub_api_hub_instance_generated_meta.yaml +++ b/google/services/apihub/resource_apihub_api_hub_instance_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_apihub_api_hub_instance' -generation_type: 'mmv1' -source_file: 'products/apihub/ApiHubInstance.yaml' -api_service_name: 'apihub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ApiHubInstance' +resource: google_apihub_api_hub_instance +generation_type: mmv1 +source_file: products/apihub/ApiHubInstance.yaml +api_service_name: apihub.googleapis.com +api_version: v1 +api_resource_type_kind: ApiHubInstance autogen_status: true fields: - - field: 'api_hub_instance_id' - provider_only: true - - api_field: 'config.cmekKeyName' - - api_field: 'config.disableSearch' - - api_field: 'config.encryptionType' - - api_field: 'config.vertexLocation' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'state' - - api_field: 'stateMessage' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: api_hub_instance_id + provider_only: true + - api_field: config.cmekKeyName + - api_field: config.disableSearch + - api_field: config.encryptionType + - api_field: config.vertexLocation + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: state + - api_field: stateMessage + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/apihub/resource_apihub_curation_generated_meta.yaml b/google/services/apihub/resource_apihub_curation_generated_meta.yaml index 95157bbafe4..30fd9d02ef0 100644 --- a/google/services/apihub/resource_apihub_curation_generated_meta.yaml +++ b/google/services/apihub/resource_apihub_curation_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_apihub_curation' -generation_type: 'mmv1' -source_file: 'products/apihub/Curation.yaml' -api_service_name: 'apihub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Curation' +resource: google_apihub_curation +generation_type: mmv1 +source_file: products/apihub/Curation.yaml +api_service_name: apihub.googleapis.com +api_version: v1 +api_resource_type_kind: Curation autogen_status: true fields: - - api_field: 'createTime' - - field: 'curation_id' - provider_only: true - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'endpoint.applicationIntegrationEndpointDetails.triggerId' - - api_field: 'endpoint.applicationIntegrationEndpointDetails.uri' - - api_field: 'lastExecutionErrorCode' - - api_field: 'lastExecutionErrorMessage' - - api_field: 'lastExecutionState' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'pluginInstanceActions.actionId' - - api_field: 'pluginInstanceActions.pluginInstance' - - api_field: 'updateTime' + - api_field: createTime + - field: curation_id + provider_only: true + - api_field: description + - api_field: displayName + - api_field: endpoint.applicationIntegrationEndpointDetails.triggerId + - api_field: endpoint.applicationIntegrationEndpointDetails.uri + - api_field: lastExecutionErrorCode + - api_field: lastExecutionErrorMessage + - api_field: lastExecutionState + - field: location + provider_only: true + - api_field: name + - api_field: pluginInstanceActions.actionId + - api_field: pluginInstanceActions.pluginInstance + - api_field: updateTime diff --git a/google/services/apihub/resource_apihub_host_project_registration_generated_meta.yaml b/google/services/apihub/resource_apihub_host_project_registration_generated_meta.yaml index 37140832394..e88d980d47f 100644 --- a/google/services/apihub/resource_apihub_host_project_registration_generated_meta.yaml +++ b/google/services/apihub/resource_apihub_host_project_registration_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_apihub_host_project_registration' -generation_type: 'mmv1' -source_file: 'products/apihub/HostProjectRegistration.yaml' -api_service_name: 'apihub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HostProjectRegistration' +resource: google_apihub_host_project_registration +generation_type: mmv1 +source_file: products/apihub/HostProjectRegistration.yaml +api_service_name: apihub.googleapis.com +api_version: v1 +api_resource_type_kind: HostProjectRegistration api_variant_patterns: - - 'projects/{project}/locations/{location}/hostProjectRegistrations/{hostproject}' + - projects/{project}/locations/{location}/hostProjectRegistrations/{hostproject} autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'gcpProject' - - field: 'host_project_registration_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' + - api_field: createTime + - api_field: gcpProject + - field: host_project_registration_id + provider_only: true + - field: location + provider_only: true + - api_field: name diff --git a/google/services/apihub/resource_apihub_plugin_generated_meta.yaml b/google/services/apihub/resource_apihub_plugin_generated_meta.yaml index 41fa79018a1..f20c092e4d8 100644 --- a/google/services/apihub/resource_apihub_plugin_generated_meta.yaml +++ b/google/services/apihub/resource_apihub_plugin_generated_meta.yaml @@ -1,39 +1,39 @@ -resource: 'google_apihub_plugin' -generation_type: 'mmv1' -source_file: 'products/apihub/Plugin.yaml' -api_service_name: 'apihub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Plugin' +resource: google_apihub_plugin +generation_type: mmv1 +source_file: products/apihub/Plugin.yaml +api_service_name: apihub.googleapis.com +api_version: v1 +api_resource_type_kind: Plugin autogen_status: true fields: - - api_field: 'actionsConfig.description' - - api_field: 'actionsConfig.displayName' - - api_field: 'actionsConfig.id' - - api_field: 'actionsConfig.triggerMode' - - api_field: 'configTemplate.additionalConfigTemplate.description' - - api_field: 'configTemplate.additionalConfigTemplate.enumOptions.description' - - api_field: 'configTemplate.additionalConfigTemplate.enumOptions.displayName' - - api_field: 'configTemplate.additionalConfigTemplate.enumOptions.id' - - api_field: 'configTemplate.additionalConfigTemplate.id' - - api_field: 'configTemplate.additionalConfigTemplate.multiSelectOptions.description' - - api_field: 'configTemplate.additionalConfigTemplate.multiSelectOptions.displayName' - - api_field: 'configTemplate.additionalConfigTemplate.multiSelectOptions.id' - - api_field: 'configTemplate.additionalConfigTemplate.required' - - api_field: 'configTemplate.additionalConfigTemplate.validationRegex' - - api_field: 'configTemplate.additionalConfigTemplate.valueType' - - api_field: 'configTemplate.authConfigTemplate.serviceAccount.serviceAccount' - - api_field: 'configTemplate.authConfigTemplate.supportedAuthTypes' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'documentation.externalUri' - - api_field: 'hostingService.serviceUri' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'ownershipType' - - api_field: 'pluginCategory' - - field: 'plugin_id' - provider_only: true - - api_field: 'state' - - api_field: 'updateTime' + - api_field: actionsConfig.description + - api_field: actionsConfig.displayName + - api_field: actionsConfig.id + - api_field: actionsConfig.triggerMode + - api_field: configTemplate.additionalConfigTemplate.description + - api_field: configTemplate.additionalConfigTemplate.enumOptions.description + - api_field: configTemplate.additionalConfigTemplate.enumOptions.displayName + - api_field: configTemplate.additionalConfigTemplate.enumOptions.id + - api_field: configTemplate.additionalConfigTemplate.id + - api_field: configTemplate.additionalConfigTemplate.multiSelectOptions.description + - api_field: configTemplate.additionalConfigTemplate.multiSelectOptions.displayName + - api_field: configTemplate.additionalConfigTemplate.multiSelectOptions.id + - api_field: configTemplate.additionalConfigTemplate.required + - api_field: configTemplate.additionalConfigTemplate.validationRegex + - api_field: configTemplate.additionalConfigTemplate.valueType + - api_field: configTemplate.authConfigTemplate.serviceAccount.serviceAccount + - api_field: configTemplate.authConfigTemplate.supportedAuthTypes + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: documentation.externalUri + - api_field: hostingService.serviceUri + - field: location + provider_only: true + - api_field: name + - api_field: ownershipType + - api_field: pluginCategory + - field: plugin_id + provider_only: true + - api_field: state + - api_field: updateTime diff --git a/google/services/apihub/resource_apihub_plugin_instance_generated_meta.yaml b/google/services/apihub/resource_apihub_plugin_instance_generated_meta.yaml index 13d169eed24..ade3d41fd89 100644 --- a/google/services/apihub/resource_apihub_plugin_instance_generated_meta.yaml +++ b/google/services/apihub/resource_apihub_plugin_instance_generated_meta.yaml @@ -1,41 +1,41 @@ -resource: 'google_apihub_plugin_instance' -generation_type: 'mmv1' -source_file: 'products/apihub/PluginInstance.yaml' -api_service_name: 'apihub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PluginInstance' +resource: google_apihub_plugin_instance +generation_type: mmv1 +source_file: products/apihub/PluginInstance.yaml +api_service_name: apihub.googleapis.com +api_version: v1 +api_resource_type_kind: PluginInstance autogen_status: true fields: - - api_field: 'actions.actionId' - - api_field: 'actions.curationConfig.curationType' - - api_field: 'actions.curationConfig.customCuration.curation' - - api_field: 'actions.hubInstanceAction.currentExecutionState' - - api_field: 'actions.hubInstanceAction.lastExecution.endTime' - - api_field: 'actions.hubInstanceAction.lastExecution.errorMessage' - - api_field: 'actions.hubInstanceAction.lastExecution.result' - - api_field: 'actions.hubInstanceAction.lastExecution.startTime' - - api_field: 'actions.scheduleCronExpression' - - api_field: 'actions.scheduleTimeZone' - - api_field: 'actions.state' - - api_field: 'authConfig.apiKeyConfig.apiKey.secretVersion' - - api_field: 'authConfig.apiKeyConfig.httpElementLocation' - - api_field: 'authConfig.apiKeyConfig.name' - - api_field: 'authConfig.authType' - - api_field: 'authConfig.googleServiceAccountConfig.serviceAccount' - - api_field: 'authConfig.oauth2ClientCredentialsConfig.clientId' - - api_field: 'authConfig.oauth2ClientCredentialsConfig.clientSecret.secretVersion' - - api_field: 'authConfig.userPasswordConfig.password.secretVersion' - - api_field: 'authConfig.userPasswordConfig.username' - - api_field: 'createTime' - - api_field: 'disable' - - api_field: 'displayName' - - api_field: 'errorMessage' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'plugin' - provider_only: true - - field: 'plugin_instance_id' - provider_only: true - - api_field: 'state' - - api_field: 'updateTime' + - api_field: actions.actionId + - api_field: actions.curationConfig.curationType + - api_field: actions.curationConfig.customCuration.curation + - api_field: actions.hubInstanceAction.currentExecutionState + - api_field: actions.hubInstanceAction.lastExecution.endTime + - api_field: actions.hubInstanceAction.lastExecution.errorMessage + - api_field: actions.hubInstanceAction.lastExecution.result + - api_field: actions.hubInstanceAction.lastExecution.startTime + - api_field: actions.scheduleCronExpression + - api_field: actions.scheduleTimeZone + - api_field: actions.state + - api_field: authConfig.apiKeyConfig.apiKey.secretVersion + - api_field: authConfig.apiKeyConfig.httpElementLocation + - api_field: authConfig.apiKeyConfig.name + - api_field: authConfig.authType + - api_field: authConfig.googleServiceAccountConfig.serviceAccount + - api_field: authConfig.oauth2ClientCredentialsConfig.clientId + - api_field: authConfig.oauth2ClientCredentialsConfig.clientSecret.secretVersion + - api_field: authConfig.userPasswordConfig.password.secretVersion + - api_field: authConfig.userPasswordConfig.username + - api_field: createTime + - api_field: disable + - api_field: displayName + - api_field: errorMessage + - field: location + provider_only: true + - api_field: name + - field: plugin + provider_only: true + - field: plugin_instance_id + provider_only: true + - api_field: state + - api_field: updateTime diff --git a/google/services/appengine/resource_app_engine_application_url_dispatch_rules_generated_meta.yaml b/google/services/appengine/resource_app_engine_application_url_dispatch_rules_generated_meta.yaml index 700f95bbbc4..361a3ce5ced 100644 --- a/google/services/appengine/resource_app_engine_application_url_dispatch_rules_generated_meta.yaml +++ b/google/services/appengine/resource_app_engine_application_url_dispatch_rules_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_app_engine_application_url_dispatch_rules' -generation_type: 'mmv1' -source_file: 'products/appengine/ApplicationUrlDispatchRules.yaml' -api_service_name: 'appengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Application' +resource: google_app_engine_application_url_dispatch_rules +generation_type: mmv1 +source_file: products/appengine/ApplicationUrlDispatchRules.yaml +api_service_name: appengine.googleapis.com +api_version: v1 +api_resource_type_kind: Application fields: - - api_field: 'dispatchRules.domain' - - api_field: 'dispatchRules.path' - - api_field: 'dispatchRules.service' + - api_field: dispatchRules.domain + - api_field: dispatchRules.path + - api_field: dispatchRules.service diff --git a/google/services/appengine/resource_app_engine_domain_mapping_generated_meta.yaml b/google/services/appengine/resource_app_engine_domain_mapping_generated_meta.yaml index bee985ce934..20495cbba51 100644 --- a/google/services/appengine/resource_app_engine_domain_mapping_generated_meta.yaml +++ b/google/services/appengine/resource_app_engine_domain_mapping_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_app_engine_domain_mapping' -generation_type: 'mmv1' -source_file: 'products/appengine/DomainMapping.yaml' -api_service_name: 'appengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DomainMapping' +resource: google_app_engine_domain_mapping +generation_type: mmv1 +source_file: products/appengine/DomainMapping.yaml +api_service_name: appengine.googleapis.com +api_version: v1 +api_resource_type_kind: DomainMapping fields: - - api_field: 'id' - field: 'domain_name' - - api_field: 'name' - - field: 'override_strategy' - provider_only: true - - api_field: 'resourceRecords.name' - - api_field: 'resourceRecords.rrdata' - - api_field: 'resourceRecords.type' - - api_field: 'sslSettings.certificateId' - - api_field: 'sslSettings.pendingManagedCertificateId' - - api_field: 'sslSettings.sslManagementType' + - api_field: id + field: domain_name + - api_field: name + - field: override_strategy + provider_only: true + - api_field: resourceRecords.name + - api_field: resourceRecords.rrdata + - api_field: resourceRecords.type + - api_field: sslSettings.certificateId + - api_field: sslSettings.pendingManagedCertificateId + - api_field: sslSettings.sslManagementType diff --git a/google/services/appengine/resource_app_engine_firewall_rule_generated_meta.yaml b/google/services/appengine/resource_app_engine_firewall_rule_generated_meta.yaml index 6d3acc00334..71c7dbd8036 100644 --- a/google/services/appengine/resource_app_engine_firewall_rule_generated_meta.yaml +++ b/google/services/appengine/resource_app_engine_firewall_rule_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_app_engine_firewall_rule' -generation_type: 'mmv1' -source_file: 'products/appengine/FirewallRule.yaml' -api_service_name: 'appengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallRule' +resource: google_app_engine_firewall_rule +generation_type: mmv1 +source_file: products/appengine/FirewallRule.yaml +api_service_name: appengine.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallRule fields: - - api_field: 'action' - - api_field: 'description' - - api_field: 'priority' - - api_field: 'sourceRange' + - api_field: action + - api_field: description + - api_field: priority + - api_field: sourceRange diff --git a/google/services/appengine/resource_app_engine_flexible_app_version_generated_meta.yaml b/google/services/appengine/resource_app_engine_flexible_app_version_generated_meta.yaml index c41c3f8221c..c423a51289c 100644 --- a/google/services/appengine/resource_app_engine_flexible_app_version_generated_meta.yaml +++ b/google/services/appengine/resource_app_engine_flexible_app_version_generated_meta.yaml @@ -1,108 +1,112 @@ -resource: 'google_app_engine_flexible_app_version' -generation_type: 'mmv1' -source_file: 'products/appengine/FlexibleAppVersion.yaml' -api_service_name: 'appengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Version' +resource: google_app_engine_flexible_app_version +generation_type: mmv1 +source_file: products/appengine/FlexibleAppVersion.yaml +api_service_name: appengine.googleapis.com +api_version: v1 +api_resource_type_kind: Version fields: - - api_field: 'apiConfig.authFailAction' - - api_field: 'apiConfig.login' - - api_field: 'apiConfig.script' - - api_field: 'apiConfig.securityLevel' - - api_field: 'apiConfig.url' - - api_field: 'automaticScaling.coolDownPeriod' - - api_field: 'automaticScaling.cpuUtilization.aggregationWindowLength' - - api_field: 'automaticScaling.cpuUtilization.targetUtilization' - - api_field: 'automaticScaling.diskUtilization.targetReadBytesPerSecond' - - api_field: 'automaticScaling.diskUtilization.targetReadOpsPerSecond' - - api_field: 'automaticScaling.diskUtilization.targetWriteBytesPerSecond' - - api_field: 'automaticScaling.diskUtilization.targetWriteOpsPerSecond' - - api_field: 'automaticScaling.maxConcurrentRequests' - - api_field: 'automaticScaling.maxIdleInstances' - - api_field: 'automaticScaling.maxPendingLatency' - - api_field: 'automaticScaling.maxTotalInstances' - - api_field: 'automaticScaling.minIdleInstances' - - api_field: 'automaticScaling.minPendingLatency' - - api_field: 'automaticScaling.minTotalInstances' - - api_field: 'automaticScaling.networkUtilization.targetReceivedBytesPerSecond' - - api_field: 'automaticScaling.networkUtilization.targetReceivedPacketsPerSecond' - - api_field: 'automaticScaling.networkUtilization.targetSentBytesPerSecond' - - api_field: 'automaticScaling.networkUtilization.targetSentPacketsPerSecond' - - api_field: 'automaticScaling.requestUtilization.targetConcurrentRequests' - - api_field: 'automaticScaling.requestUtilization.targetRequestCountPerSecond' - - api_field: 'betaSettings' - - api_field: 'defaultExpiration' - - field: 'delete_service_on_destroy' - provider_only: true - - api_field: 'deployment.cloudBuildOptions.appYamlPath' - - api_field: 'deployment.cloudBuildOptions.cloudBuildTimeout' - - api_field: 'deployment.container.image' - - api_field: 'deployment.files.files.sha1Sum' - - api_field: 'deployment.files.files.sourceUrl' - - api_field: 'deployment.zip.filesCount' - - api_field: 'deployment.zip.sourceUrl' - - api_field: 'endpointsApiService.configId' - - api_field: 'endpointsApiService.disableTraceSampling' - - api_field: 'endpointsApiService.name' - - api_field: 'endpointsApiService.rolloutStrategy' - - api_field: 'entrypoint.shell' - - api_field: 'envVariables' - - api_field: 'flexibleRuntimeSettings.operatingSystem' - - api_field: 'flexibleRuntimeSettings.runtimeVersion' - - api_field: 'handlers.authFailAction' - - api_field: 'handlers.login' - - api_field: 'handlers.redirectHttpResponseCode' - - api_field: 'handlers.script.scriptPath' - - api_field: 'handlers.securityLevel' - - api_field: 'handlers.staticFiles.applicationReadable' - - api_field: 'handlers.staticFiles.expiration' - - api_field: 'handlers.staticFiles.httpHeaders' - - api_field: 'handlers.staticFiles.mimeType' - - api_field: 'handlers.staticFiles.path' - - api_field: 'handlers.staticFiles.requireMatchingFile' - - api_field: 'handlers.staticFiles.uploadPathRegex' - - api_field: 'handlers.urlRegex' - - api_field: 'inboundServices' - - api_field: 'instanceClass' - - api_field: 'livenessCheck.checkInterval' - - api_field: 'livenessCheck.failureThreshold' - - api_field: 'livenessCheck.host' - - api_field: 'livenessCheck.initialDelay' - - api_field: 'livenessCheck.path' - - api_field: 'livenessCheck.successThreshold' - - api_field: 'livenessCheck.timeout' - - api_field: 'manualScaling.instances' - - api_field: 'name' - - api_field: 'network.forwardedPorts' - - api_field: 'network.instanceTag' - - api_field: 'network.name' - - api_field: 'network.sessionAffinity' - - api_field: 'network.subnetworkName' - field: 'network.subnetwork' - - api_field: 'nobuildFilesRegex' - - field: 'noop_on_destroy' - provider_only: true - - api_field: 'readinessCheck.appStartTimeout' - - api_field: 'readinessCheck.checkInterval' - - api_field: 'readinessCheck.failureThreshold' - - api_field: 'readinessCheck.host' - - api_field: 'readinessCheck.path' - - api_field: 'readinessCheck.successThreshold' - - api_field: 'readinessCheck.timeout' - - api_field: 'resources.cpu' - - api_field: 'resources.diskGb' - - api_field: 'resources.memoryGb' - - api_field: 'resources.volumes.name' - - api_field: 'resources.volumes.sizeGb' - - api_field: 'resources.volumes.volumeType' - - api_field: 'runtime' - - api_field: 'runtimeApiVersion' - - api_field: 'runtimeChannel' - - api_field: 'runtimeMainExecutablePath' - - field: 'service' - provider_only: true - - api_field: 'serviceAccount' - - api_field: 'servingStatus' - - api_field: 'id' - field: 'version_id' - - api_field: 'vpcAccessConnector.name' + - api_field: apiConfig.authFailAction + - api_field: apiConfig.login + - api_field: apiConfig.script + - api_field: apiConfig.securityLevel + - api_field: apiConfig.url + - api_field: automaticScaling.coolDownPeriod + - api_field: automaticScaling.cpuUtilization.aggregationWindowLength + - api_field: automaticScaling.cpuUtilization.targetUtilization + - api_field: automaticScaling.diskUtilization.targetReadBytesPerSecond + - api_field: automaticScaling.diskUtilization.targetReadOpsPerSecond + - api_field: automaticScaling.diskUtilization.targetWriteBytesPerSecond + - api_field: automaticScaling.diskUtilization.targetWriteOpsPerSecond + - api_field: automaticScaling.maxConcurrentRequests + - api_field: automaticScaling.maxIdleInstances + - api_field: automaticScaling.maxPendingLatency + - api_field: automaticScaling.maxTotalInstances + - api_field: automaticScaling.minIdleInstances + - api_field: automaticScaling.minPendingLatency + - api_field: automaticScaling.minTotalInstances + - api_field: automaticScaling.networkUtilization.targetReceivedBytesPerSecond + - api_field: automaticScaling.networkUtilization.targetReceivedPacketsPerSecond + - api_field: automaticScaling.networkUtilization.targetSentBytesPerSecond + - api_field: automaticScaling.networkUtilization.targetSentPacketsPerSecond + - api_field: automaticScaling.requestUtilization.targetConcurrentRequests + - api_field: automaticScaling.requestUtilization.targetRequestCountPerSecond + - api_field: betaSettings + - api_field: defaultExpiration + - field: delete_service_on_destroy + provider_only: true + - api_field: deployment.cloudBuildOptions.appYamlPath + - api_field: deployment.cloudBuildOptions.cloudBuildTimeout + - api_field: deployment.container.image + - api_field: deployment.files.key + field: deployment.files.name + - api_field: deployment.files.value.sha1Sum + field: deployment.files.sha1_sum + - api_field: deployment.files.value.sourceUrl + field: deployment.files.source_url + - api_field: deployment.zip.filesCount + - api_field: deployment.zip.sourceUrl + - api_field: endpointsApiService.configId + - api_field: endpointsApiService.disableTraceSampling + - api_field: endpointsApiService.name + - api_field: endpointsApiService.rolloutStrategy + - api_field: entrypoint.shell + - api_field: envVariables + - api_field: flexibleRuntimeSettings.operatingSystem + - api_field: flexibleRuntimeSettings.runtimeVersion + - api_field: handlers.authFailAction + - api_field: handlers.login + - api_field: handlers.redirectHttpResponseCode + - api_field: handlers.script.scriptPath + - api_field: handlers.securityLevel + - api_field: handlers.staticFiles.applicationReadable + - api_field: handlers.staticFiles.expiration + - api_field: handlers.staticFiles.httpHeaders + - api_field: handlers.staticFiles.mimeType + - api_field: handlers.staticFiles.path + - api_field: handlers.staticFiles.requireMatchingFile + - api_field: handlers.staticFiles.uploadPathRegex + - api_field: handlers.urlRegex + - api_field: inboundServices + - api_field: instanceClass + - api_field: livenessCheck.checkInterval + - api_field: livenessCheck.failureThreshold + - api_field: livenessCheck.host + - api_field: livenessCheck.initialDelay + - api_field: livenessCheck.path + - api_field: livenessCheck.successThreshold + - api_field: livenessCheck.timeout + - api_field: manualScaling.instances + - api_field: name + - api_field: network.forwardedPorts + - api_field: network.instanceTag + - api_field: network.name + - api_field: network.sessionAffinity + - api_field: network.subnetworkName + field: network.subnetwork + - api_field: nobuildFilesRegex + - field: noop_on_destroy + provider_only: true + - api_field: readinessCheck.appStartTimeout + - api_field: readinessCheck.checkInterval + - api_field: readinessCheck.failureThreshold + - api_field: readinessCheck.host + - api_field: readinessCheck.path + - api_field: readinessCheck.successThreshold + - api_field: readinessCheck.timeout + - api_field: resources.cpu + - api_field: resources.diskGb + - api_field: resources.memoryGb + - api_field: resources.volumes.name + - api_field: resources.volumes.sizeGb + - api_field: resources.volumes.volumeType + - api_field: runtime + - api_field: runtimeApiVersion + - api_field: runtimeChannel + - api_field: runtimeMainExecutablePath + - field: service + provider_only: true + - api_field: serviceAccount + - api_field: servingStatus + - api_field: id + field: version_id + - api_field: vpcAccessConnector.name diff --git a/google/services/appengine/resource_app_engine_service_network_settings_generated_meta.yaml b/google/services/appengine/resource_app_engine_service_network_settings_generated_meta.yaml index c6b52536b18..04ef1cbba28 100644 --- a/google/services/appengine/resource_app_engine_service_network_settings_generated_meta.yaml +++ b/google/services/appengine/resource_app_engine_service_network_settings_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_app_engine_service_network_settings' -generation_type: 'mmv1' -source_file: 'products/appengine/ServiceNetworkSettings.yaml' -api_service_name: 'appengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' +resource: google_app_engine_service_network_settings +generation_type: mmv1 +source_file: products/appengine/ServiceNetworkSettings.yaml +api_service_name: appengine.googleapis.com +api_version: v1 +api_resource_type_kind: Service fields: - - api_field: 'networkSettings.ingressTrafficAllowed' - - api_field: 'id' - field: 'service' + - api_field: networkSettings.ingressTrafficAllowed + - api_field: id + field: service diff --git a/google/services/appengine/resource_app_engine_service_split_traffic_generated_meta.yaml b/google/services/appengine/resource_app_engine_service_split_traffic_generated_meta.yaml index 756d38a6ab6..cbd19497fec 100644 --- a/google/services/appengine/resource_app_engine_service_split_traffic_generated_meta.yaml +++ b/google/services/appengine/resource_app_engine_service_split_traffic_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_app_engine_service_split_traffic' -generation_type: 'mmv1' -source_file: 'products/appengine/ServiceSplitTraffic.yaml' -api_service_name: 'appengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' +resource: google_app_engine_service_split_traffic +generation_type: mmv1 +source_file: products/appengine/ServiceSplitTraffic.yaml +api_service_name: appengine.googleapis.com +api_version: v1 +api_resource_type_kind: Service fields: - - field: 'migrate_traffic' - provider_only: true - - api_field: 'id' - field: 'service' - - api_field: 'split.allocations' - - api_field: 'split.shardBy' + - field: migrate_traffic + provider_only: true + - api_field: id + field: service + - api_field: split.allocations + - api_field: split.shardBy diff --git a/google/services/appengine/resource_app_engine_standard_app_version_generated_meta.yaml b/google/services/appengine/resource_app_engine_standard_app_version_generated_meta.yaml index 00829c21d4c..52cf0613dd9 100644 --- a/google/services/appengine/resource_app_engine_standard_app_version_generated_meta.yaml +++ b/google/services/appengine/resource_app_engine_standard_app_version_generated_meta.yaml @@ -1,58 +1,62 @@ -resource: 'google_app_engine_standard_app_version' -generation_type: 'mmv1' -source_file: 'products/appengine/StandardAppVersion.yaml' -api_service_name: 'appengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Version' +resource: google_app_engine_standard_app_version +generation_type: mmv1 +source_file: products/appengine/StandardAppVersion.yaml +api_service_name: appengine.googleapis.com +api_version: v1 +api_resource_type_kind: Version fields: - - api_field: 'appEngineApis' - - api_field: 'automaticScaling.maxConcurrentRequests' - - api_field: 'automaticScaling.maxIdleInstances' - - api_field: 'automaticScaling.maxPendingLatency' - - api_field: 'automaticScaling.minIdleInstances' - - api_field: 'automaticScaling.minPendingLatency' - - api_field: 'automaticScaling.standardSchedulerSettings.maxInstances' - - api_field: 'automaticScaling.standardSchedulerSettings.minInstances' - - api_field: 'automaticScaling.standardSchedulerSettings.targetCpuUtilization' - - api_field: 'automaticScaling.standardSchedulerSettings.targetThroughputUtilization' - - api_field: 'basicScaling.idleTimeout' - - api_field: 'basicScaling.maxInstances' - - field: 'delete_service_on_destroy' - provider_only: true - - api_field: 'deployment.files.files.sha1Sum' - - api_field: 'deployment.files.files.sourceUrl' - - api_field: 'deployment.zip.filesCount' - - api_field: 'deployment.zip.sourceUrl' - - api_field: 'entrypoint.shell' - - api_field: 'envVariables' - - api_field: 'handlers.authFailAction' - - api_field: 'handlers.login' - - api_field: 'handlers.redirectHttpResponseCode' - - api_field: 'handlers.script.scriptPath' - - api_field: 'handlers.securityLevel' - - api_field: 'handlers.staticFiles.applicationReadable' - - api_field: 'handlers.staticFiles.expiration' - - api_field: 'handlers.staticFiles.httpHeaders' - - api_field: 'handlers.staticFiles.mimeType' - - api_field: 'handlers.staticFiles.path' - - api_field: 'handlers.staticFiles.requireMatchingFile' - - api_field: 'handlers.staticFiles.uploadPathRegex' - - api_field: 'handlers.urlRegex' - - api_field: 'inboundServices' - - api_field: 'instanceClass' - - api_field: 'libraries.name' - - api_field: 'libraries.version' - - api_field: 'manualScaling.instances' - - api_field: 'name' - - field: 'noop_on_destroy' - provider_only: true - - api_field: 'runtime' - - api_field: 'runtimeApiVersion' - - field: 'service' - provider_only: true - - api_field: 'serviceAccount' - - api_field: 'threadsafe' - - api_field: 'id' - field: 'version_id' - - api_field: 'vpcAccessConnector.egressSetting' - - api_field: 'vpcAccessConnector.name' + - api_field: appEngineApis + - api_field: automaticScaling.maxConcurrentRequests + - api_field: automaticScaling.maxIdleInstances + - api_field: automaticScaling.maxPendingLatency + - api_field: automaticScaling.minIdleInstances + - api_field: automaticScaling.minPendingLatency + - api_field: automaticScaling.standardSchedulerSettings.maxInstances + - api_field: automaticScaling.standardSchedulerSettings.minInstances + - api_field: automaticScaling.standardSchedulerSettings.targetCpuUtilization + - api_field: automaticScaling.standardSchedulerSettings.targetThroughputUtilization + - api_field: basicScaling.idleTimeout + - api_field: basicScaling.maxInstances + - field: delete_service_on_destroy + provider_only: true + - api_field: deployment.files.key + field: deployment.files.name + - api_field: deployment.files.value.sha1Sum + field: deployment.files.sha1_sum + - api_field: deployment.files.value.sourceUrl + field: deployment.files.source_url + - api_field: deployment.zip.filesCount + - api_field: deployment.zip.sourceUrl + - api_field: entrypoint.shell + - api_field: envVariables + - api_field: handlers.authFailAction + - api_field: handlers.login + - api_field: handlers.redirectHttpResponseCode + - api_field: handlers.script.scriptPath + - api_field: handlers.securityLevel + - api_field: handlers.staticFiles.applicationReadable + - api_field: handlers.staticFiles.expiration + - api_field: handlers.staticFiles.httpHeaders + - api_field: handlers.staticFiles.mimeType + - api_field: handlers.staticFiles.path + - api_field: handlers.staticFiles.requireMatchingFile + - api_field: handlers.staticFiles.uploadPathRegex + - api_field: handlers.urlRegex + - api_field: inboundServices + - api_field: instanceClass + - api_field: libraries.name + - api_field: libraries.version + - api_field: manualScaling.instances + - api_field: name + - field: noop_on_destroy + provider_only: true + - api_field: runtime + - api_field: runtimeApiVersion + - field: service + provider_only: true + - api_field: serviceAccount + - api_field: threadsafe + - api_field: id + field: version_id + - api_field: vpcAccessConnector.egressSetting + - api_field: vpcAccessConnector.name diff --git a/google/services/apphub/resource_apphub_application_generated_meta.yaml b/google/services/apphub/resource_apphub_application_generated_meta.yaml index 8099810aa63..950ca4d2af0 100644 --- a/google/services/apphub/resource_apphub_application_generated_meta.yaml +++ b/google/services/apphub/resource_apphub_application_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_apphub_application' -generation_type: 'mmv1' -source_file: 'products/apphub/Application.yaml' -api_service_name: 'apphub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Application' +resource: google_apphub_application +generation_type: mmv1 +source_file: products/apphub/Application.yaml +api_service_name: apphub.googleapis.com +api_version: v1 +api_resource_type_kind: Application autogen_status: true fields: - - field: 'application_id' - provider_only: true - - api_field: 'attributes.businessOwners.displayName' - - api_field: 'attributes.businessOwners.email' - - api_field: 'attributes.criticality.type' - - api_field: 'attributes.developerOwners.displayName' - - api_field: 'attributes.developerOwners.email' - - api_field: 'attributes.environment.type' - - api_field: 'attributes.operatorOwners.displayName' - - api_field: 'attributes.operatorOwners.email' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'scope.type' - - api_field: 'state' - - api_field: 'uid' - - api_field: 'updateTime' + - field: application_id + provider_only: true + - api_field: attributes.businessOwners.displayName + - api_field: attributes.businessOwners.email + - api_field: attributes.criticality.type + - api_field: attributes.developerOwners.displayName + - api_field: attributes.developerOwners.email + - api_field: attributes.environment.type + - api_field: attributes.operatorOwners.displayName + - api_field: attributes.operatorOwners.email + - api_field: createTime + - api_field: description + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - api_field: scope.type + - api_field: state + - api_field: uid + - api_field: updateTime diff --git a/google/services/apphub/resource_apphub_boundary.go b/google/services/apphub/resource_apphub_boundary.go new file mode 100644 index 00000000000..db26ff36f3d --- /dev/null +++ b/google/services/apphub/resource_apphub_boundary.go @@ -0,0 +1,468 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/apphub/Boundary.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package apphub + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceApphubBoundary() *schema.Resource { + return &schema.Resource{ + Create: resourceApphubBoundaryCreate, + Read: resourceApphubBoundaryRead, + Update: resourceApphubBoundaryUpdate, + Delete: resourceApphubBoundaryDelete, + + Importer: &schema.ResourceImporter{ + State: resourceApphubBoundaryImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The location for the Boundary resource. Must be global.`, + }, + "crm_node": { + Type: schema.TypeString, + Optional: true, + Description: `Optional. The resource name of the CRM node being attached to the +boundary. +Format: 'projects/{project-number}'`, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `Create time.`, + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: `Identifier. The resource name of the boundary. +Format: "projects/{project}/locations/{{location}}/boundary"`, + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: `Boundary type.`, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `Update time.`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceApphubBoundaryCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + crmNodeProp, err := expandApphubBoundaryCrmNode(d.Get("crm_node"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("crm_node"); !tpgresource.IsEmptyValue(reflect.ValueOf(crmNodeProp)) && (ok || !reflect.DeepEqual(v, crmNodeProp)) { + obj["crmNode"] = crmNodeProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ApphubBasePath}}projects/{{project}}/locations/{{location}}/boundary") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new Boundary: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Boundary: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating Boundary: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/boundary") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + err = ApphubOperationWaitTime( + config, res, project, "Creating Boundary", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create Boundary: %s", err) + } + + log.Printf("[DEBUG] Finished creating Boundary %q: %#v", d.Id(), res) + + return resourceApphubBoundaryRead(d, meta) +} + +func resourceApphubBoundaryRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ApphubBasePath}}projects/{{project}}/locations/{{location}}/boundary") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Boundary: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("ApphubBoundary %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading Boundary: %s", err) + } + + if err := d.Set("name", flattenApphubBoundaryName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading Boundary: %s", err) + } + if err := d.Set("crm_node", flattenApphubBoundaryCrmNode(res["crmNode"], d, config)); err != nil { + return fmt.Errorf("Error reading Boundary: %s", err) + } + if err := d.Set("create_time", flattenApphubBoundaryCreateTime(res["createTime"], d, config)); err != nil { + return fmt.Errorf("Error reading Boundary: %s", err) + } + if err := d.Set("update_time", flattenApphubBoundaryUpdateTime(res["updateTime"], d, config)); err != nil { + return fmt.Errorf("Error reading Boundary: %s", err) + } + if err := d.Set("type", flattenApphubBoundaryType(res["type"], d, config)); err != nil { + return fmt.Errorf("Error reading Boundary: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("location"); !ok && v == "" { + err = identity.Set("location", d.Get("location").(string)) + if err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceApphubBoundaryUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Boundary: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + crmNodeProp, err := expandApphubBoundaryCrmNode(d.Get("crm_node"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("crm_node"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, crmNodeProp)) { + obj["crmNode"] = crmNodeProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ApphubBasePath}}projects/{{project}}/locations/{{location}}/boundary") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating Boundary %q: %#v", d.Id(), obj) + headers := make(http.Header) + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating Boundary %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating Boundary %q: %#v", d.Id(), res) + } + + err = ApphubOperationWaitTime( + config, res, project, "Updating Boundary", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + + return resourceApphubBoundaryRead(d, meta) +} + +func resourceApphubBoundaryDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[WARNING] Apphub Boundary resources"+ + " cannot be deleted from Google Cloud. The resource %s will be removed from Terraform"+ + " state, but will still be present on Google Cloud.", d.Id()) + d.SetId("") + + return nil +} + +func resourceApphubBoundaryImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/locations/(?P[^/]+)/boundary$", + "^(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/boundary") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenApphubBoundaryName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApphubBoundaryCrmNode(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApphubBoundaryCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApphubBoundaryUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenApphubBoundaryType(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandApphubBoundaryCrmNode(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} diff --git a/google/services/apphub/resource_apphub_boundary_generated_meta.yaml b/google/services/apphub/resource_apphub_boundary_generated_meta.yaml new file mode 100644 index 00000000000..fbe0a9a993a --- /dev/null +++ b/google/services/apphub/resource_apphub_boundary_generated_meta.yaml @@ -0,0 +1,14 @@ +resource: google_apphub_boundary +generation_type: mmv1 +source_file: products/apphub/Boundary.yaml +api_service_name: apphub.googleapis.com +api_version: v1 +api_resource_type_kind: Boundary +fields: + - api_field: createTime + - api_field: crmNode + - field: location + provider_only: true + - api_field: name + - api_field: type + - api_field: updateTime diff --git a/google/services/apphub/resource_apphub_boundary_test.go b/google/services/apphub/resource_apphub_boundary_test.go new file mode 100644 index 00000000000..f4e3d67d0c4 --- /dev/null +++ b/google/services/apphub/resource_apphub_boundary_test.go @@ -0,0 +1,101 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/apphub/resource_apphub_boundary_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package apphub_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccApphubBoundary_apphubBoundary_update(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "crm_node_project_number": envvar.GetTestProjectNumberFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccApphubBoundary_apphubBoundaryBasicExample(context), + }, + { + ResourceName: "google_apphub_boundary.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"location"}, + }, + { + Config: testAccApphubBoundary_apphubBoundaryNoCrmNode(context), + }, + { + ResourceName: "google_apphub_boundary.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"location"}, + }, + }, + }) +} + +func testAccApphubBoundary_apphubBoundaryBasicExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_apphub_boundary" "example" { + location = "global" + crm_node = "projects/%{crm_node_project_number}" +} +`, context) +} + +func testAccApphubBoundary_apphubBoundaryNoCrmNode(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_apphub_boundary" "example" { + location = "global" +} +`, context) +} diff --git a/google/services/apphub/resource_apphub_service_generated_meta.yaml b/google/services/apphub/resource_apphub_service_generated_meta.yaml index b436fdce4cd..ddab6bc9cb2 100644 --- a/google/services/apphub/resource_apphub_service_generated_meta.yaml +++ b/google/services/apphub/resource_apphub_service_generated_meta.yaml @@ -1,42 +1,42 @@ -resource: 'google_apphub_service' -generation_type: 'mmv1' -source_file: 'products/apphub/Service.yaml' -api_service_name: 'apphub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' +resource: google_apphub_service +generation_type: mmv1 +source_file: products/apphub/Service.yaml +api_service_name: apphub.googleapis.com +api_version: v1 +api_resource_type_kind: Service api_variant_patterns: - - 'projects/{project}/locations/{location}/applications/{application}/services/{service}' + - projects/{project}/locations/{location}/applications/{application}/services/{service} autogen_status: true fields: - - field: 'application_id' - provider_only: true - - api_field: 'attributes.businessOwners.displayName' - - api_field: 'attributes.businessOwners.email' - - api_field: 'attributes.criticality.type' - - api_field: 'attributes.developerOwners.displayName' - - api_field: 'attributes.developerOwners.email' - - api_field: 'attributes.environment.type' - - api_field: 'attributes.operatorOwners.displayName' - - api_field: 'attributes.operatorOwners.email' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'discoveredService' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'service_id' - provider_only: true - - api_field: 'serviceProperties.extendedMetadata.key' - - api_field: 'serviceProperties.extendedMetadata.value.extendedMetadataSchema' - - api_field: 'serviceProperties.extendedMetadata.value.metadataStruct' - - api_field: 'serviceProperties.functionalType.type' - - api_field: 'serviceProperties.gcpProject' - - api_field: 'serviceProperties.identity.principal' - - api_field: 'serviceProperties.location' - - api_field: 'serviceProperties.registrationType.type' - - api_field: 'serviceProperties.zone' - - api_field: 'serviceReference.uri' - - api_field: 'state' - - api_field: 'uid' - - api_field: 'updateTime' + - field: application_id + provider_only: true + - api_field: attributes.businessOwners.displayName + - api_field: attributes.businessOwners.email + - api_field: attributes.criticality.type + - api_field: attributes.developerOwners.displayName + - api_field: attributes.developerOwners.email + - api_field: attributes.environment.type + - api_field: attributes.operatorOwners.displayName + - api_field: attributes.operatorOwners.email + - api_field: createTime + - api_field: description + - api_field: discoveredService + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - field: service_id + provider_only: true + - api_field: serviceProperties.extendedMetadata.key + - api_field: serviceProperties.extendedMetadata.value.extendedMetadataSchema + - api_field: serviceProperties.extendedMetadata.value.metadataStruct + - api_field: serviceProperties.functionalType.type + - api_field: serviceProperties.gcpProject + - api_field: serviceProperties.identity.principal + - api_field: serviceProperties.location + - api_field: serviceProperties.registrationType.type + - api_field: serviceProperties.zone + - api_field: serviceReference.uri + - api_field: state + - api_field: uid + - api_field: updateTime diff --git a/google/services/apphub/resource_apphub_service_project_attachment_generated_meta.yaml b/google/services/apphub/resource_apphub_service_project_attachment_generated_meta.yaml index e77cc239117..d13db771d32 100644 --- a/google/services/apphub/resource_apphub_service_project_attachment_generated_meta.yaml +++ b/google/services/apphub/resource_apphub_service_project_attachment_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_apphub_service_project_attachment' -generation_type: 'mmv1' -source_file: 'products/apphub/ServiceProjectAttachment.yaml' -api_service_name: 'apphub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServiceProjectAttachment' +resource: google_apphub_service_project_attachment +generation_type: mmv1 +source_file: products/apphub/ServiceProjectAttachment.yaml +api_service_name: apphub.googleapis.com +api_version: v1 +api_resource_type_kind: ServiceProjectAttachment autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'name' - - api_field: 'serviceProject' - - field: 'service_project_attachment_id' - provider_only: true - - api_field: 'state' - - api_field: 'uid' + - api_field: createTime + - api_field: name + - api_field: serviceProject + - field: service_project_attachment_id + provider_only: true + - api_field: state + - api_field: uid diff --git a/google/services/apphub/resource_apphub_workload_generated_meta.yaml b/google/services/apphub/resource_apphub_workload_generated_meta.yaml index b912b3895c1..5a7a791a929 100644 --- a/google/services/apphub/resource_apphub_workload_generated_meta.yaml +++ b/google/services/apphub/resource_apphub_workload_generated_meta.yaml @@ -1,41 +1,41 @@ -resource: 'google_apphub_workload' -generation_type: 'mmv1' -source_file: 'products/apphub/Workload.yaml' -api_service_name: 'apphub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Workload' +resource: google_apphub_workload +generation_type: mmv1 +source_file: products/apphub/Workload.yaml +api_service_name: apphub.googleapis.com +api_version: v1 +api_resource_type_kind: Workload api_variant_patterns: - - 'projects/{project}/locations/{location}/applications/{application}/workloads/{workload}' + - projects/{project}/locations/{location}/applications/{application}/workloads/{workload} autogen_status: true fields: - - field: 'application_id' - provider_only: true - - api_field: 'attributes.businessOwners.displayName' - - api_field: 'attributes.businessOwners.email' - - api_field: 'attributes.criticality.type' - - api_field: 'attributes.developerOwners.displayName' - - api_field: 'attributes.developerOwners.email' - - api_field: 'attributes.environment.type' - - api_field: 'attributes.operatorOwners.displayName' - - api_field: 'attributes.operatorOwners.email' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'discoveredWorkload' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'state' - - api_field: 'uid' - - api_field: 'updateTime' - - field: 'workload_id' - provider_only: true - - api_field: 'workloadProperties.extendedMetadata.key' - - api_field: 'workloadProperties.extendedMetadata.value.extendedMetadataSchema' - - api_field: 'workloadProperties.extendedMetadata.value.metadataStruct' - - api_field: 'workloadProperties.functionalType.type' - - api_field: 'workloadProperties.gcpProject' - - api_field: 'workloadProperties.identity.principal' - - api_field: 'workloadProperties.location' - - api_field: 'workloadProperties.zone' - - api_field: 'workloadReference.uri' + - field: application_id + provider_only: true + - api_field: attributes.businessOwners.displayName + - api_field: attributes.businessOwners.email + - api_field: attributes.criticality.type + - api_field: attributes.developerOwners.displayName + - api_field: attributes.developerOwners.email + - api_field: attributes.environment.type + - api_field: attributes.operatorOwners.displayName + - api_field: attributes.operatorOwners.email + - api_field: createTime + - api_field: description + - api_field: discoveredWorkload + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - api_field: state + - api_field: uid + - api_field: updateTime + - field: workload_id + provider_only: true + - api_field: workloadProperties.extendedMetadata.key + - api_field: workloadProperties.extendedMetadata.value.extendedMetadataSchema + - api_field: workloadProperties.extendedMetadata.value.metadataStruct + - api_field: workloadProperties.functionalType.type + - api_field: workloadProperties.gcpProject + - api_field: workloadProperties.identity.principal + - api_field: workloadProperties.location + - api_field: workloadProperties.zone + - api_field: workloadReference.uri diff --git a/google/services/artifactregistry/data_source_artifact_registry_versions.go b/google/services/artifactregistry/data_source_artifact_registry_versions.go new file mode 100644 index 00000000000..444395d4d69 --- /dev/null +++ b/google/services/artifactregistry/data_source_artifact_registry_versions.go @@ -0,0 +1,252 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/artifactregistry/data_source_artifact_registry_versions.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package artifactregistry + +import ( + "fmt" + "net/http" + "net/url" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func DataSourceArtifactRegistryVersions() *schema.Resource { + return &schema.Resource{ + Read: dataSourceArtifactRegistryVersionsRead, + Schema: map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + Required: true, + }, + "repository_id": { + Type: schema.TypeString, + Required: true, + }, + "package_name": { + Type: schema.TypeString, + Required: true, + }, + "filter": { + Type: schema.TypeString, + Optional: true, + }, + "view": { + Type: schema.TypeString, + Optional: true, + Default: "BASIC", + ValidateFunc: validateViewArtifactRegistryVersions, + }, + "project": { + Type: schema.TypeString, + Optional: true, + }, + "versions": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "related_tags": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + "version": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + }, + "annotations": { + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + }, + } +} + +func dataSourceArtifactRegistryVersionsRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return err + } + + basePath, err := tpgresource.ReplaceVars(d, config, "{{ArtifactRegistryBasePath}}") + if err != nil { + return fmt.Errorf("Error setting Artifact Registry base path: %s", err) + } + + resourcePath, err := tpgresource.ReplaceVars(d, config, fmt.Sprintf("projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/packages/{{package_name}}/versions")) + if err != nil { + return fmt.Errorf("Error setting resource path: %s", err) + } + + view := d.Get("view").(string) + + urlRequest := basePath + resourcePath + + u, err := url.Parse(urlRequest) + if err != nil { + return fmt.Errorf("Error parsing URL: %s", err) + } + + q := u.Query() + q.Set("view", view) + + filter := "" + if v, ok := d.GetOk("filter"); ok { + filter = v.(string) + q.Set("filter", filter) + } + + u.RawQuery = q.Encode() + urlRequest = u.String() + + headers := make(http.Header) + versions := make([]map[string]interface{}, 0) + pageToken := "" + + for { + u, err := url.Parse(urlRequest) + if err != nil { + return fmt.Errorf("Error parsing URL: %s", err) + } + + q := u.Query() + if pageToken != "" { + q.Set("pageToken", pageToken) + } + u.RawQuery = q.Encode() + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + RawURL: u.String(), + UserAgent: userAgent, + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error listing Artifact Registry versions: %s", err) + } + + if items, ok := res["versions"].([]interface{}); ok { + for _, item := range items { + version := item.(map[string]interface{}) + + var relatedTags []map[string]interface{} + if rawTags, ok := version["relatedTags"].([]interface{}); ok { + for _, rawTag := range rawTags { + if tagMap, ok := rawTag.(map[string]interface{}); ok { + entry := map[string]interface{}{ + "name": tagMap["name"], + "version": tagMap["version"], + } + relatedTags = append(relatedTags, entry) + } + } + } + + annotations := make(map[string]string) + if anno, ok := version["annotations"].(map[string]interface{}); ok { + for k, v := range anno { + if val, ok := v.(string); ok { + annotations[k] = val + } + } + } + + getString := func(m map[string]interface{}, key string) string { + if v, ok := m[key].(string); ok { + return v + } + return "" + } + + versions = append(versions, map[string]interface{}{ + "name": getString(version, "name"), + "description": getString(version, "description"), + "related_tags": relatedTags, + "create_time": getString(version, "createTime"), + "update_time": getString(version, "updateTime"), + "annotations": annotations, + }) + } + } + + if nextToken, ok := res["nextPageToken"].(string); ok && nextToken != "" { + pageToken = nextToken + } else { + break + } + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + + if err := d.Set("versions", versions); err != nil { + return fmt.Errorf("Error setting Artifact Registry versions: %s", err) + } + + d.SetId(resourcePath) + + return nil +} + +func validateViewArtifactRegistryVersions(val interface{}, key string) ([]string, []error) { + v := val.(string) + var errs []error + + if v != "BASIC" && v != "FULL" { + errs = append(errs, fmt.Errorf("%q must be either 'BASIC' or 'FULL', got %q", key, v)) + } + + return nil, errs +} diff --git a/google/services/artifactregistry/data_source_artifact_registry_versions_test.go b/google/services/artifactregistry/data_source_artifact_registry_versions_test.go new file mode 100644 index 00000000000..fe9c6e89fc8 --- /dev/null +++ b/google/services/artifactregistry/data_source_artifact_registry_versions_test.go @@ -0,0 +1,61 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/artifactregistry/data_source_artifact_registry_versions_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package artifactregistry_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-google/google/acctest" +) + +func TestAccDataSourceArtifactRegistryVersions_basic(t *testing.T) { + t.Parallel() + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccDataSourceArtifactRegistryVersionsConfig, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("data.google_artifact_registry_versions.this", "project"), + resource.TestCheckResourceAttrSet("data.google_artifact_registry_versions.this", "location"), + resource.TestCheckResourceAttrSet("data.google_artifact_registry_versions.this", "repository_id"), + resource.TestCheckResourceAttrSet("data.google_artifact_registry_versions.this", "package_name"), + resource.TestCheckResourceAttrSet("data.google_artifact_registry_versions.this", "versions.0.name"), + resource.TestCheckResourceAttrSet("data.google_artifact_registry_versions.this", "versions.0.create_time"), + resource.TestCheckResourceAttrSet("data.google_artifact_registry_versions.this", "versions.0.update_time"), + ), + }, + }, + }) +} + +// Test the data source against the public AR repos +// https://console.cloud.google.com/artifacts/docker/cloudrun/us/container +// https://console.cloud.google.com/artifacts/docker/go-containerregistry/us/gcr.io +const testAccDataSourceArtifactRegistryVersionsConfig = ` +data "google_artifact_registry_versions" "this" { + project = "go-containerregistry" + location = "us" + repository_id = "gcr.io" + package_name = "gcrane" + filter = "name=\"projects/go-containerregistry/locations/us/repositories/gcr.io/packages/gcrane/versions/*:b*\"" + view = "FULL" +} +` diff --git a/google/services/artifactregistry/iam_artifact_registry_repository_generated_test.go b/google/services/artifactregistry/iam_artifact_registry_repository_generated_test.go index bdb141022fa..1f5406dbce3 100644 --- a/google/services/artifactregistry/iam_artifact_registry_repository_generated_test.go +++ b/google/services/artifactregistry/iam_artifact_registry_repository_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccArtifactRegistryRepositoryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_artifact_registry_repository_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s roles/artifactregistry.reader", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateArtifactRegistryRepositoryIAMBindingStateID("google_artifact_registry_repository_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccArtifactRegistryRepositoryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_artifact_registry_repository_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s roles/artifactregistry.reader", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateArtifactRegistryRepositoryIAMBindingStateID("google_artifact_registry_repository_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccArtifactRegistryRepositoryIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_artifact_registry_repository_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s roles/artifactregistry.reader user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateArtifactRegistryRepositoryIAMMemberStateID("google_artifact_registry_repository_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccArtifactRegistryRepositoryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_artifact_registry_repository_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateArtifactRegistryRepositoryIAMPolicyStateID("google_artifact_registry_repository_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccArtifactRegistryRepositoryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_artifact_registry_repository_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateArtifactRegistryRepositoryIAMPolicyStateID("google_artifact_registry_repository_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -245,3 +246,57 @@ resource "google_artifact_registry_repository_iam_binding" "foo" { } `, context) } + +func generateArtifactRegistryRepositoryIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + repository := tpgresource.GetResourceNameFromSelfLink(rawState["repository"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/repositories/%s", project, location, repository), "", "", rawState["condition.0.title"]), nil + } +} + +func generateArtifactRegistryRepositoryIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + repository := tpgresource.GetResourceNameFromSelfLink(rawState["repository"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/repositories/%s", project, location, repository), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateArtifactRegistryRepositoryIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + repository := tpgresource.GetResourceNameFromSelfLink(rawState["repository"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/repositories/%s", project, location, repository), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/artifactregistry/resource_artifact_registry_repository_generated_meta.yaml b/google/services/artifactregistry/resource_artifact_registry_repository_generated_meta.yaml index c6e810a3fdd..1171c97a750 100644 --- a/google/services/artifactregistry/resource_artifact_registry_repository_generated_meta.yaml +++ b/google/services/artifactregistry/resource_artifact_registry_repository_generated_meta.yaml @@ -1,60 +1,71 @@ -resource: 'google_artifact_registry_repository' -generation_type: 'mmv1' -source_file: 'products/artifactregistry/Repository.yaml' -api_service_name: 'artifactregistry.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Repository' +resource: google_artifact_registry_repository +generation_type: mmv1 +source_file: products/artifactregistry/Repository.yaml +api_service_name: artifactregistry.googleapis.com +api_version: v1 +api_resource_type_kind: Repository fields: - - api_field: 'cleanupPolicies.cleanupPolicies.action' - - api_field: 'cleanupPolicies.cleanupPolicies.condition.newerThan' - - api_field: 'cleanupPolicies.cleanupPolicies.condition.olderThan' - - api_field: 'cleanupPolicies.cleanupPolicies.condition.packageNamePrefixes' - - api_field: 'cleanupPolicies.cleanupPolicies.condition.tagPrefixes' - - api_field: 'cleanupPolicies.cleanupPolicies.condition.tagState' - - api_field: 'cleanupPolicies.cleanupPolicies.condition.versionNamePrefixes' - - api_field: 'cleanupPolicies.cleanupPolicies.mostRecentVersions.keepCount' - - api_field: 'cleanupPolicies.cleanupPolicies.mostRecentVersions.packageNamePrefixes' - - api_field: 'cleanupPolicyDryRun' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'dockerConfig.immutableTags' - - field: 'effective_labels' - provider_only: true - - api_field: 'format' - - api_field: 'kmsKeyName' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mavenConfig.allowSnapshotOverwrites' - - api_field: 'mavenConfig.versionPolicy' - - api_field: 'mode' - - api_field: 'name' - - api_field: 'registryUri' - - api_field: 'remoteRepositoryConfig.aptRepository.publicRepository.repositoryBase' - - api_field: 'remoteRepositoryConfig.aptRepository.publicRepository.repositoryPath' - - api_field: 'remoteRepositoryConfig.commonRepository.uri' - - api_field: 'remoteRepositoryConfig.description' - - api_field: 'remoteRepositoryConfig.disableUpstreamValidation' - - api_field: 'remoteRepositoryConfig.dockerRepository.customRepository.uri' - - api_field: 'remoteRepositoryConfig.dockerRepository.publicRepository' - - api_field: 'remoteRepositoryConfig.mavenRepository.customRepository.uri' - - api_field: 'remoteRepositoryConfig.mavenRepository.publicRepository' - - api_field: 'remoteRepositoryConfig.npmRepository.customRepository.uri' - - api_field: 'remoteRepositoryConfig.npmRepository.publicRepository' - - api_field: 'remoteRepositoryConfig.pythonRepository.customRepository.uri' - - api_field: 'remoteRepositoryConfig.pythonRepository.publicRepository' - - api_field: 'remoteRepositoryConfig.upstreamCredentials.usernamePasswordCredentials.passwordSecretVersion' - - api_field: 'remoteRepositoryConfig.upstreamCredentials.usernamePasswordCredentials.username' - - api_field: 'remoteRepositoryConfig.yumRepository.publicRepository.repositoryBase' - - api_field: 'remoteRepositoryConfig.yumRepository.publicRepository.repositoryPath' - - field: 'repository_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'virtualRepositoryConfig.upstreamPolicies.id' - - api_field: 'virtualRepositoryConfig.upstreamPolicies.priority' - - api_field: 'virtualRepositoryConfig.upstreamPolicies.repository' - - api_field: 'vulnerabilityScanningConfig.enablementConfig' - - api_field: 'vulnerabilityScanningConfig.enablementState' - - api_field: 'vulnerabilityScanningConfig.enablementStateReason' + - api_field: cleanupPolicies.key + field: cleanup_policies.id + - api_field: cleanupPolicies.value.action + field: cleanup_policies.action + - api_field: cleanupPolicies.value.condition.newerThan + field: cleanup_policies.condition.newer_than + - api_field: cleanupPolicies.value.condition.olderThan + field: cleanup_policies.condition.older_than + - api_field: cleanupPolicies.value.condition.packageNamePrefixes + field: cleanup_policies.condition.package_name_prefixes + - api_field: cleanupPolicies.value.condition.tagPrefixes + field: cleanup_policies.condition.tag_prefixes + - api_field: cleanupPolicies.value.condition.tagState + field: cleanup_policies.condition.tag_state + - api_field: cleanupPolicies.value.condition.versionNamePrefixes + field: cleanup_policies.condition.version_name_prefixes + - api_field: cleanupPolicies.value.mostRecentVersions.keepCount + field: cleanup_policies.most_recent_versions.keep_count + - api_field: cleanupPolicies.value.mostRecentVersions.packageNamePrefixes + field: cleanup_policies.most_recent_versions.package_name_prefixes + - api_field: cleanupPolicyDryRun + - api_field: createTime + - api_field: description + - api_field: dockerConfig.immutableTags + - field: effective_labels + provider_only: true + - api_field: format + - api_field: kmsKeyName + - api_field: labels + - field: location + provider_only: true + - api_field: mavenConfig.allowSnapshotOverwrites + - api_field: mavenConfig.versionPolicy + - api_field: mode + - api_field: name + - api_field: registryUri + - api_field: remoteRepositoryConfig.aptRepository.publicRepository.repositoryBase + - api_field: remoteRepositoryConfig.aptRepository.publicRepository.repositoryPath + - api_field: remoteRepositoryConfig.commonRepository.uri + - api_field: remoteRepositoryConfig.description + - api_field: remoteRepositoryConfig.disableUpstreamValidation + - api_field: remoteRepositoryConfig.dockerRepository.customRepository.uri + - api_field: remoteRepositoryConfig.dockerRepository.publicRepository + - api_field: remoteRepositoryConfig.mavenRepository.customRepository.uri + - api_field: remoteRepositoryConfig.mavenRepository.publicRepository + - api_field: remoteRepositoryConfig.npmRepository.customRepository.uri + - api_field: remoteRepositoryConfig.npmRepository.publicRepository + - api_field: remoteRepositoryConfig.pythonRepository.customRepository.uri + - api_field: remoteRepositoryConfig.pythonRepository.publicRepository + - api_field: remoteRepositoryConfig.upstreamCredentials.usernamePasswordCredentials.passwordSecretVersion + - api_field: remoteRepositoryConfig.upstreamCredentials.usernamePasswordCredentials.username + - api_field: remoteRepositoryConfig.yumRepository.publicRepository.repositoryBase + - api_field: remoteRepositoryConfig.yumRepository.publicRepository.repositoryPath + - field: repository_id + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: virtualRepositoryConfig.upstreamPolicies.id + - api_field: virtualRepositoryConfig.upstreamPolicies.priority + - api_field: virtualRepositoryConfig.upstreamPolicies.repository + - api_field: vulnerabilityScanningConfig.enablementConfig + - api_field: vulnerabilityScanningConfig.enablementState + - api_field: vulnerabilityScanningConfig.enablementStateReason diff --git a/google/services/backupdr/data_source_backup_dr_backup_plan_test.go b/google/services/backupdr/data_source_backup_dr_backup_plan_test.go index aa36093a554..d913bf79f8f 100644 --- a/google/services/backupdr/data_source_backup_dr_backup_plan_test.go +++ b/google/services/backupdr/data_source_backup_dr_backup_plan_test.go @@ -93,6 +93,7 @@ resource "google_backup_dr_backup_plan" "test" { lifecycle { ignore_changes = [backup_vault] } + max_custom_on_demand_retention_days = 30 backup_rules { rule_id = "rule-1" backup_retention_days = 5 diff --git a/google/services/backupdr/resource_backup_dr_backup_plan.go b/google/services/backupdr/resource_backup_dr_backup_plan.go index 9a1926383eb..d278aa0fb89 100644 --- a/google/services/backupdr/resource_backup_dr_backup_plan.go +++ b/google/services/backupdr/resource_backup_dr_backup_plan.go @@ -280,6 +280,11 @@ Examples include, "compute.googleapis.com/Instance", "compute.googleapis.com/Dis ForceNew: true, Description: `This is only applicable for CloudSql resource. Days for which logs will be stored. This value should be greater than or equal to minimum enforced log retention duration of the backup vault.`, }, + "max_custom_on_demand_retention_days": { + Type: schema.TypeInt, + Optional: true, + Description: `The maximum number of days for which an on-demand backup taken with custom retention can be retained.`, + }, "backup_vault_service_account": { Type: schema.TypeString, Computed: true, @@ -345,6 +350,12 @@ func resourceBackupDRBackupPlanCreate(d *schema.ResourceData, meta interface{}) } else if v, ok := d.GetOkExists("resource_type"); !tpgresource.IsEmptyValue(reflect.ValueOf(resourceTypeProp)) && (ok || !reflect.DeepEqual(v, resourceTypeProp)) { obj["resourceType"] = resourceTypeProp } + maxCustomOnDemandRetentionDaysProp, err := expandBackupDRBackupPlanMaxCustomOnDemandRetentionDays(d.Get("max_custom_on_demand_retention_days"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("max_custom_on_demand_retention_days"); !tpgresource.IsEmptyValue(reflect.ValueOf(maxCustomOnDemandRetentionDaysProp)) && (ok || !reflect.DeepEqual(v, maxCustomOnDemandRetentionDaysProp)) { + obj["maxCustomOnDemandRetentionDays"] = maxCustomOnDemandRetentionDaysProp + } backupRulesProp, err := expandBackupDRBackupPlanBackupRules(d.Get("backup_rules"), d, config) if err != nil { return err @@ -501,6 +512,9 @@ func resourceBackupDRBackupPlanRead(d *schema.ResourceData, meta interface{}) er if err := d.Set("update_time", flattenBackupDRBackupPlanUpdateTime(res["updateTime"], d, config)); err != nil { return fmt.Errorf("Error reading BackupPlan: %s", err) } + if err := d.Set("max_custom_on_demand_retention_days", flattenBackupDRBackupPlanMaxCustomOnDemandRetentionDays(res["maxCustomOnDemandRetentionDays"], d, config)); err != nil { + return fmt.Errorf("Error reading BackupPlan: %s", err) + } if err := d.Set("backup_rules", flattenBackupDRBackupPlanBackupRules(res["backupRules"], d, config)); err != nil { return fmt.Errorf("Error reading BackupPlan: %s", err) } @@ -584,6 +598,12 @@ func resourceBackupDRBackupPlanUpdate(d *schema.ResourceData, meta interface{}) } else if v, ok := d.GetOkExists("resource_type"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, resourceTypeProp)) { obj["resourceType"] = resourceTypeProp } + maxCustomOnDemandRetentionDaysProp, err := expandBackupDRBackupPlanMaxCustomOnDemandRetentionDays(d.Get("max_custom_on_demand_retention_days"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("max_custom_on_demand_retention_days"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, maxCustomOnDemandRetentionDaysProp)) { + obj["maxCustomOnDemandRetentionDays"] = maxCustomOnDemandRetentionDaysProp + } backupRulesProp, err := expandBackupDRBackupPlanBackupRules(d.Get("backup_rules"), d, config) if err != nil { return err @@ -608,6 +628,10 @@ func resourceBackupDRBackupPlanUpdate(d *schema.ResourceData, meta interface{}) updateMask = append(updateMask, "resourceType") } + if d.HasChange("max_custom_on_demand_retention_days") { + updateMask = append(updateMask, "maxCustomOnDemandRetentionDays") + } + if d.HasChange("backup_rules") { updateMask = append(updateMask, "backupRules") } @@ -762,6 +786,23 @@ func flattenBackupDRBackupPlanUpdateTime(v interface{}, d *schema.ResourceData, return v } +func flattenBackupDRBackupPlanMaxCustomOnDemandRetentionDays(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + func flattenBackupDRBackupPlanBackupRules(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v @@ -968,6 +1009,10 @@ func expandBackupDRBackupPlanResourceType(v interface{}, d tpgresource.Terraform return v, nil } +func expandBackupDRBackupPlanMaxCustomOnDemandRetentionDays(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandBackupDRBackupPlanBackupRules(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { if v == nil { return nil, nil diff --git a/google/services/backupdr/resource_backup_dr_backup_plan_association_generated_meta.yaml b/google/services/backupdr/resource_backup_dr_backup_plan_association_generated_meta.yaml index 5ead0ac4fc4..0263b24df90 100644 --- a/google/services/backupdr/resource_backup_dr_backup_plan_association_generated_meta.yaml +++ b/google/services/backupdr/resource_backup_dr_backup_plan_association_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_backup_dr_backup_plan_association' -generation_type: 'mmv1' -source_file: 'products/backupdr/BackupPlanAssociation.yaml' -api_service_name: 'backupdr.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupPlanAssociation' +resource: google_backup_dr_backup_plan_association +generation_type: mmv1 +source_file: products/backupdr/BackupPlanAssociation.yaml +api_service_name: backupdr.googleapis.com +api_version: v1 +api_resource_type_kind: BackupPlanAssociation fields: - - api_field: 'backupPlan' - - field: 'backup_plan_association_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataSource' - - api_field: 'lastSuccessfulBackupConsistencyTime' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'resource' - - api_field: 'resourceType' - - api_field: 'rulesConfigInfo.lastBackupError.code' - - api_field: 'rulesConfigInfo.lastBackupError.message' - - api_field: 'rulesConfigInfo.lastBackupState' - - api_field: 'rulesConfigInfo.ruleId' - - api_field: 'updateTime' + - api_field: backupPlan + - field: backup_plan_association_id + provider_only: true + - api_field: createTime + - api_field: dataSource + - api_field: lastSuccessfulBackupConsistencyTime + - field: location + provider_only: true + - api_field: name + - api_field: resource + - api_field: resourceType + - api_field: rulesConfigInfo.lastBackupError.code + - api_field: rulesConfigInfo.lastBackupError.message + - api_field: rulesConfigInfo.lastBackupState + - api_field: rulesConfigInfo.ruleId + - api_field: updateTime diff --git a/google/services/backupdr/resource_backup_dr_backup_plan_generated_meta.yaml b/google/services/backupdr/resource_backup_dr_backup_plan_generated_meta.yaml index b1eca018417..3b82739ae03 100644 --- a/google/services/backupdr/resource_backup_dr_backup_plan_generated_meta.yaml +++ b/google/services/backupdr/resource_backup_dr_backup_plan_generated_meta.yaml @@ -1,32 +1,33 @@ -resource: 'google_backup_dr_backup_plan' -generation_type: 'mmv1' -source_file: 'products/backupdr/BackupPlan.yaml' -api_service_name: 'backupdr.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupPlan' +resource: google_backup_dr_backup_plan +generation_type: mmv1 +source_file: products/backupdr/BackupPlan.yaml +api_service_name: backupdr.googleapis.com +api_version: v1 +api_resource_type_kind: BackupPlan fields: - - field: 'backup_plan_id' - provider_only: true - - api_field: 'backupRules.backupRetentionDays' - - api_field: 'backupRules.ruleId' - - api_field: 'backupRules.standardSchedule.backupWindow.endHourOfDay' - - api_field: 'backupRules.standardSchedule.backupWindow.startHourOfDay' - - api_field: 'backupRules.standardSchedule.daysOfMonth' - - api_field: 'backupRules.standardSchedule.daysOfWeek' - - api_field: 'backupRules.standardSchedule.hourlyFrequency' - - api_field: 'backupRules.standardSchedule.months' - - api_field: 'backupRules.standardSchedule.recurrenceType' - - api_field: 'backupRules.standardSchedule.timeZone' - - api_field: 'backupRules.standardSchedule.weekDayOfMonth.dayOfWeek' - - api_field: 'backupRules.standardSchedule.weekDayOfMonth.weekOfMonth' - - api_field: 'backupVault' - - api_field: 'backupVaultServiceAccount' - - api_field: 'createTime' - - api_field: 'description' - - field: 'location' - provider_only: true - - api_field: 'logRetentionDays' - - api_field: 'name' - - api_field: 'resourceType' - - api_field: 'supportedResourceTypes' - - api_field: 'updateTime' + - field: backup_plan_id + provider_only: true + - api_field: backupRules.backupRetentionDays + - api_field: backupRules.ruleId + - api_field: backupRules.standardSchedule.backupWindow.endHourOfDay + - api_field: backupRules.standardSchedule.backupWindow.startHourOfDay + - api_field: backupRules.standardSchedule.daysOfMonth + - api_field: backupRules.standardSchedule.daysOfWeek + - api_field: backupRules.standardSchedule.hourlyFrequency + - api_field: backupRules.standardSchedule.months + - api_field: backupRules.standardSchedule.recurrenceType + - api_field: backupRules.standardSchedule.timeZone + - api_field: backupRules.standardSchedule.weekDayOfMonth.dayOfWeek + - api_field: backupRules.standardSchedule.weekDayOfMonth.weekOfMonth + - api_field: backupVault + - api_field: backupVaultServiceAccount + - api_field: createTime + - api_field: description + - field: location + provider_only: true + - api_field: logRetentionDays + - api_field: maxCustomOnDemandRetentionDays + - api_field: name + - api_field: resourceType + - api_field: supportedResourceTypes + - api_field: updateTime diff --git a/google/services/backupdr/resource_backup_dr_backup_plan_generated_test.go b/google/services/backupdr/resource_backup_dr_backup_plan_generated_test.go index f255653c5e0..61d9ce9480c 100644 --- a/google/services/backupdr/resource_backup_dr_backup_plan_generated_test.go +++ b/google/services/backupdr/resource_backup_dr_backup_plan_generated_test.go @@ -94,6 +94,7 @@ resource "google_backup_dr_backup_plan" "my-backup-plan-1" { backup_plan_id = "tf-test-backup-plan-simple-test%{random_suffix}" resource_type = "compute.googleapis.com/Instance" backup_vault = google_backup_dr_backup_vault.my_backup_vault.id + max_custom_on_demand_retention_days = 30 backup_rules { rule_id = "rule-1" diff --git a/google/services/backupdr/resource_backup_dr_backup_plan_test.go b/google/services/backupdr/resource_backup_dr_backup_plan_test.go index 0ff3498c0bb..b3dc2814563 100644 --- a/google/services/backupdr/resource_backup_dr_backup_plan_test.go +++ b/google/services/backupdr/resource_backup_dr_backup_plan_test.go @@ -117,6 +117,7 @@ resource "google_backup_dr_backup_plan" "bp" { backup_plan_id = "tf-test-bp-test-%{random_suffix}" resource_type = "compute.googleapis.com/Instance" backup_vault = google_backup_dr_backup_vault.my-backup-vault.name + max_custom_on_demand_retention_days = 30 backup_rules { rule_id = "rule-1" @@ -199,6 +200,7 @@ resource "google_backup_dr_backup_plan" "bp" { backup_plan_id = "tf-test-bp-test-%{random_suffix}" resource_type = "compute.googleapis.com/Instance" backup_vault = google_backup_dr_backup_vault.my-backup-vault.name + max_custom_on_demand_retention_days = 45 backup_rules { rule_id = "rule-1" diff --git a/google/services/backupdr/resource_backup_dr_backup_vault.go b/google/services/backupdr/resource_backup_dr_backup_vault.go index 8acf7fa1fcc..85401ba2359 100644 --- a/google/services/backupdr/resource_backup_dr_backup_vault.go +++ b/google/services/backupdr/resource_backup_dr_backup_vault.go @@ -554,9 +554,6 @@ func resourceBackupDRBackupVaultRead(d *schema.ResourceData, meta interface{}) e if err := d.Set("access_restriction", flattenBackupDRBackupVaultAccessRestriction(res["accessRestriction"], d, config)); err != nil { return fmt.Errorf("Error reading BackupVault: %s", err) } - if err := d.Set("encryption_config", flattenBackupDRBackupVaultEncryptionConfig(res["encryptionConfig"], d, config)); err != nil { - return fmt.Errorf("Error reading BackupVault: %s", err) - } if err := d.Set("terraform_labels", flattenBackupDRBackupVaultTerraformLabels(res["labels"], d, config)); err != nil { return fmt.Errorf("Error reading BackupVault: %s", err) } @@ -939,23 +936,6 @@ func flattenBackupDRBackupVaultAccessRestriction(v interface{}, d *schema.Resour return v } -func flattenBackupDRBackupVaultEncryptionConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return nil - } - original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } - transformed := make(map[string]interface{}) - transformed["kms_key_name"] = - flattenBackupDRBackupVaultEncryptionConfigKmsKeyName(original["kmsKeyName"], d, config) - return []interface{}{transformed} -} -func flattenBackupDRBackupVaultEncryptionConfigKmsKeyName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - return v -} - func flattenBackupDRBackupVaultTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v diff --git a/google/services/backupdr/resource_backup_dr_backup_vault_generated_meta.yaml b/google/services/backupdr/resource_backup_dr_backup_vault_generated_meta.yaml index a2683857f2f..66268472914 100644 --- a/google/services/backupdr/resource_backup_dr_backup_vault_generated_meta.yaml +++ b/google/services/backupdr/resource_backup_dr_backup_vault_generated_meta.yaml @@ -1,45 +1,45 @@ -resource: 'google_backup_dr_backup_vault' -generation_type: 'mmv1' -source_file: 'products/backupdr/BackupVault.yaml' -api_service_name: 'backupdr.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupVault' +resource: google_backup_dr_backup_vault +generation_type: mmv1 +source_file: products/backupdr/BackupVault.yaml +api_service_name: backupdr.googleapis.com +api_version: v1 +api_resource_type_kind: BackupVault fields: - - api_field: 'accessRestriction' - - field: 'allow_missing' - provider_only: true - - api_field: 'annotations' - - api_field: 'backupCount' - - api_field: 'backupMinimumEnforcedRetentionDuration' - - api_field: 'backupRetentionInheritance' - - field: 'backup_vault_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'deletable' - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'effectiveTime' - - api_field: 'encryptionConfig.kmsKeyName' - - api_field: 'etag' - - field: 'force_delete' - provider_only: true - - field: 'force_update' - provider_only: true - - field: 'ignore_backup_plan_references' - provider_only: true - - field: 'ignore_inactive_datasources' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'serviceAccount' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'totalStoredBytes' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: accessRestriction + - field: allow_missing + provider_only: true + - api_field: annotations + - api_field: backupCount + - api_field: backupMinimumEnforcedRetentionDuration + - api_field: backupRetentionInheritance + - field: backup_vault_id + provider_only: true + - api_field: createTime + - api_field: deletable + - api_field: description + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: effectiveTime + - api_field: encryptionConfig.kmsKeyName + - api_field: etag + - field: force_delete + provider_only: true + - field: force_update + provider_only: true + - field: ignore_backup_plan_references + provider_only: true + - field: ignore_inactive_datasources + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: serviceAccount + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: totalStoredBytes + - api_field: uid + - api_field: updateTime diff --git a/google/services/backupdr/resource_backup_dr_backup_vault_generated_test.go b/google/services/backupdr/resource_backup_dr_backup_vault_generated_test.go index 3098fe4b333..18c6520570f 100644 --- a/google/services/backupdr/resource_backup_dr_backup_vault_generated_test.go +++ b/google/services/backupdr/resource_backup_dr_backup_vault_generated_test.go @@ -70,7 +70,7 @@ func TestAccBackupDRBackupVault_backupDrBackupVaultSimpleExample(t *testing.T) { ResourceName: "google_backup_dr_backup_vault.backup-vault-test", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "encryption_config", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"}, }, { ResourceName: "google_backup_dr_backup_vault.backup-vault-test", @@ -134,7 +134,7 @@ func TestAccBackupDRBackupVault_backupDrBackupVaultCmekExample(t *testing.T) { ResourceName: "google_backup_dr_backup_vault.backup-vault-cmek", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"allow_missing", "annotations", "backup_retention_inheritance", "backup_vault_id", "encryption_config", "force_delete", "force_update", "ignore_backup_plan_references", "ignore_inactive_datasources", "labels", "location", "terraform_labels"}, }, { ResourceName: "google_backup_dr_backup_vault.backup-vault-cmek", diff --git a/google/services/backupdr/resource_backup_dr_management_server_generated_meta.yaml b/google/services/backupdr/resource_backup_dr_management_server_generated_meta.yaml index 37abe347678..0e07c8554f5 100644 --- a/google/services/backupdr/resource_backup_dr_management_server_generated_meta.yaml +++ b/google/services/backupdr/resource_backup_dr_management_server_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_backup_dr_management_server' -generation_type: 'mmv1' -source_file: 'products/backupdr/ManagementServer.yaml' -api_service_name: 'backupdr.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ManagementServer' +resource: google_backup_dr_management_server +generation_type: mmv1 +source_file: products/backupdr/ManagementServer.yaml +api_service_name: backupdr.googleapis.com +api_version: v1 +api_resource_type_kind: ManagementServer fields: - - field: 'location' - provider_only: true - - api_field: 'managementUri.api' - - api_field: 'managementUri.webUi' - - field: 'name' - provider_only: true - - api_field: 'networks.network' - - api_field: 'networks.peeringMode' - - api_field: 'oauth2ClientId' - - api_field: 'type' + - field: location + provider_only: true + - api_field: managementUri.api + - api_field: managementUri.webUi + - field: name + provider_only: true + - api_field: networks.network + - api_field: networks.peeringMode + - api_field: oauth2ClientId + - api_field: type diff --git a/google/services/backupdr/resource_backup_dr_service_config_generated_meta.yaml b/google/services/backupdr/resource_backup_dr_service_config_generated_meta.yaml index 2943e03fbd3..9f055aaf77d 100644 --- a/google/services/backupdr/resource_backup_dr_service_config_generated_meta.yaml +++ b/google/services/backupdr/resource_backup_dr_service_config_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_backup_dr_service_config' -generation_type: 'mmv1' -source_file: 'products/backupdr/ServiceConfig.yaml' -api_service_name: 'backupdr.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServiceConfig' +resource: google_backup_dr_service_config +generation_type: mmv1 +source_file: products/backupdr/ServiceConfig.yaml +api_service_name: backupdr.googleapis.com +api_version: v1 +api_resource_type_kind: ServiceConfig fields: - - field: 'location' - provider_only: true - - api_field: 'resourceType' + - field: location + provider_only: true + - api_field: resourceType diff --git a/google/services/beyondcorp/iam_beyondcorp_security_gateway_application_generated_test.go b/google/services/beyondcorp/iam_beyondcorp_security_gateway_application_generated_test.go index 36242478e01..805e5e020de 100644 --- a/google/services/beyondcorp/iam_beyondcorp_security_gateway_application_generated_test.go +++ b/google/services/beyondcorp/iam_beyondcorp_security_gateway_application_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamBindingGenerated(t *testing.T }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMBindingStateID("google_beyondcorp_security_gateway_application_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamBindingGenerated(t *testing.T }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMBindingStateID("google_beyondcorp_security_gateway_application_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamMemberGenerated(t *testing.T) }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMMemberStateID("google_beyondcorp_security_gateway_application_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamPolicyGenerated(t *testing.T) }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMPolicyStateID("google_beyondcorp_security_gateway_application_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamPolicyGenerated(t *testing.T) }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMPolicyStateID("google_beyondcorp_security_gateway_application_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamBindingGenerated_withConditio }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMBindingStateID("google_beyondcorp_security_gateway_application_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamBindingGenerated_withAndWitho }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMBindingStateID("google_beyondcorp_security_gateway_application_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMBindingStateID("google_beyondcorp_security_gateway_application_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMBindingStateID("google_beyondcorp_security_gateway_application_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamMemberGenerated_withCondition }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMMemberStateID("google_beyondcorp_security_gateway_application_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamMemberGenerated_withAndWithou }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMMemberStateID("google_beyondcorp_security_gateway_application_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMMemberStateID("google_beyondcorp_security_gateway_application_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMMemberStateID("google_beyondcorp_security_gateway_application_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccBeyondcorpSecurityGatewayApplicationIamPolicyGenerated_withCondition }, { ResourceName: "google_beyondcorp_security_gateway_application_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-default-sg%s", context["random_suffix"]), fmt.Sprintf("tf-test-google-sga%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayApplicationIAMPolicyStateID("google_beyondcorp_security_gateway_application_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -708,3 +709,56 @@ resource "google_beyondcorp_security_gateway_application_iam_policy" "foo" { } `, context) } +func generateBeyondcorpSecurityGatewayApplicationIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + security_gateway_id := tpgresource.GetResourceNameFromSelfLink(rawState["security_gateway_id"]) + application_id := tpgresource.GetResourceNameFromSelfLink(rawState["application_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s", project, security_gateway_id, application_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBeyondcorpSecurityGatewayApplicationIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + security_gateway_id := tpgresource.GetResourceNameFromSelfLink(rawState["security_gateway_id"]) + application_id := tpgresource.GetResourceNameFromSelfLink(rawState["application_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s", project, security_gateway_id, application_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBeyondcorpSecurityGatewayApplicationIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + security_gateway_id := tpgresource.GetResourceNameFromSelfLink(rawState["security_gateway_id"]) + application_id := tpgresource.GetResourceNameFromSelfLink(rawState["application_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/global/securityGateways/%s/applications/%s", project, security_gateway_id, application_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/beyondcorp/iam_beyondcorp_security_gateway_generated_test.go b/google/services/beyondcorp/iam_beyondcorp_security_gateway_generated_test.go index 6f2a9be9169..f62d076c03b 100644 --- a/google/services/beyondcorp/iam_beyondcorp_security_gateway_generated_test.go +++ b/google/services/beyondcorp/iam_beyondcorp_security_gateway_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccBeyondcorpSecurityGatewayIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_beyondcorp_security_gateway_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMBindingStateID("google_beyondcorp_security_gateway_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccBeyondcorpSecurityGatewayIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_beyondcorp_security_gateway_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMBindingStateID("google_beyondcorp_security_gateway_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccBeyondcorpSecurityGatewayIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_beyondcorp_security_gateway_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMMemberStateID("google_beyondcorp_security_gateway_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccBeyondcorpSecurityGatewayIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_beyondcorp_security_gateway_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMPolicyStateID("google_beyondcorp_security_gateway_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccBeyondcorpSecurityGatewayIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_beyondcorp_security_gateway_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMPolicyStateID("google_beyondcorp_security_gateway_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccBeyondcorpSecurityGatewayIamBindingGenerated_withCondition(t *testin }, { ResourceName: "google_beyondcorp_security_gateway_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser %s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMBindingStateID("google_beyondcorp_security_gateway_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccBeyondcorpSecurityGatewayIamBindingGenerated_withAndWithoutCondition }, { ResourceName: "google_beyondcorp_security_gateway_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMBindingStateID("google_beyondcorp_security_gateway_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser %s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMBindingStateID("google_beyondcorp_security_gateway_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser %s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMBindingStateID("google_beyondcorp_security_gateway_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccBeyondcorpSecurityGatewayIamMemberGenerated_withCondition(t *testing }, { ResourceName: "google_beyondcorp_security_gateway_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMMemberStateID("google_beyondcorp_security_gateway_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccBeyondcorpSecurityGatewayIamMemberGenerated_withAndWithoutCondition( }, { ResourceName: "google_beyondcorp_security_gateway_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMMemberStateID("google_beyondcorp_security_gateway_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMMemberStateID("google_beyondcorp_security_gateway_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_beyondcorp_security_gateway_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s roles/beyondcorp.securityGatewayUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMMemberStateID("google_beyondcorp_security_gateway_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccBeyondcorpSecurityGatewayIamPolicyGenerated_withCondition(t *testing }, { ResourceName: "google_beyondcorp_security_gateway_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s", envvar.GetTestProjectFromEnv(), "global", fmt.Sprintf("default%s", context["random_suffix"])), + ImportStateIdFunc: generateBeyondcorpSecurityGatewayIAMPolicyStateID("google_beyondcorp_security_gateway_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -618,3 +619,56 @@ resource "google_beyondcorp_security_gateway_iam_policy" "foo" { } `, context) } +func generateBeyondcorpSecurityGatewayIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + security_gateway_id := tpgresource.GetResourceNameFromSelfLink(rawState["security_gateway_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s", project, location, security_gateway_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBeyondcorpSecurityGatewayIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + security_gateway_id := tpgresource.GetResourceNameFromSelfLink(rawState["security_gateway_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s", project, location, security_gateway_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBeyondcorpSecurityGatewayIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + security_gateway_id := tpgresource.GetResourceNameFromSelfLink(rawState["security_gateway_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/securityGateways/%s", project, location, security_gateway_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/beyondcorp/resource_beyondcorp_app_connection_generated_meta.yaml b/google/services/beyondcorp/resource_beyondcorp_app_connection_generated_meta.yaml index d7e7b0b394a..cf634820684 100644 --- a/google/services/beyondcorp/resource_beyondcorp_app_connection_generated_meta.yaml +++ b/google/services/beyondcorp/resource_beyondcorp_app_connection_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_beyondcorp_app_connection' -generation_type: 'mmv1' -source_file: 'products/beyondcorp/AppConnection.yaml' -api_service_name: 'beyondcorp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AppConnection' +resource: google_beyondcorp_app_connection +generation_type: mmv1 +source_file: products/beyondcorp/AppConnection.yaml +api_service_name: beyondcorp.googleapis.com +api_version: v1 +api_resource_type_kind: AppConnection fields: - - api_field: 'applicationEndpoint.host' - - api_field: 'applicationEndpoint.port' - - api_field: 'connectors' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'gateway.appGateway' - - api_field: 'gateway.ingressPort' - - api_field: 'gateway.type' - - api_field: 'gateway.uri' - - api_field: 'labels' - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' + - api_field: applicationEndpoint.host + - api_field: applicationEndpoint.port + - api_field: connectors + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: gateway.appGateway + - api_field: gateway.ingressPort + - api_field: gateway.type + - api_field: gateway.uri + - api_field: labels + - field: name + provider_only: true + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: type diff --git a/google/services/beyondcorp/resource_beyondcorp_app_connector_generated_meta.yaml b/google/services/beyondcorp/resource_beyondcorp_app_connector_generated_meta.yaml index cee53761d4b..3bc67d563c2 100644 --- a/google/services/beyondcorp/resource_beyondcorp_app_connector_generated_meta.yaml +++ b/google/services/beyondcorp/resource_beyondcorp_app_connector_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_beyondcorp_app_connector' -generation_type: 'mmv1' -source_file: 'products/beyondcorp/AppConnector.yaml' -api_service_name: 'beyondcorp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AppConnector' +resource: google_beyondcorp_app_connector +generation_type: mmv1 +source_file: products/beyondcorp/AppConnector.yaml +api_service_name: beyondcorp.googleapis.com +api_version: v1 +api_resource_type_kind: AppConnector fields: - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'principalInfo.serviceAccount.email' - - field: 'region' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: labels + - field: name + provider_only: true + - api_field: principalInfo.serviceAccount.email + - field: region + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true diff --git a/google/services/beyondcorp/resource_beyondcorp_app_gateway_generated_meta.yaml b/google/services/beyondcorp/resource_beyondcorp_app_gateway_generated_meta.yaml index 7ad90f6ed42..36bfcb60d8c 100644 --- a/google/services/beyondcorp/resource_beyondcorp_app_gateway_generated_meta.yaml +++ b/google/services/beyondcorp/resource_beyondcorp_app_gateway_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_beyondcorp_app_gateway' -generation_type: 'mmv1' -source_file: 'products/beyondcorp/AppGateway.yaml' -api_service_name: 'beyondcorp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AppGateway' +resource: google_beyondcorp_app_gateway +generation_type: mmv1 +source_file: products/beyondcorp/AppGateway.yaml +api_service_name: beyondcorp.googleapis.com +api_version: v1 +api_resource_type_kind: AppGateway fields: - - api_field: 'allocatedConnections.ingressPort' - - api_field: 'allocatedConnections.pscUri' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'hostType' - - api_field: 'labels' - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'uri' + - api_field: allocatedConnections.ingressPort + - api_field: allocatedConnections.pscUri + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: hostType + - api_field: labels + - field: name + provider_only: true + - field: region + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: uri diff --git a/google/services/beyondcorp/resource_beyondcorp_security_gateway.go b/google/services/beyondcorp/resource_beyondcorp_security_gateway.go index eac5b5e6bb7..2bf99ec5d0d 100644 --- a/google/services/beyondcorp/resource_beyondcorp_security_gateway.go +++ b/google/services/beyondcorp/resource_beyondcorp_security_gateway.go @@ -418,7 +418,7 @@ func resourceBeyondcorpSecurityGatewayCreate(d *schema.ResourceData, meta interf serviceDiscoveryProp, err := expandBeyondcorpSecurityGatewayServiceDiscovery(d.Get("service_discovery"), d, config) if err != nil { return err - } else if v, ok := d.GetOkExists("service_discovery"); !tpgresource.IsEmptyValue(reflect.ValueOf(serviceDiscoveryProp)) && (ok || !reflect.DeepEqual(v, serviceDiscoveryProp)) { + } else if v, ok := d.GetOkExists("service_discovery"); ok || !reflect.DeepEqual(v, serviceDiscoveryProp) { obj["serviceDiscovery"] = serviceDiscoveryProp } @@ -657,7 +657,7 @@ func resourceBeyondcorpSecurityGatewayUpdate(d *schema.ResourceData, meta interf serviceDiscoveryProp, err := expandBeyondcorpSecurityGatewayServiceDiscovery(d.Get("service_discovery"), d, config) if err != nil { return err - } else if v, ok := d.GetOkExists("service_discovery"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, serviceDiscoveryProp)) { + } else if v, ok := d.GetOkExists("service_discovery"); ok || !reflect.DeepEqual(v, serviceDiscoveryProp) { obj["serviceDiscovery"] = serviceDiscoveryProp } @@ -980,9 +980,6 @@ func flattenBeyondcorpSecurityGatewayServiceDiscovery(v interface{}, d *schema.R return nil } original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } transformed := make(map[string]interface{}) transformed["api_gateway"] = flattenBeyondcorpSecurityGatewayServiceDiscoveryApiGateway(original["apiGateway"], d, config) @@ -1276,9 +1273,14 @@ func expandBeyondcorpSecurityGatewayServiceDiscovery(v interface{}, d tpgresourc return nil, nil } l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { + if len(l) == 0 { return nil, nil } + + if l[0] == nil { + transformed := make(map[string]interface{}) + return transformed, nil + } raw := l[0] original := raw.(map[string]interface{}) transformed := make(map[string]interface{}) diff --git a/google/services/beyondcorp/resource_beyondcorp_security_gateway_application.go b/google/services/beyondcorp/resource_beyondcorp_security_gateway_application.go index f4a9232abea..546080b8ca8 100644 --- a/google/services/beyondcorp/resource_beyondcorp_security_gateway_application.go +++ b/google/services/beyondcorp/resource_beyondcorp_security_gateway_application.go @@ -986,9 +986,6 @@ func flattenBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextual return nil } original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } transformed := make(map[string]interface{}) transformed["output_type"] = flattenBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersUserInfoOutputType(original["outputType"], d, config) @@ -1003,9 +1000,6 @@ func flattenBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextual return nil } original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } transformed := make(map[string]interface{}) transformed["output_type"] = flattenBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersGroupInfoOutputType(original["outputType"], d, config) @@ -1020,9 +1014,6 @@ func flattenBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextual return nil } original := v.(map[string]interface{}) - if len(original) == 0 { - return nil - } transformed := make(map[string]interface{}) transformed["output_type"] = flattenBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersDeviceInfoOutputType(original["outputType"], d, config) @@ -1333,21 +1324,21 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH transformedUserInfo, err := expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersUserInfo(original["user_info"], d, config) if err != nil { return nil, err - } else if val := reflect.ValueOf(transformedUserInfo); val.IsValid() && !tpgresource.IsEmptyValue(val) { + } else { transformed["userInfo"] = transformedUserInfo } transformedGroupInfo, err := expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersGroupInfo(original["group_info"], d, config) if err != nil { return nil, err - } else if val := reflect.ValueOf(transformedGroupInfo); val.IsValid() && !tpgresource.IsEmptyValue(val) { + } else { transformed["groupInfo"] = transformedGroupInfo } transformedDeviceInfo, err := expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualHeadersDeviceInfo(original["device_info"], d, config) if err != nil { return nil, err - } else if val := reflect.ValueOf(transformedDeviceInfo); val.IsValid() && !tpgresource.IsEmptyValue(val) { + } else { transformed["deviceInfo"] = transformedDeviceInfo } @@ -1366,9 +1357,14 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH return nil, nil } l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { + if len(l) == 0 { return nil, nil } + + if l[0] == nil { + transformed := make(map[string]interface{}) + return transformed, nil + } raw := l[0] original := raw.(map[string]interface{}) transformed := make(map[string]interface{}) @@ -1392,9 +1388,14 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH return nil, nil } l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { + if len(l) == 0 { return nil, nil } + + if l[0] == nil { + transformed := make(map[string]interface{}) + return transformed, nil + } raw := l[0] original := raw.(map[string]interface{}) transformed := make(map[string]interface{}) @@ -1418,9 +1419,14 @@ func expandBeyondcorpSecurityGatewayApplicationUpstreamsProxyProtocolContextualH return nil, nil } l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { + if len(l) == 0 { return nil, nil } + + if l[0] == nil { + transformed := make(map[string]interface{}) + return transformed, nil + } raw := l[0] original := raw.(map[string]interface{}) transformed := make(map[string]interface{}) diff --git a/google/services/beyondcorp/resource_beyondcorp_security_gateway_application_generated_meta.yaml b/google/services/beyondcorp/resource_beyondcorp_security_gateway_application_generated_meta.yaml index abac1716229..0d9015ce54b 100644 --- a/google/services/beyondcorp/resource_beyondcorp_security_gateway_application_generated_meta.yaml +++ b/google/services/beyondcorp/resource_beyondcorp_security_gateway_application_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_beyondcorp_security_gateway_application' -generation_type: 'mmv1' -source_file: 'products/beyondcorp/SecurityGatewayApplication.yaml' -api_service_name: 'beyondcorp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityGatewayApplication' +resource: google_beyondcorp_security_gateway_application +generation_type: mmv1 +source_file: products/beyondcorp/SecurityGatewayApplication.yaml +api_service_name: beyondcorp.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityGatewayApplication autogen_status: true fields: - - field: 'application_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'displayName' - - api_field: 'endpointMatchers.hostname' - - api_field: 'endpointMatchers.ports' - - api_field: 'name' - - api_field: 'schema' - - field: 'security_gateway_id' - provider_only: true - - api_field: 'updateTime' - - api_field: 'upstreams.egressPolicy.regions' - - api_field: 'upstreams.external.endpoints.hostname' - - api_field: 'upstreams.external.endpoints.port' - - api_field: 'upstreams.network.name' - - api_field: 'upstreams.proxyProtocol.allowedClientHeaders' - - api_field: 'upstreams.proxyProtocol.clientIp' - - api_field: 'upstreams.proxyProtocol.contextualHeaders.deviceInfo.outputType' - - api_field: 'upstreams.proxyProtocol.contextualHeaders.groupInfo.outputType' - - api_field: 'upstreams.proxyProtocol.contextualHeaders.outputType' - - api_field: 'upstreams.proxyProtocol.contextualHeaders.userInfo.outputType' - - api_field: 'upstreams.proxyProtocol.gatewayIdentity' - - api_field: 'upstreams.proxyProtocol.metadataHeaders' + - field: application_id + provider_only: true + - api_field: createTime + - api_field: displayName + - api_field: endpointMatchers.hostname + - api_field: endpointMatchers.ports + - api_field: name + - api_field: schema + - field: security_gateway_id + provider_only: true + - api_field: updateTime + - api_field: upstreams.egressPolicy.regions + - api_field: upstreams.external.endpoints.hostname + - api_field: upstreams.external.endpoints.port + - api_field: upstreams.network.name + - api_field: upstreams.proxyProtocol.allowedClientHeaders + - api_field: upstreams.proxyProtocol.clientIp + - api_field: upstreams.proxyProtocol.contextualHeaders.deviceInfo.outputType + - api_field: upstreams.proxyProtocol.contextualHeaders.groupInfo.outputType + - api_field: upstreams.proxyProtocol.contextualHeaders.outputType + - api_field: upstreams.proxyProtocol.contextualHeaders.userInfo.outputType + - api_field: upstreams.proxyProtocol.gatewayIdentity + - api_field: upstreams.proxyProtocol.metadataHeaders diff --git a/google/services/beyondcorp/resource_beyondcorp_security_gateway_generated_meta.yaml b/google/services/beyondcorp/resource_beyondcorp_security_gateway_generated_meta.yaml index 06e630c817e..1a386fc7fd7 100644 --- a/google/services/beyondcorp/resource_beyondcorp_security_gateway_generated_meta.yaml +++ b/google/services/beyondcorp/resource_beyondcorp_security_gateway_generated_meta.yaml @@ -1,29 +1,32 @@ -resource: 'google_beyondcorp_security_gateway' -generation_type: 'mmv1' -source_file: 'products/beyondcorp/SecurityGateway.yaml' -api_service_name: 'beyondcorp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityGateway' +resource: google_beyondcorp_security_gateway +generation_type: mmv1 +source_file: products/beyondcorp/SecurityGateway.yaml +api_service_name: beyondcorp.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityGateway autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'delegatingServiceAccount' - - api_field: 'displayName' - - api_field: 'externalIps' - - api_field: 'hubs.Hub.internetGateway.assignedIps' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'proxyProtocolConfig.allowedClientHeaders' - - api_field: 'proxyProtocolConfig.clientIp' - - api_field: 'proxyProtocolConfig.contextualHeaders.deviceInfo.outputType' - - api_field: 'proxyProtocolConfig.contextualHeaders.groupInfo.outputType' - - api_field: 'proxyProtocolConfig.contextualHeaders.outputType' - - api_field: 'proxyProtocolConfig.contextualHeaders.userInfo.outputType' - - api_field: 'proxyProtocolConfig.gatewayIdentity' - - api_field: 'proxyProtocolConfig.metadataHeaders' - - field: 'security_gateway_id' - provider_only: true - - api_field: 'serviceDiscovery.apiGateway.resourceOverride.path' - - api_field: 'state' - - api_field: 'updateTime' + - api_field: createTime + - api_field: delegatingServiceAccount + - api_field: displayName + - api_field: externalIps + - api_field: hubs.key + field: hubs.region + - api_field: hubs.value.internetGateway.assignedIps + field: hubs.internet_gateway.assigned_ips + - field: location + provider_only: true + - api_field: name + - api_field: proxyProtocolConfig.allowedClientHeaders + - api_field: proxyProtocolConfig.clientIp + - api_field: proxyProtocolConfig.contextualHeaders.deviceInfo.outputType + - api_field: proxyProtocolConfig.contextualHeaders.groupInfo.outputType + - api_field: proxyProtocolConfig.contextualHeaders.outputType + - api_field: proxyProtocolConfig.contextualHeaders.userInfo.outputType + - api_field: proxyProtocolConfig.gatewayIdentity + - api_field: proxyProtocolConfig.metadataHeaders + - field: security_gateway_id + provider_only: true + - api_field: serviceDiscovery.apiGateway.resourceOverride.path + - api_field: state + - api_field: updateTime diff --git a/google/services/biglake/resource_biglake_catalog_generated_meta.yaml b/google/services/biglake/resource_biglake_catalog_generated_meta.yaml index 426544e49aa..0748c0ffa6b 100644 --- a/google/services/biglake/resource_biglake_catalog_generated_meta.yaml +++ b/google/services/biglake/resource_biglake_catalog_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_biglake_catalog' -generation_type: 'mmv1' -source_file: 'products/biglake/Catalog.yaml' -api_service_name: 'biglake.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Catalog' +resource: google_biglake_catalog +generation_type: mmv1 +source_file: products/biglake/Catalog.yaml +api_service_name: biglake.googleapis.com +api_version: v1 +api_resource_type_kind: Catalog fields: - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'expireTime' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: deleteTime + - api_field: expireTime + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: updateTime diff --git a/google/services/biglake/resource_biglake_database_generated_meta.yaml b/google/services/biglake/resource_biglake_database_generated_meta.yaml index 4b2e8d37b6a..f9a7a41f394 100644 --- a/google/services/biglake/resource_biglake_database_generated_meta.yaml +++ b/google/services/biglake/resource_biglake_database_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_biglake_database' -generation_type: 'mmv1' -source_file: 'products/biglake/Database.yaml' -api_service_name: 'biglake.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Database' +resource: google_biglake_database +generation_type: mmv1 +source_file: products/biglake/Database.yaml +api_service_name: biglake.googleapis.com +api_version: v1 +api_resource_type_kind: Database fields: - - field: 'catalog' - provider_only: true - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'expireTime' - - api_field: 'hiveOptions.locationUri' - - api_field: 'hiveOptions.parameters' - - field: 'name' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - field: catalog + provider_only: true + - api_field: createTime + - api_field: deleteTime + - api_field: expireTime + - api_field: hiveOptions.locationUri + - api_field: hiveOptions.parameters + - field: name + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/biglake/resource_biglake_table_generated_meta.yaml b/google/services/biglake/resource_biglake_table_generated_meta.yaml index 489de179a74..67a2d1be023 100644 --- a/google/services/biglake/resource_biglake_table_generated_meta.yaml +++ b/google/services/biglake/resource_biglake_table_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_biglake_table' -generation_type: 'mmv1' -source_file: 'products/biglake/Table.yaml' -api_service_name: 'biglake.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Table' +resource: google_biglake_table +generation_type: mmv1 +source_file: products/biglake/Table.yaml +api_service_name: biglake.googleapis.com +api_version: v1 +api_resource_type_kind: Table fields: - - api_field: 'createTime' - - field: 'database' - provider_only: true - - api_field: 'deleteTime' - - api_field: 'etag' - - api_field: 'expireTime' - - api_field: 'hiveOptions.parameters' - - api_field: 'hiveOptions.storageDescriptor.inputFormat' - - api_field: 'hiveOptions.storageDescriptor.locationUri' - - api_field: 'hiveOptions.storageDescriptor.outputFormat' - - api_field: 'hiveOptions.tableType' - - field: 'name' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - api_field: createTime + - field: database + provider_only: true + - api_field: deleteTime + - api_field: etag + - api_field: expireTime + - api_field: hiveOptions.parameters + - api_field: hiveOptions.storageDescriptor.inputFormat + - api_field: hiveOptions.storageDescriptor.locationUri + - api_field: hiveOptions.storageDescriptor.outputFormat + - api_field: hiveOptions.tableType + - field: name + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/biglakeiceberg/iam_biglake_iceberg_catalog.go b/google/services/biglakeiceberg/iam_biglake_iceberg_catalog.go new file mode 100644 index 00000000000..b03e42dd1e0 --- /dev/null +++ b/google/services/biglakeiceberg/iam_biglake_iceberg_catalog.go @@ -0,0 +1,232 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/iam_policy.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package biglakeiceberg + +import ( + "fmt" + "regexp" + "strings" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "google.golang.org/api/cloudresourcemanager/v1" + + "github.com/hashicorp/terraform-provider-google/google/tpgiamresource" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +var ( + _ = regexp.Match + _ = strings.Trim + _ = errwrap.Wrap + _ = schema.Noop +) + +var BiglakeIcebergIcebergCatalogIamSchema = map[string]*schema.Schema{ + "project": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: tpgresource.CompareSelfLinkOrResourceName, + }, +} + +type BiglakeIcebergIcebergCatalogIamUpdater struct { + project string + name string + d tpgresource.TerraformResourceData + Config *transport_tpg.Config +} + +func BiglakeIcebergIcebergCatalogIamUpdaterProducer(d tpgresource.TerraformResourceData, config *transport_tpg.Config) (tpgiamresource.ResourceIamUpdater, error) { + values := make(map[string]string) + + project, _ := tpgresource.GetProject(d, config) + if project != "" { + if err := d.Set("project", project); err != nil { + return nil, fmt.Errorf("Error setting project: %s", err) + } + } + values["project"] = project + if v, ok := d.GetOk("name"); ok { + values["name"] = v.(string) + } + + // We may have gotten either a long or short name, so attempt to parse long name if possible + m, err := tpgresource.GetImportIdQualifiers([]string{"projects/(?P[^/]+)/catalogs/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config, d.Get("name").(string)) + if err != nil { + return nil, err + } + + for k, v := range m { + values[k] = v + } + + u := &BiglakeIcebergIcebergCatalogIamUpdater{ + project: values["project"], + name: values["name"], + d: d, + Config: config, + } + + if err := d.Set("project", u.project); err != nil { + return nil, fmt.Errorf("Error setting project: %s", err) + } + if err := d.Set("name", u.GetResourceId()); err != nil { + return nil, fmt.Errorf("Error setting name: %s", err) + } + + return u, nil +} + +func BiglakeIcebergIcebergCatalogIdParseFunc(d *schema.ResourceData, config *transport_tpg.Config) error { + values := make(map[string]string) + + project, _ := tpgresource.GetProject(d, config) + if project != "" { + values["project"] = project + } + + m, err := tpgresource.GetImportIdQualifiers([]string{"projects/(?P[^/]+)/catalogs/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config, d.Id()) + if err != nil { + return err + } + + for k, v := range m { + values[k] = v + } + + u := &BiglakeIcebergIcebergCatalogIamUpdater{ + project: values["project"], + name: values["name"], + d: d, + Config: config, + } + if err := d.Set("name", u.GetResourceId()); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + d.SetId(u.GetResourceId()) + return nil +} + +func (u *BiglakeIcebergIcebergCatalogIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error) { + url, err := u.qualifyIcebergCatalogUrl("getIamPolicy") + if err != nil { + return nil, err + } + + project, err := tpgresource.GetProject(u.d, u.Config) + if err != nil { + return nil, err + } + var obj map[string]interface{} + + userAgent, err := tpgresource.GenerateUserAgentString(u.d, u.Config.UserAgent) + if err != nil { + return nil, err + } + + policy, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: u.Config, + Method: "GET", + Project: project, + RawURL: url, + UserAgent: userAgent, + Body: obj, + }) + if err != nil { + return nil, fmt.Errorf("Error retrieving IAM policy for %s: %w", u.DescribeResource(), err) + } + + out := &cloudresourcemanager.Policy{} + err = tpgresource.Convert(policy, out) + if err != nil { + return nil, fmt.Errorf("Cannot convert a policy to a resource manager policy: %w", err) + } + + return out, nil +} + +func (u *BiglakeIcebergIcebergCatalogIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error { + json, err := tpgresource.ConvertToMap(policy) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + obj["policy"] = json + + url, err := u.qualifyIcebergCatalogUrl("setIamPolicy") + if err != nil { + return err + } + project, err := tpgresource.GetProject(u.d, u.Config) + if err != nil { + return err + } + + userAgent, err := tpgresource.GenerateUserAgentString(u.d, u.Config.UserAgent) + if err != nil { + return err + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: u.Config, + Method: "POST", + Project: project, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: u.d.Timeout(schema.TimeoutCreate), + }) + if err != nil { + return fmt.Errorf("Error setting IAM policy for %s: %w", u.DescribeResource(), err) + } + + return nil +} + +func (u *BiglakeIcebergIcebergCatalogIamUpdater) qualifyIcebergCatalogUrl(methodIdentifier string) (string, error) { + urlTemplate := fmt.Sprintf("{{BiglakeIcebergBasePath}}%s:%s", fmt.Sprintf("v1/projects/%s/catalogs/%s", u.project, u.name), methodIdentifier) + url, err := tpgresource.ReplaceVars(u.d, u.Config, urlTemplate) + if err != nil { + return "", err + } + return url, nil +} + +func (u *BiglakeIcebergIcebergCatalogIamUpdater) GetResourceId() string { + return fmt.Sprintf("v1/projects/%s/catalogs/%s", u.project, u.name) +} + +func (u *BiglakeIcebergIcebergCatalogIamUpdater) GetMutexKey() string { + return fmt.Sprintf("iam-biglakeiceberg-icebergcatalog-%s", u.GetResourceId()) +} + +func (u *BiglakeIcebergIcebergCatalogIamUpdater) DescribeResource() string { + return fmt.Sprintf("biglakeiceberg icebergcatalog %q", u.GetResourceId()) +} diff --git a/google/services/biglakeiceberg/iam_biglake_iceberg_catalog_generated_test.go b/google/services/biglakeiceberg/iam_biglake_iceberg_catalog_generated_test.go new file mode 100644 index 00000000000..7ad271d1025 --- /dev/null +++ b/google/services/biglakeiceberg/iam_biglake_iceberg_catalog_generated_test.go @@ -0,0 +1,333 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/examples/base_configs/iam_test_file.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package biglakeiceberg_test + +import ( + "fmt" + "strings" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" +) + +var ( + _ = fmt.Sprintf + _ = strings.Trim + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels +) + +func TestAccBiglakeIcebergIcebergCatalogIamBindingGenerated(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + "role": "roles/biglake.editor", + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccBiglakeIcebergIcebergCatalogIamBinding_basicGenerated(context), + }, + { + ResourceName: "google_biglake_iceberg_catalog_iam_binding.foo", + ImportStateIdFunc: generateBiglakeIcebergIcebergCatalogIAMBindingStateID("google_biglake_iceberg_catalog_iam_binding.foo"), + ImportState: true, + ImportStateVerify: true, + }, + { + // Test Iam Binding update + Config: testAccBiglakeIcebergIcebergCatalogIamBinding_updateGenerated(context), + }, + { + ResourceName: "google_biglake_iceberg_catalog_iam_binding.foo", + ImportStateIdFunc: generateBiglakeIcebergIcebergCatalogIAMBindingStateID("google_biglake_iceberg_catalog_iam_binding.foo"), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccBiglakeIcebergIcebergCatalogIamMemberGenerated(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + "role": "roles/biglake.editor", + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + // Test Iam Member creation (no update for member, no need to test) + Config: testAccBiglakeIcebergIcebergCatalogIamMember_basicGenerated(context), + }, + { + ResourceName: "google_biglake_iceberg_catalog_iam_member.foo", + ImportStateIdFunc: generateBiglakeIcebergIcebergCatalogIAMMemberStateID("google_biglake_iceberg_catalog_iam_member.foo"), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func TestAccBiglakeIcebergIcebergCatalogIamPolicyGenerated(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + "role": "roles/biglake.editor", + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccBiglakeIcebergIcebergCatalogIamPolicy_basicGenerated(context), + Check: resource.TestCheckResourceAttrSet("data.google_biglake_iceberg_catalog_iam_policy.foo", "policy_data"), + }, + { + ResourceName: "google_biglake_iceberg_catalog_iam_policy.foo", + ImportStateIdFunc: generateBiglakeIcebergIcebergCatalogIAMPolicyStateID("google_biglake_iceberg_catalog_iam_policy.foo"), + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccBiglakeIcebergIcebergCatalogIamPolicy_emptyBinding(context), + }, + { + ResourceName: "google_biglake_iceberg_catalog_iam_policy.foo", + ImportStateIdFunc: generateBiglakeIcebergIcebergCatalogIAMPolicyStateID("google_biglake_iceberg_catalog_iam_policy.foo"), + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccBiglakeIcebergIcebergCatalogIamMember_basicGenerated(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} + +resource "google_biglake_iceberg_catalog_iam_member" "foo" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + role = "%{role}" + member = "user:admin@hashicorptest.com" +} +`, context) +} + +func testAccBiglakeIcebergIcebergCatalogIamPolicy_basicGenerated(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} + +data "google_iam_policy" "foo" { + binding { + role = "%{role}" + members = ["user:admin@hashicorptest.com"] + } +} + +resource "google_biglake_iceberg_catalog_iam_policy" "foo" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + policy_data = data.google_iam_policy.foo.policy_data +} + +data "google_biglake_iceberg_catalog_iam_policy" "foo" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + depends_on = [ + google_biglake_iceberg_catalog_iam_policy.foo + ] +} +`, context) +} + +func testAccBiglakeIcebergIcebergCatalogIamPolicy_emptyBinding(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} + +data "google_iam_policy" "foo" { +} + +resource "google_biglake_iceberg_catalog_iam_policy" "foo" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + policy_data = data.google_iam_policy.foo.policy_data +} +`, context) +} + +func testAccBiglakeIcebergIcebergCatalogIamBinding_basicGenerated(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} + +resource "google_biglake_iceberg_catalog_iam_binding" "foo" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + role = "%{role}" + members = ["user:admin@hashicorptest.com"] +} +`, context) +} + +func testAccBiglakeIcebergIcebergCatalogIamBinding_updateGenerated(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} + +resource "google_biglake_iceberg_catalog_iam_binding" "foo" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + role = "%{role}" + members = ["user:admin@hashicorptest.com", "user:gterraformtest1@gmail.com"] +} +`, context) +} + +func generateBiglakeIcebergIcebergCatalogIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/catalogs/%s", project, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBiglakeIcebergIcebergCatalogIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/catalogs/%s", project, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBiglakeIcebergIcebergCatalogIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/catalogs/%s", project, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/biglakeiceberg/product.go b/google/services/biglakeiceberg/product.go new file mode 100644 index 00000000000..a1734ff2738 --- /dev/null +++ b/google/services/biglakeiceberg/product.go @@ -0,0 +1,21 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +// Package biglakeiceberg contains resources, datasources, etc. for the biglake service. +package biglakeiceberg + +const ProductName = "biglakeiceberg" diff --git a/google/services/biglakeiceberg/resource_biglake_iceberg_catalog.go b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog.go new file mode 100644 index 00000000000..5e86e90e779 --- /dev/null +++ b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog.go @@ -0,0 +1,590 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package biglakeiceberg + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceBiglakeIcebergIcebergCatalog() *schema.Resource { + return &schema.Resource{ + Create: resourceBiglakeIcebergIcebergCatalogCreate, + Read: resourceBiglakeIcebergIcebergCatalogRead, + Update: resourceBiglakeIcebergIcebergCatalogUpdate, + Delete: resourceBiglakeIcebergIcebergCatalogDelete, + + Importer: &schema.ResourceImporter{ + State: resourceBiglakeIcebergIcebergCatalogImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "catalog_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: verify.ValidateEnum([]string{"CATALOG_TYPE_GCS_BUCKET"}), + Description: `The catalog type of the IcebergCatalog. Currently only supports the type for Google Cloud Storage Buckets. Possible values: ["CATALOG_TYPE_GCS_BUCKET"]`, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the IcebergCatalog. Format: +projects/{project_id_or_number}/catalogs/{iceberg_catalog_id}`, + }, + "credential_mode": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ValidateFunc: verify.ValidateEnum([]string{"CREDENTIAL_MODE_END_USER", "CREDENTIAL_MODE_VENDED_CREDENTIALS", ""}), + Description: `The credential mode used for the catalog. CREDENTIAL_MODE_END_USER - End user credentials, default. The authenticating user must have access to the catalog resources and the corresponding Google Cloud Storage files. CREDENTIAL_MODE_VENDED_CREDENTIALS - Use credential vending. The authenticating user must have access to the catalog resources and the system will provide the caller with downscoped credentials to access the Google Cloud Storage files. All table operations in this mode would require 'X-Iceberg-Access-Delegation' header with 'vended-credentials' value included. System will generate a service account and the catalog administrator must grant the service account appropriate permissions. Possible values: ["CREDENTIAL_MODE_END_USER", "CREDENTIAL_MODE_VENDED_CREDENTIALS"]`, + }, + "biglake_service_account": { + Type: schema.TypeString, + Computed: true, + Description: `Output only. The service account used for credential vending. It might be empty if credential vending was never enabled for the catalog.`, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `Output only. The creation time of the IcebergCatalog.`, + }, + "default_location": { + Type: schema.TypeString, + Computed: true, + Description: `Output only. The default storage location for the catalog, e.g., 'gs://my-bucket'.`, + }, + "replicas": { + Type: schema.TypeList, + Computed: true, + Description: `Output only. The replicas for the catalog metadata.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "region": { + Type: schema.TypeString, + Computed: true, + Description: `The region of the replica, e.g., 'us-east1'.`, + }, + "state": { + Type: schema.TypeString, + Computed: true, + Description: `If the IcebergCatalog is replicated to multiple regions, this describes the current state of the replica. STATE_UNKNOWN - The replica state is unknown. STATE_PRIMARY - The replica is the writable primary. STATE_PRIMARY_IN_PROGRESS - The replica has been recently assigned as the primary, but not all namespaces are writeable yet. STATE_SECONDARY - The replica is a read-only secondary replica.`, + }, + }, + }, + }, + "storage_regions": { + Type: schema.TypeList, + Computed: true, + Description: `Output only. The GCP region(s) where the physical metadata for the tables is stored, e.g. 'us-central1', 'nam4' or 'us'. This will contain one value for all locations, except for the catalogs that are configured to use custom dual region buckets.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `Output only. The last modification time of the IcebergCatalog.`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceBiglakeIcebergIcebergCatalogCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + credentialModeProp, err := expandBiglakeIcebergIcebergCatalogCredentialMode(d.Get("credential_mode"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("credential_mode"); !tpgresource.IsEmptyValue(reflect.ValueOf(credentialModeProp)) && (ok || !reflect.DeepEqual(v, credentialModeProp)) { + obj["credential-mode"] = credentialModeProp + } + catalogTypeProp, err := expandBiglakeIcebergIcebergCatalogCatalogType(d.Get("catalog_type"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("catalog_type"); !tpgresource.IsEmptyValue(reflect.ValueOf(catalogTypeProp)) && (ok || !reflect.DeepEqual(v, catalogTypeProp)) { + obj["catalog-type"] = catalogTypeProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{BiglakeIcebergBasePath}}iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs?iceberg-catalog-id={{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new IcebergCatalog: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for IcebergCatalog: %s", err) + } + billingProject = project + + if parts := regexp.MustCompile(`projects\/([^\/]+)\/`).FindStringSubmatch(url); parts != nil { + billingProject = parts[1] + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating IcebergCatalog: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + log.Printf("[DEBUG] Finished creating IcebergCatalog %q: %#v", d.Id(), res) + + return resourceBiglakeIcebergIcebergCatalogRead(d, meta) +} + +func resourceBiglakeIcebergIcebergCatalogRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{BiglakeIcebergBasePath}}iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for IcebergCatalog: %s", err) + } + billingProject = project + + if parts := regexp.MustCompile(`projects\/([^\/]+)\/`).FindStringSubmatch(url); parts != nil { + billingProject = parts[1] + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("BiglakeIcebergIcebergCatalog %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + + if err := d.Set("credential_mode", flattenBiglakeIcebergIcebergCatalogCredentialMode(res["credential-mode"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + if err := d.Set("biglake_service_account", flattenBiglakeIcebergIcebergCatalogBiglakeServiceAccount(res["biglake-service-account"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + if err := d.Set("catalog_type", flattenBiglakeIcebergIcebergCatalogCatalogType(res["catalog-type"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + if err := d.Set("default_location", flattenBiglakeIcebergIcebergCatalogDefaultLocation(res["default-location"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + if err := d.Set("storage_regions", flattenBiglakeIcebergIcebergCatalogStorageRegions(res["storage-regions"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + if err := d.Set("create_time", flattenBiglakeIcebergIcebergCatalogCreateTime(res["create-time"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + if err := d.Set("update_time", flattenBiglakeIcebergIcebergCatalogUpdateTime(res["update-time"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + if err := d.Set("replicas", flattenBiglakeIcebergIcebergCatalogReplicas(res["replicas"], d, config)); err != nil { + return fmt.Errorf("Error reading IcebergCatalog: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("name"); !ok && v == "" { + err = identity.Set("name", d.Get("name").(string)) + if err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceBiglakeIcebergIcebergCatalogUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for IcebergCatalog: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + credentialModeProp, err := expandBiglakeIcebergIcebergCatalogCredentialMode(d.Get("credential_mode"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("credential_mode"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, credentialModeProp)) { + obj["credential-mode"] = credentialModeProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{BiglakeIcebergBasePath}}iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating IcebergCatalog %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + // The custom logic is that server only respects property name not the json name for updateMask. + // This will apply to all future updateable fields if they have a kebab-case json name override. + // This does not apply to any field with a camelCase or snake_case name. + if d.HasChange("credential_mode") { + updateMask = append(updateMask, "credential_mode") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating IcebergCatalog %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating IcebergCatalog %q: %#v", d.Id(), res) + } + + } + + return resourceBiglakeIcebergIcebergCatalogRead(d, meta) +} + +func resourceBiglakeIcebergIcebergCatalogDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for IcebergCatalog: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{BiglakeIcebergBasePath}}iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + if parts := regexp.MustCompile(`projects\/([^\/]+)\/`).FindStringSubmatch(url); parts != nil { + billingProject = parts[1] + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting IcebergCatalog %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "IcebergCatalog") + } + + log.Printf("[DEBUG] Finished deleting IcebergCatalog %q: %#v", d.Id(), res) + return nil +} + +func resourceBiglakeIcebergIcebergCatalogImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^iceberg/v1/restcatalog/extensions/projects/(?P[^/]+)/catalogs/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenBiglakeIcebergIcebergCatalogCredentialMode(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogBiglakeServiceAccount(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogCatalogType(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogDefaultLocation(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogStorageRegions(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogReplicas(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "region": flattenBiglakeIcebergIcebergCatalogReplicasRegion(original["region"], d, config), + "state": flattenBiglakeIcebergIcebergCatalogReplicasState(original["state"], d, config), + }) + } + return transformed +} +func flattenBiglakeIcebergIcebergCatalogReplicasRegion(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenBiglakeIcebergIcebergCatalogReplicasState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandBiglakeIcebergIcebergCatalogCredentialMode(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandBiglakeIcebergIcebergCatalogCatalogType(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} diff --git a/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_generated_meta.yaml b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_generated_meta.yaml new file mode 100644 index 00000000000..781b710aa81 --- /dev/null +++ b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_generated_meta.yaml @@ -0,0 +1,19 @@ +resource: google_biglake_iceberg_catalog +generation_type: mmv1 +source_file: products/biglakeiceberg/IcebergCatalog.yaml +api_service_name: biglake.googleapis.com +api_version: "" +api_resource_type_kind: IcebergCatalog +fields: + - api_field: biglake-service-account + field: biglake_service_account + - api_field: catalog-type + - api_field: create-time + - api_field: credential-mode + - api_field: default-location + - field: name + provider_only: true + - api_field: replicas.region + - api_field: replicas.state + - api_field: storage-regions + - api_field: update-time diff --git a/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_generated_test.go b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_generated_test.go new file mode 100644 index 00000000000..f2ab06ce44d --- /dev/null +++ b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_generated_test.go @@ -0,0 +1,140 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package biglakeiceberg_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccBiglakeIcebergIcebergCatalog_biglakeIcebergCatalogExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckBiglakeIcebergIcebergCatalogDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccBiglakeIcebergIcebergCatalog_biglakeIcebergCatalogExample(context), + }, + { + ResourceName: "google_biglake_iceberg_catalog.my_iceberg_catalog", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name"}, + }, + { + ResourceName: "google_biglake_iceberg_catalog.my_iceberg_catalog", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccBiglakeIcebergIcebergCatalog_biglakeIcebergCatalogExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} +`, context) +} + +func testAccCheckBiglakeIcebergIcebergCatalogDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_biglake_iceberg_catalog" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{BiglakeIcebergBasePath}}iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("BiglakeIcebergIcebergCatalog still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_sweeper.go b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_sweeper.go new file mode 100644 index 00000000000..4229b3f44c0 --- /dev/null +++ b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_sweeper.go @@ -0,0 +1,223 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/sweeper_file.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package biglakeiceberg + +import ( + "context" + "fmt" + "log" + "strings" + "testing" + + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/sweeper" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func init() { + // Initialize base sweeper object + s := &sweeper.Sweeper{ + Name: "google_biglake_iceberg_catalog", + ListAndAction: listAndActionBiglakeIcebergIcebergCatalog, + DeleteFunction: testSweepBiglakeIcebergIcebergCatalog, + } + + // Register the sweeper + sweeper.AddTestSweepers(s) +} + +func testSweepBiglakeIcebergIcebergCatalog(_ string) error { + return listAndActionBiglakeIcebergIcebergCatalog(deleteResourceBiglakeIcebergIcebergCatalog) +} + +func listAndActionBiglakeIcebergIcebergCatalog(action sweeper.ResourceAction) error { + var lastError error + resourceName := "BiglakeIcebergIcebergCatalog" + log.Printf("[INFO][SWEEPER_LOG] Starting sweeper for %s", resourceName) + + // Prepare configurations to iterate over + var configs []*tpgresource.ResourceDataMock + t := &testing.T{} + billingId := envvar.GetTestBillingAccountFromEnv(t) + // Default single config + intermediateValues := []map[string]string{ + { + "region": "us-central1", + }, + } + + // Create configs from intermediate values + for _, values := range intermediateValues { + mockConfig := &tpgresource.ResourceDataMock{ + FieldsInSchema: map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "billing_account": billingId, + }, + } + + // Apply all provided values + for key, value := range values { + mockConfig.FieldsInSchema[key] = value + } + + // Set fallback values for common fields + region, hasRegion := mockConfig.FieldsInSchema["region"].(string) + if !hasRegion { + region = "us-central1" + mockConfig.FieldsInSchema["region"] = region + } + + if _, hasLocation := mockConfig.FieldsInSchema["location"]; !hasLocation { + mockConfig.FieldsInSchema["location"] = region + } + + if _, hasZone := mockConfig.FieldsInSchema["zone"]; !hasZone { + mockConfig.FieldsInSchema["zone"] = region + "-a" + } + + configs = append(configs, mockConfig) + } + + // Process all configurations (either from parent resources or direct substitutions) + for _, mockConfig := range configs { + // Get region from config + region := sweeper.GetFieldOrDefault(mockConfig, "region", "us-central1") + + // Create shared config for this region + config, err := sweeper.SharedConfigForRegion(region) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error getting shared config for region: %s", err) + lastError = err + continue + } + + err = config.LoadAndValidate(context.Background()) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error loading: %s", err) + lastError = err + continue + } + + // Prepare list URL + listTemplate := strings.Split("https://biglake.googleapis.com/iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs", "?")[0] + listUrl, err := tpgresource.ReplaceVars(mockConfig, config, listTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) + lastError = err + continue + } + + // Log additional info for parent-based resources + log.Printf("[INFO][SWEEPER_LOG] Listing %s resources at %s", resourceName, listUrl) + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: config.Project, + RawURL: listUrl, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in response from request %s: %s", listUrl, err) + lastError = err + continue + } + + // First try the expected resource key + resourceList, ok := res["icebergCatalogs"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'icebergCatalogs'") + } else { + // Next, try the common "items" pattern + resourceList, ok = res["items"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under standard 'items' key") + } else { + log.Printf("[INFO][SWEEPER_LOG] no resources found") + continue + } + } + rl := resourceList.([]interface{}) + + log.Printf("[INFO][SWEEPER_LOG] Found %d items in %s list response.", len(rl), resourceName) + // Keep count of items that aren't sweepable for logging. + nonPrefixCount := 0 + for _, ri := range rl { + obj, ok := ri.(map[string]interface{}) + if !ok { + log.Printf("[INFO][SWEEPER_LOG] Item was not a map: %T", ri) + continue + } + + if err := action(config, mockConfig, obj); err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in action: %s", err) + lastError = err + } else { + nonPrefixCount++ + } + } + } + + return lastError +} + +func deleteResourceBiglakeIcebergIcebergCatalog(config *transport_tpg.Config, d *tpgresource.ResourceDataMock, obj map[string]interface{}) error { + var deletionerror error + resourceName := "BiglakeIcebergIcebergCatalog" + var name string + if obj["name"] == nil { + log.Printf("[INFO][SWEEPER_LOG] %s resource name was nil", resourceName) + return fmt.Errorf("%s resource name was nil", resourceName) + } + + name = tpgresource.GetResourceNameFromSelfLink(obj["name"].(string)) + + // Skip resources that shouldn't be sweeped + if !sweeper.IsSweepableTestResource(name) { + return nil + } + + deleteTemplate := "https://biglake.googleapis.com/iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}" + + url, err := tpgresource.ReplaceVars(d, config, deleteTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) + deletionerror = err + } + url = url + name + + // Don't wait on operations as we may have a lot to delete + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: config.Project, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error deleting for url %s : %s", url, err) + deletionerror = err + } else { + log.Printf("[INFO][SWEEPER_LOG] Sent delete request for %s resource: %s", resourceName, name) + } + + return deletionerror +} diff --git a/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_test.go b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_test.go new file mode 100644 index 00000000000..7f160f5c7bb --- /dev/null +++ b/google/services/biglakeiceberg/resource_biglake_iceberg_catalog_test.go @@ -0,0 +1,127 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/biglakeiceberg/resource_biglake_iceberg_catalog_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package biglakeiceberg_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccBiglakeIcebergIcebergCatalog_biglakeIcebergCatalog_update(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckBiglakeIcebergIcebergCatalogDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccBiglakeIcebergIcebergCatalog_biglakeIcebergCatalogExample(context), + }, + { + ResourceName: "google_biglake_iceberg_catalog.my_iceberg_catalog", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name"}, + }, + { + Config: testAccBiglakeIcebergIcebergCatalog_biglakeIcebergCatalog_update(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_biglake_iceberg_catalog.my_iceberg_catalog", plancheck.ResourceActionUpdate), + }, + }, + }, + { + ResourceName: "google_biglake_iceberg_catalog.my_iceberg_catalog", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name"}, + }, + }, + }) +} + +func testAccBiglakeIcebergIcebergCatalog_biglakeIcebergCatalog_update(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "tf_test_my_iceberg_catalog%{random_suffix}" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + credential_mode = "CREDENTIAL_MODE_VENDED_CREDENTIALS" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} +`, context) +} diff --git a/google/services/bigquery/iam_bigquery_table_generated_test.go b/google/services/bigquery/iam_bigquery_table_generated_test.go index 737a0269d5b..ac09236099f 100644 --- a/google/services/bigquery/iam_bigquery_table_generated_test.go +++ b/google/services/bigquery/iam_bigquery_table_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccBigQueryTableIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_table_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/datasets/%s/tables/%s roles/bigquery.dataOwner", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf_test_dataset_id%s", context["random_suffix"]), fmt.Sprintf("tf_test_table_id%s", context["random_suffix"])), + ImportStateIdFunc: generateBigQueryTableIAMBindingStateID("google_bigquery_table_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccBigQueryTableIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_table_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/datasets/%s/tables/%s roles/bigquery.dataOwner", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf_test_dataset_id%s", context["random_suffix"]), fmt.Sprintf("tf_test_table_id%s", context["random_suffix"])), + ImportStateIdFunc: generateBigQueryTableIAMBindingStateID("google_bigquery_table_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccBigQueryTableIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_table_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/datasets/%s/tables/%s roles/bigquery.dataOwner user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf_test_dataset_id%s", context["random_suffix"]), fmt.Sprintf("tf_test_table_id%s", context["random_suffix"])), + ImportStateIdFunc: generateBigQueryTableIAMMemberStateID("google_bigquery_table_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccBigQueryTableIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_table_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/datasets/%s/tables/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf_test_dataset_id%s", context["random_suffix"]), fmt.Sprintf("tf_test_table_id%s", context["random_suffix"])), + ImportStateIdFunc: generateBigQueryTableIAMPolicyStateID("google_bigquery_table_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccBigQueryTableIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_table_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/datasets/%s/tables/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf_test_dataset_id%s", context["random_suffix"]), fmt.Sprintf("tf_test_table_id%s", context["random_suffix"])), + ImportStateIdFunc: generateBigQueryTableIAMPolicyStateID("google_bigquery_table_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -485,3 +486,57 @@ resource "google_bigquery_table_iam_binding" "foo" { } `, context) } + +func generateBigQueryTableIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + dataset_id := tpgresource.GetResourceNameFromSelfLink(rawState["dataset_id"]) + table_id := tpgresource.GetResourceNameFromSelfLink(rawState["table_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/datasets/%s/tables/%s", project, dataset_id, table_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBigQueryTableIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + dataset_id := tpgresource.GetResourceNameFromSelfLink(rawState["dataset_id"]) + table_id := tpgresource.GetResourceNameFromSelfLink(rawState["table_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/datasets/%s/tables/%s", project, dataset_id, table_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBigQueryTableIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + dataset_id := tpgresource.GetResourceNameFromSelfLink(rawState["dataset_id"]) + table_id := tpgresource.GetResourceNameFromSelfLink(rawState["table_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/datasets/%s/tables/%s", project, dataset_id, table_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/bigquery/resource_bigquery_dataset_access_generated_meta.yaml b/google/services/bigquery/resource_bigquery_dataset_access_generated_meta.yaml index ae457621105..213e02c5a03 100644 --- a/google/services/bigquery/resource_bigquery_dataset_access_generated_meta.yaml +++ b/google/services/bigquery/resource_bigquery_dataset_access_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_bigquery_dataset_access' -generation_type: 'mmv1' -source_file: 'products/bigquery/DatasetAccess.yaml' -api_service_name: 'bigquery.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Dataset' +resource: google_bigquery_dataset_access +generation_type: mmv1 +source_file: products/bigquery/DatasetAccess.yaml +api_service_name: bigquery.googleapis.com +api_version: v2 +api_resource_type_kind: Dataset fields: - - api_field: 'condition.description' - - api_field: 'condition.expression' - - api_field: 'condition.location' - - api_field: 'condition.title' - - api_field: 'dataset.dataset.datasetId' - - api_field: 'dataset.dataset.projectId' - - api_field: 'dataset.targetTypes' - - api_field: 'datasetId' - - api_field: 'domain' - - api_field: 'groupByEmail' - - api_field: 'iamMember' - - api_field: 'role' - - api_field: 'routine.datasetId' - - api_field: 'routine.projectId' - - api_field: 'routine.routineId' - - api_field: 'specialGroup' - - api_field: 'userByEmail' - - api_field: 'view.datasetId' - - api_field: 'view.projectId' - - api_field: 'view.tableId' + - api_field: condition.description + - api_field: condition.expression + - api_field: condition.location + - api_field: condition.title + - api_field: dataset.dataset.datasetId + - api_field: dataset.dataset.projectId + - api_field: dataset.targetTypes + - api_field: datasetId + - api_field: domain + - api_field: groupByEmail + - api_field: iamMember + - api_field: role + - api_field: routine.datasetId + - api_field: routine.projectId + - api_field: routine.routineId + - api_field: specialGroup + - api_field: userByEmail + - api_field: view.datasetId + - api_field: view.projectId + - api_field: view.tableId diff --git a/google/services/bigquery/resource_bigquery_dataset_generated_meta.yaml b/google/services/bigquery/resource_bigquery_dataset_generated_meta.yaml index d9ffde480cc..0c364488bce 100644 --- a/google/services/bigquery/resource_bigquery_dataset_generated_meta.yaml +++ b/google/services/bigquery/resource_bigquery_dataset_generated_meta.yaml @@ -1,54 +1,54 @@ -resource: 'google_bigquery_dataset' -generation_type: 'mmv1' -source_file: 'products/bigquery/Dataset.yaml' -api_service_name: 'bigquery.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Dataset' +resource: google_bigquery_dataset +generation_type: mmv1 +source_file: products/bigquery/Dataset.yaml +api_service_name: bigquery.googleapis.com +api_version: v2 +api_resource_type_kind: Dataset fields: - - api_field: 'access.condition.description' - - api_field: 'access.condition.expression' - - api_field: 'access.condition.location' - - api_field: 'access.condition.title' - - api_field: 'access.dataset.dataset.datasetId' - - api_field: 'access.dataset.dataset.projectId' - - api_field: 'access.dataset.targetTypes' - - api_field: 'access.domain' - - api_field: 'access.groupByEmail' - - api_field: 'access.iamMember' - - api_field: 'access.role' - - api_field: 'access.routine.datasetId' - - api_field: 'access.routine.projectId' - - api_field: 'access.routine.routineId' - - api_field: 'access.specialGroup' - - api_field: 'access.userByEmail' - - api_field: 'access.view.datasetId' - - api_field: 'access.view.projectId' - - api_field: 'access.view.tableId' - - api_field: 'creationTime' - - api_field: 'datasetReference.datasetId' - field: 'dataset_id' - - api_field: 'defaultCollation' - - api_field: 'defaultEncryptionConfiguration.kmsKeyName' - - api_field: 'defaultPartitionExpirationMs' - - api_field: 'defaultTableExpirationMs' - - field: 'delete_contents_on_destroy' - provider_only: true - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'externalCatalogDatasetOptions.defaultStorageLocationUri' - - api_field: 'externalCatalogDatasetOptions.parameters' - - api_field: 'externalDatasetReference.connection' - - api_field: 'externalDatasetReference.externalSource' - - api_field: 'friendlyName' - - api_field: 'isCaseInsensitive' - - api_field: 'labels' - - api_field: 'lastModifiedTime' - - api_field: 'location' - - api_field: 'maxTimeTravelHours' - - api_field: 'resourceTags' - - api_field: 'storageBillingModel' - - field: 'terraform_labels' - provider_only: true - - api_field: 'selfLink' + - api_field: access.condition.description + - api_field: access.condition.expression + - api_field: access.condition.location + - api_field: access.condition.title + - api_field: access.dataset.dataset.datasetId + - api_field: access.dataset.dataset.projectId + - api_field: access.dataset.targetTypes + - api_field: access.domain + - api_field: access.groupByEmail + - api_field: access.iamMember + - api_field: access.role + - api_field: access.routine.datasetId + - api_field: access.routine.projectId + - api_field: access.routine.routineId + - api_field: access.specialGroup + - api_field: access.userByEmail + - api_field: access.view.datasetId + - api_field: access.view.projectId + - api_field: access.view.tableId + - api_field: creationTime + - api_field: datasetReference.datasetId + field: dataset_id + - api_field: defaultCollation + - api_field: defaultEncryptionConfiguration.kmsKeyName + - api_field: defaultPartitionExpirationMs + - api_field: defaultTableExpirationMs + - field: delete_contents_on_destroy + provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: externalCatalogDatasetOptions.defaultStorageLocationUri + - api_field: externalCatalogDatasetOptions.parameters + - api_field: externalDatasetReference.connection + - api_field: externalDatasetReference.externalSource + - api_field: friendlyName + - api_field: isCaseInsensitive + - api_field: labels + - api_field: lastModifiedTime + - api_field: location + - api_field: maxTimeTravelHours + - api_field: resourceTags + - api_field: storageBillingModel + - field: terraform_labels + provider_only: true + - api_field: selfLink diff --git a/google/services/bigquery/resource_bigquery_job_generated_meta.yaml b/google/services/bigquery/resource_bigquery_job_generated_meta.yaml index 665264750f4..5854778f882 100644 --- a/google/services/bigquery/resource_bigquery_job_generated_meta.yaml +++ b/google/services/bigquery/resource_bigquery_job_generated_meta.yaml @@ -1,179 +1,179 @@ -resource: 'google_bigquery_job' -generation_type: 'mmv1' -source_file: 'products/bigquery/Job.yaml' -api_service_name: 'bigquery.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Job' +resource: google_bigquery_job +generation_type: mmv1 +source_file: products/bigquery/Job.yaml +api_service_name: bigquery.googleapis.com +api_version: v2 +api_resource_type_kind: Job fields: - - api_field: 'configuration.copy.createDisposition' - field: 'copy.create_disposition' - - api_field: 'configuration.copy.destinationEncryptionConfiguration.kmsKeyName' - field: 'copy.destination_encryption_configuration.kms_key_name' - - api_field: 'configuration.copy.destinationEncryptionConfiguration.kmsKeyVersion' - field: 'copy.destination_encryption_configuration.kms_key_version' - - api_field: 'configuration.copy.destinationTable.datasetId' - field: 'copy.destination_table.dataset_id' - - api_field: 'configuration.copy.destinationTable.projectId' - field: 'copy.destination_table.project_id' - - api_field: 'configuration.copy.destinationTable.tableId' - field: 'copy.destination_table.table_id' - - api_field: 'configuration.copy.sourceTables.datasetId' - field: 'copy.source_tables.dataset_id' - - api_field: 'configuration.copy.sourceTables.projectId' - field: 'copy.source_tables.project_id' - - api_field: 'configuration.copy.sourceTables.tableId' - field: 'copy.source_tables.table_id' - - api_field: 'configuration.copy.writeDisposition' - field: 'copy.write_disposition' - - field: 'effective_labels' - provider_only: true - - api_field: 'configuration.extract.compression' - field: 'extract.compression' - - api_field: 'configuration.extract.destinationFormat' - field: 'extract.destination_format' - - api_field: 'configuration.extract.destinationUris' - field: 'extract.destination_uris' - - api_field: 'configuration.extract.fieldDelimiter' - field: 'extract.field_delimiter' - - api_field: 'configuration.extract.printHeader' - field: 'extract.print_header' - - api_field: 'configuration.extract.sourceModel.datasetId' - field: 'extract.source_model.dataset_id' - - api_field: 'configuration.extract.sourceModel.modelId' - field: 'extract.source_model.model_id' - - api_field: 'configuration.extract.sourceModel.projectId' - field: 'extract.source_model.project_id' - - api_field: 'configuration.extract.sourceTable.datasetId' - field: 'extract.source_table.dataset_id' - - api_field: 'configuration.extract.sourceTable.projectId' - field: 'extract.source_table.project_id' - - api_field: 'configuration.extract.sourceTable.tableId' - field: 'extract.source_table.table_id' - - api_field: 'configuration.extract.useAvroLogicalTypes' - field: 'extract.use_avro_logical_types' - - api_field: 'jobReference.jobId' - field: 'job_id' - - api_field: 'configuration.jobTimeoutMs' - field: 'job_timeout_ms' - - api_field: 'configuration.jobType' - field: 'job_type' - - api_field: 'configuration.labels' - field: 'labels' - - api_field: 'configuration.load.allowJaggedRows' - field: 'load.allow_jagged_rows' - - api_field: 'configuration.load.allowQuotedNewlines' - field: 'load.allow_quoted_newlines' - - api_field: 'configuration.load.autodetect' - field: 'load.autodetect' - - api_field: 'configuration.load.createDisposition' - field: 'load.create_disposition' - - api_field: 'configuration.load.destinationEncryptionConfiguration.kmsKeyName' - field: 'load.destination_encryption_configuration.kms_key_name' - - api_field: 'configuration.load.destinationEncryptionConfiguration.kmsKeyVersion' - field: 'load.destination_encryption_configuration.kms_key_version' - - api_field: 'configuration.load.destinationTable.datasetId' - field: 'load.destination_table.dataset_id' - - api_field: 'configuration.load.destinationTable.projectId' - field: 'load.destination_table.project_id' - - api_field: 'configuration.load.destinationTable.tableId' - field: 'load.destination_table.table_id' - - api_field: 'configuration.load.encoding' - field: 'load.encoding' - - api_field: 'configuration.load.fieldDelimiter' - field: 'load.field_delimiter' - - api_field: 'configuration.load.ignoreUnknownValues' - field: 'load.ignore_unknown_values' - - api_field: 'configuration.load.jsonExtension' - field: 'load.json_extension' - - api_field: 'configuration.load.maxBadRecords' - field: 'load.max_bad_records' - - api_field: 'configuration.load.nullMarker' - field: 'load.null_marker' - - api_field: 'configuration.load.parquetOptions.enableListInference' - field: 'load.parquet_options.enable_list_inference' - - api_field: 'configuration.load.parquetOptions.enumAsString' - field: 'load.parquet_options.enum_as_string' - - api_field: 'configuration.load.projectionFields' - field: 'load.projection_fields' - - api_field: 'configuration.load.quote' - field: 'load.quote' - - api_field: 'configuration.load.schemaUpdateOptions' - field: 'load.schema_update_options' - - api_field: 'configuration.load.skipLeadingRows' - field: 'load.skip_leading_rows' - - api_field: 'configuration.load.sourceFormat' - field: 'load.source_format' - - api_field: 'configuration.load.sourceUris' - field: 'load.source_uris' - - api_field: 'configuration.load.timePartitioning.expirationMs' - field: 'load.time_partitioning.expiration_ms' - - api_field: 'configuration.load.timePartitioning.field' - field: 'load.time_partitioning.field' - - api_field: 'configuration.load.timePartitioning.type' - field: 'load.time_partitioning.type' - - api_field: 'configuration.load.writeDisposition' - field: 'load.write_disposition' - - api_field: 'jobReference.location' - field: 'location' - - api_field: 'configuration.query.allowLargeResults' - field: 'query.allow_large_results' - - api_field: 'configuration.query.connectionProperties.key' - field: 'query.connection_properties.key' - - api_field: 'configuration.query.connectionProperties.value' - field: 'query.connection_properties.value' - - api_field: 'configuration.query.createDisposition' - field: 'query.create_disposition' - - api_field: 'configuration.query.defaultDataset.datasetId' - field: 'query.default_dataset.dataset_id' - - api_field: 'configuration.query.defaultDataset.projectId' - field: 'query.default_dataset.project_id' - - api_field: 'configuration.query.destinationEncryptionConfiguration.kmsKeyName' - field: 'query.destination_encryption_configuration.kms_key_name' - - api_field: 'configuration.query.destinationEncryptionConfiguration.kmsKeyVersion' - field: 'query.destination_encryption_configuration.kms_key_version' - - api_field: 'configuration.query.destinationTable.datasetId' - field: 'query.destination_table.dataset_id' - - api_field: 'configuration.query.destinationTable.projectId' - field: 'query.destination_table.project_id' - - api_field: 'configuration.query.destinationTable.tableId' - field: 'query.destination_table.table_id' - - api_field: 'configuration.query.flattenResults' - field: 'query.flatten_results' - - api_field: 'configuration.query.maximumBillingTier' - field: 'query.maximum_billing_tier' - - api_field: 'configuration.query.maximumBytesBilled' - field: 'query.maximum_bytes_billed' - - api_field: 'configuration.query.parameterMode' - field: 'query.parameter_mode' - - api_field: 'configuration.query.priority' - field: 'query.priority' - - api_field: 'configuration.query.query' - field: 'query.query' - - api_field: 'configuration.query.schemaUpdateOptions' - field: 'query.schema_update_options' - - api_field: 'configuration.query.scriptOptions.keyResultStatement' - field: 'query.script_options.key_result_statement' - - api_field: 'configuration.query.scriptOptions.statementByteBudget' - field: 'query.script_options.statement_byte_budget' - - api_field: 'configuration.query.scriptOptions.statementTimeoutMs' - field: 'query.script_options.statement_timeout_ms' - - api_field: 'configuration.query.useLegacySql' - field: 'query.use_legacy_sql' - - api_field: 'configuration.query.useQueryCache' - field: 'query.use_query_cache' - - api_field: 'configuration.query.userDefinedFunctionResources.inlineCode' - field: 'query.user_defined_function_resources.inline_code' - - api_field: 'configuration.query.userDefinedFunctionResources.resourceUri' - field: 'query.user_defined_function_resources.resource_uri' - - api_field: 'configuration.query.writeDisposition' - field: 'query.write_disposition' - - api_field: 'status.errorResult.location' - - api_field: 'status.errorResult.message' - - api_field: 'status.errorResult.reason' - - api_field: 'status.errors.location' - - api_field: 'status.errors.message' - - api_field: 'status.errors.reason' - - api_field: 'status.state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'user_email' + - api_field: configuration.copy.createDisposition + field: copy.create_disposition + - api_field: configuration.copy.destinationEncryptionConfiguration.kmsKeyName + field: copy.destination_encryption_configuration.kms_key_name + - api_field: configuration.copy.destinationEncryptionConfiguration.kmsKeyVersion + field: copy.destination_encryption_configuration.kms_key_version + - api_field: configuration.copy.destinationTable.datasetId + field: copy.destination_table.dataset_id + - api_field: configuration.copy.destinationTable.projectId + field: copy.destination_table.project_id + - api_field: configuration.copy.destinationTable.tableId + field: copy.destination_table.table_id + - api_field: configuration.copy.sourceTables.datasetId + field: copy.source_tables.dataset_id + - api_field: configuration.copy.sourceTables.projectId + field: copy.source_tables.project_id + - api_field: configuration.copy.sourceTables.tableId + field: copy.source_tables.table_id + - api_field: configuration.copy.writeDisposition + field: copy.write_disposition + - field: effective_labels + provider_only: true + - api_field: configuration.extract.compression + field: extract.compression + - api_field: configuration.extract.destinationFormat + field: extract.destination_format + - api_field: configuration.extract.destinationUris + field: extract.destination_uris + - api_field: configuration.extract.fieldDelimiter + field: extract.field_delimiter + - api_field: configuration.extract.printHeader + field: extract.print_header + - api_field: configuration.extract.sourceModel.datasetId + field: extract.source_model.dataset_id + - api_field: configuration.extract.sourceModel.modelId + field: extract.source_model.model_id + - api_field: configuration.extract.sourceModel.projectId + field: extract.source_model.project_id + - api_field: configuration.extract.sourceTable.datasetId + field: extract.source_table.dataset_id + - api_field: configuration.extract.sourceTable.projectId + field: extract.source_table.project_id + - api_field: configuration.extract.sourceTable.tableId + field: extract.source_table.table_id + - api_field: configuration.extract.useAvroLogicalTypes + field: extract.use_avro_logical_types + - api_field: jobReference.jobId + field: job_id + - api_field: configuration.jobTimeoutMs + field: job_timeout_ms + - api_field: configuration.jobType + field: job_type + - api_field: configuration.labels + field: labels + - api_field: configuration.load.allowJaggedRows + field: load.allow_jagged_rows + - api_field: configuration.load.allowQuotedNewlines + field: load.allow_quoted_newlines + - api_field: configuration.load.autodetect + field: load.autodetect + - api_field: configuration.load.createDisposition + field: load.create_disposition + - api_field: configuration.load.destinationEncryptionConfiguration.kmsKeyName + field: load.destination_encryption_configuration.kms_key_name + - api_field: configuration.load.destinationEncryptionConfiguration.kmsKeyVersion + field: load.destination_encryption_configuration.kms_key_version + - api_field: configuration.load.destinationTable.datasetId + field: load.destination_table.dataset_id + - api_field: configuration.load.destinationTable.projectId + field: load.destination_table.project_id + - api_field: configuration.load.destinationTable.tableId + field: load.destination_table.table_id + - api_field: configuration.load.encoding + field: load.encoding + - api_field: configuration.load.fieldDelimiter + field: load.field_delimiter + - api_field: configuration.load.ignoreUnknownValues + field: load.ignore_unknown_values + - api_field: configuration.load.jsonExtension + field: load.json_extension + - api_field: configuration.load.maxBadRecords + field: load.max_bad_records + - api_field: configuration.load.nullMarker + field: load.null_marker + - api_field: configuration.load.parquetOptions.enableListInference + field: load.parquet_options.enable_list_inference + - api_field: configuration.load.parquetOptions.enumAsString + field: load.parquet_options.enum_as_string + - api_field: configuration.load.projectionFields + field: load.projection_fields + - api_field: configuration.load.quote + field: load.quote + - api_field: configuration.load.schemaUpdateOptions + field: load.schema_update_options + - api_field: configuration.load.skipLeadingRows + field: load.skip_leading_rows + - api_field: configuration.load.sourceFormat + field: load.source_format + - api_field: configuration.load.sourceUris + field: load.source_uris + - api_field: configuration.load.timePartitioning.expirationMs + field: load.time_partitioning.expiration_ms + - api_field: configuration.load.timePartitioning.field + field: load.time_partitioning.field + - api_field: configuration.load.timePartitioning.type + field: load.time_partitioning.type + - api_field: configuration.load.writeDisposition + field: load.write_disposition + - api_field: jobReference.location + field: location + - api_field: configuration.query.allowLargeResults + field: query.allow_large_results + - api_field: configuration.query.connectionProperties.key + field: query.connection_properties.key + - api_field: configuration.query.connectionProperties.value + field: query.connection_properties.value + - api_field: configuration.query.createDisposition + field: query.create_disposition + - api_field: configuration.query.defaultDataset.datasetId + field: query.default_dataset.dataset_id + - api_field: configuration.query.defaultDataset.projectId + field: query.default_dataset.project_id + - api_field: configuration.query.destinationEncryptionConfiguration.kmsKeyName + field: query.destination_encryption_configuration.kms_key_name + - api_field: configuration.query.destinationEncryptionConfiguration.kmsKeyVersion + field: query.destination_encryption_configuration.kms_key_version + - api_field: configuration.query.destinationTable.datasetId + field: query.destination_table.dataset_id + - api_field: configuration.query.destinationTable.projectId + field: query.destination_table.project_id + - api_field: configuration.query.destinationTable.tableId + field: query.destination_table.table_id + - api_field: configuration.query.flattenResults + field: query.flatten_results + - api_field: configuration.query.maximumBillingTier + field: query.maximum_billing_tier + - api_field: configuration.query.maximumBytesBilled + field: query.maximum_bytes_billed + - api_field: configuration.query.parameterMode + field: query.parameter_mode + - api_field: configuration.query.priority + field: query.priority + - api_field: configuration.query.query + field: query.query + - api_field: configuration.query.schemaUpdateOptions + field: query.schema_update_options + - api_field: configuration.query.scriptOptions.keyResultStatement + field: query.script_options.key_result_statement + - api_field: configuration.query.scriptOptions.statementByteBudget + field: query.script_options.statement_byte_budget + - api_field: configuration.query.scriptOptions.statementTimeoutMs + field: query.script_options.statement_timeout_ms + - api_field: configuration.query.useLegacySql + field: query.use_legacy_sql + - api_field: configuration.query.useQueryCache + field: query.use_query_cache + - api_field: configuration.query.userDefinedFunctionResources.inlineCode + field: query.user_defined_function_resources.inline_code + - api_field: configuration.query.userDefinedFunctionResources.resourceUri + field: query.user_defined_function_resources.resource_uri + - api_field: configuration.query.writeDisposition + field: query.write_disposition + - api_field: status.errorResult.location + - api_field: status.errorResult.message + - api_field: status.errorResult.reason + - api_field: status.errors.location + - api_field: status.errors.message + - api_field: status.errors.reason + - api_field: status.state + - field: terraform_labels + provider_only: true + - api_field: user_email diff --git a/google/services/bigquery/resource_bigquery_routine_generated_meta.yaml b/google/services/bigquery/resource_bigquery_routine_generated_meta.yaml index 1b5ce2bbf45..abc340f5612 100644 --- a/google/services/bigquery/resource_bigquery_routine_generated_meta.yaml +++ b/google/services/bigquery/resource_bigquery_routine_generated_meta.yaml @@ -1,44 +1,44 @@ -resource: 'google_bigquery_routine' -generation_type: 'mmv1' -source_file: 'products/bigquery/Routine.yaml' -api_service_name: 'bigquery.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Routine' +resource: google_bigquery_routine +generation_type: mmv1 +source_file: products/bigquery/Routine.yaml +api_service_name: bigquery.googleapis.com +api_version: v2 +api_resource_type_kind: Routine fields: - - api_field: 'arguments.argumentKind' - - api_field: 'arguments.dataType' - json: true - - api_field: 'arguments.mode' - - api_field: 'arguments.name' - - api_field: 'creationTime' - - api_field: 'dataGovernanceType' - - api_field: 'routineReference.datasetId' - field: 'dataset_id' - - api_field: 'definitionBody' - - api_field: 'description' - - api_field: 'determinismLevel' - - api_field: 'importedLibraries' - - api_field: 'language' - - api_field: 'lastModifiedTime' - - api_field: 'remoteFunctionOptions.connection' - - api_field: 'remoteFunctionOptions.endpoint' - - api_field: 'remoteFunctionOptions.maxBatchingRows' - - api_field: 'remoteFunctionOptions.userDefinedContext' - - api_field: 'returnTableType' - json: true - - api_field: 'returnType' - json: true - - api_field: 'routineReference.routineId' - field: 'routine_id' - - api_field: 'routineType' - - api_field: 'securityMode' - - api_field: 'sparkOptions.archiveUris' - - api_field: 'sparkOptions.connection' - - api_field: 'sparkOptions.containerImage' - - api_field: 'sparkOptions.fileUris' - - api_field: 'sparkOptions.jarUris' - - api_field: 'sparkOptions.mainClass' - - api_field: 'sparkOptions.mainFileUri' - - api_field: 'sparkOptions.properties' - - api_field: 'sparkOptions.pyFileUris' - - api_field: 'sparkOptions.runtimeVersion' + - api_field: arguments.argumentKind + - api_field: arguments.dataType + json: true + - api_field: arguments.mode + - api_field: arguments.name + - api_field: creationTime + - api_field: dataGovernanceType + - api_field: routineReference.datasetId + field: dataset_id + - api_field: definitionBody + - api_field: description + - api_field: determinismLevel + - api_field: importedLibraries + - api_field: language + - api_field: lastModifiedTime + - api_field: remoteFunctionOptions.connection + - api_field: remoteFunctionOptions.endpoint + - api_field: remoteFunctionOptions.maxBatchingRows + - api_field: remoteFunctionOptions.userDefinedContext + - api_field: returnTableType + json: true + - api_field: returnType + json: true + - api_field: routineReference.routineId + field: routine_id + - api_field: routineType + - api_field: securityMode + - api_field: sparkOptions.archiveUris + - api_field: sparkOptions.connection + - api_field: sparkOptions.containerImage + - api_field: sparkOptions.fileUris + - api_field: sparkOptions.jarUris + - api_field: sparkOptions.mainClass + - api_field: sparkOptions.mainFileUri + - api_field: sparkOptions.properties + - api_field: sparkOptions.pyFileUris + - api_field: sparkOptions.runtimeVersion diff --git a/google/services/bigquery/resource_bigquery_row_access_policy_generated_meta.yaml b/google/services/bigquery/resource_bigquery_row_access_policy_generated_meta.yaml index 47741d189f3..6e2d8c4dbd7 100644 --- a/google/services/bigquery/resource_bigquery_row_access_policy_generated_meta.yaml +++ b/google/services/bigquery/resource_bigquery_row_access_policy_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_bigquery_row_access_policy' -generation_type: 'mmv1' -source_file: 'products/bigquery/RowAccessPolicy.yaml' -api_service_name: 'bigquery.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'RowAccessPolicy' +resource: google_bigquery_row_access_policy +generation_type: mmv1 +source_file: products/bigquery/RowAccessPolicy.yaml +api_service_name: bigquery.googleapis.com +api_version: v2 +api_resource_type_kind: RowAccessPolicy fields: - - api_field: 'creationTime' - - api_field: 'rowAccessPolicyReference.datasetId' - field: 'dataset_id' - - api_field: 'filterPredicate' - - api_field: 'grantees' - - api_field: 'lastModifiedTime' - - api_field: 'rowAccessPolicyReference.policyId' - field: 'policy_id' - - api_field: 'rowAccessPolicyReference.tableId' - field: 'table_id' + - api_field: creationTime + - api_field: rowAccessPolicyReference.datasetId + field: dataset_id + - api_field: filterPredicate + - api_field: grantees + - api_field: lastModifiedTime + - api_field: rowAccessPolicyReference.policyId + field: policy_id + - api_field: rowAccessPolicyReference.tableId + field: table_id diff --git a/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_data_exchange_generated_test.go b/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_data_exchange_generated_test.go index 9b87218580d..c2f7d690dc7 100644 --- a/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_data_exchange_generated_test.go +++ b/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_data_exchange_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccBigqueryAnalyticsHubDataExchangeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_data_exchange_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s roles/viewer", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubDataExchangeIAMBindingStateID("google_bigquery_analytics_hub_data_exchange_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccBigqueryAnalyticsHubDataExchangeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_data_exchange_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s roles/viewer", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubDataExchangeIAMBindingStateID("google_bigquery_analytics_hub_data_exchange_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccBigqueryAnalyticsHubDataExchangeIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_data_exchange_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubDataExchangeIAMMemberStateID("google_bigquery_analytics_hub_data_exchange_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccBigqueryAnalyticsHubDataExchangeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_data_exchange_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubDataExchangeIAMPolicyStateID("google_bigquery_analytics_hub_data_exchange_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccBigqueryAnalyticsHubDataExchangeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_data_exchange_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubDataExchangeIAMPolicyStateID("google_bigquery_analytics_hub_data_exchange_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -245,3 +246,57 @@ resource "google_bigquery_analytics_hub_data_exchange_iam_binding" "foo" { } `, context) } + +func generateBigqueryAnalyticsHubDataExchangeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_exchange_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_exchange_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s", project, location, data_exchange_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryAnalyticsHubDataExchangeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_exchange_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_exchange_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s", project, location, data_exchange_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryAnalyticsHubDataExchangeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_exchange_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_exchange_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s", project, location, data_exchange_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_listing_generated_test.go b/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_listing_generated_test.go index 6c5f0e1b69f..887a5a335ac 100644 --- a/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_listing_generated_test.go +++ b/google/services/bigqueryanalyticshub/iam_bigquery_analytics_hub_listing_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccBigqueryAnalyticsHubListingIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_listing_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s roles/viewer", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"]), fmt.Sprintf("tf_test_my_listing%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubListingIAMBindingStateID("google_bigquery_analytics_hub_listing_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccBigqueryAnalyticsHubListingIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_listing_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s roles/viewer", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"]), fmt.Sprintf("tf_test_my_listing%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubListingIAMBindingStateID("google_bigquery_analytics_hub_listing_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccBigqueryAnalyticsHubListingIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_listing_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"]), fmt.Sprintf("tf_test_my_listing%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubListingIAMMemberStateID("google_bigquery_analytics_hub_listing_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccBigqueryAnalyticsHubListingIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_listing_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"]), fmt.Sprintf("tf_test_my_listing%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubListingIAMPolicyStateID("google_bigquery_analytics_hub_listing_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccBigqueryAnalyticsHubListingIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_analytics_hub_listing_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf_test_my_data_exchange%s", context["random_suffix"]), fmt.Sprintf("tf_test_my_listing%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryAnalyticsHubListingIAMPolicyStateID("google_bigquery_analytics_hub_listing_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -346,3 +347,60 @@ resource "google_bigquery_analytics_hub_listing_iam_binding" "foo" { } `, context) } + +func generateBigqueryAnalyticsHubListingIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_exchange_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_exchange_id"]) + listing_id := tpgresource.GetResourceNameFromSelfLink(rawState["listing_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s", project, location, data_exchange_id, listing_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryAnalyticsHubListingIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_exchange_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_exchange_id"]) + listing_id := tpgresource.GetResourceNameFromSelfLink(rawState["listing_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s", project, location, data_exchange_id, listing_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryAnalyticsHubListingIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_exchange_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_exchange_id"]) + listing_id := tpgresource.GetResourceNameFromSelfLink(rawState["listing_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataExchanges/%s/listings/%s", project, location, data_exchange_id, listing_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_data_exchange_generated_meta.yaml b/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_data_exchange_generated_meta.yaml index 6243261cec0..e33439cbcdb 100644 --- a/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_data_exchange_generated_meta.yaml +++ b/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_data_exchange_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_bigquery_analytics_hub_data_exchange' -generation_type: 'mmv1' -source_file: 'products/bigqueryanalyticshub/DataExchange.yaml' -api_service_name: 'analyticshub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataExchange' +resource: google_bigquery_analytics_hub_data_exchange +generation_type: mmv1 +source_file: products/bigqueryanalyticshub/DataExchange.yaml +api_service_name: analyticshub.googleapis.com +api_version: v1 +api_resource_type_kind: DataExchange fields: - - field: 'data_exchange_id' - provider_only: true - - api_field: 'description' - - api_field: 'discoveryType' - - api_field: 'displayName' - - api_field: 'documentation' - - api_field: 'icon' - - api_field: 'listingCount' - - field: 'location' - provider_only: true - - api_field: 'logLinkedDatasetQueryUserEmail' - - api_field: 'name' - - api_field: 'primaryContact' - - api_field: 'sharingEnvironmentConfig.dcrExchangeConfig' - - api_field: 'sharingEnvironmentConfig.defaultExchangeConfig' + - field: data_exchange_id + provider_only: true + - api_field: description + - api_field: discoveryType + - api_field: displayName + - api_field: documentation + - api_field: icon + - api_field: listingCount + - field: location + provider_only: true + - api_field: logLinkedDatasetQueryUserEmail + - api_field: name + - api_field: primaryContact + - api_field: sharingEnvironmentConfig.dcrExchangeConfig + - api_field: sharingEnvironmentConfig.defaultExchangeConfig diff --git a/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_generated_meta.yaml b/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_generated_meta.yaml index d51832dc4de..ecb7b14407a 100644 --- a/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_generated_meta.yaml +++ b/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_generated_meta.yaml @@ -1,40 +1,40 @@ -resource: 'google_bigquery_analytics_hub_listing' -generation_type: 'mmv1' -source_file: 'products/bigqueryanalyticshub/Listing.yaml' -api_service_name: 'analyticshub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Listing' +resource: google_bigquery_analytics_hub_listing +generation_type: mmv1 +source_file: products/bigqueryanalyticshub/Listing.yaml +api_service_name: analyticshub.googleapis.com +api_version: v1 +api_resource_type_kind: Listing fields: - - api_field: 'allowOnlyMetadataSharing' - - api_field: 'bigqueryDataset.dataset' - - api_field: 'bigqueryDataset.selectedResources.table' - - api_field: 'categories' - - api_field: 'commercialInfo.cloudMarketplace.commercialState' - - api_field: 'commercialInfo.cloudMarketplace.service' - - field: 'data_exchange_id' - provider_only: true - - api_field: 'dataProvider.name' - - api_field: 'dataProvider.primaryContact' - - field: 'delete_commercial' - provider_only: true - - api_field: 'description' - - api_field: 'discoveryType' - - api_field: 'displayName' - - api_field: 'documentation' - - api_field: 'icon' - - field: 'listing_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'logLinkedDatasetQueryUserEmail' - - api_field: 'name' - - api_field: 'primaryContact' - - api_field: 'publisher.name' - - api_field: 'publisher.primaryContact' - - api_field: 'pubsubTopic.dataAffinityRegions' - - api_field: 'pubsubTopic.topic' - - api_field: 'requestAccess' - - api_field: 'restrictedExportConfig.enabled' - - api_field: 'restrictedExportConfig.restrictDirectTableAccess' - - api_field: 'restrictedExportConfig.restrictQueryResult' - - api_field: 'state' + - api_field: allowOnlyMetadataSharing + - api_field: bigqueryDataset.dataset + - api_field: bigqueryDataset.selectedResources.table + - api_field: categories + - api_field: commercialInfo.cloudMarketplace.commercialState + - api_field: commercialInfo.cloudMarketplace.service + - field: data_exchange_id + provider_only: true + - api_field: dataProvider.name + - api_field: dataProvider.primaryContact + - field: delete_commercial + provider_only: true + - api_field: description + - api_field: discoveryType + - api_field: displayName + - api_field: documentation + - api_field: icon + - field: listing_id + provider_only: true + - field: location + provider_only: true + - api_field: logLinkedDatasetQueryUserEmail + - api_field: name + - api_field: primaryContact + - api_field: publisher.name + - api_field: publisher.primaryContact + - api_field: pubsubTopic.dataAffinityRegions + - api_field: pubsubTopic.topic + - api_field: requestAccess + - api_field: restrictedExportConfig.enabled + - api_field: restrictedExportConfig.restrictDirectTableAccess + - api_field: restrictedExportConfig.restrictQueryResult + - api_field: state diff --git a/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_subscription_generated_meta.yaml b/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_subscription_generated_meta.yaml index 767cd983d08..b957469f2f1 100644 --- a/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_subscription_generated_meta.yaml +++ b/google/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_subscription_generated_meta.yaml @@ -1,34 +1,38 @@ -resource: 'google_bigquery_analytics_hub_listing_subscription' -generation_type: 'mmv1' -source_file: 'products/bigqueryanalyticshub/ListingSubscription.yaml' -api_service_name: 'analyticshub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Subscription' +resource: google_bigquery_analytics_hub_listing_subscription +generation_type: mmv1 +source_file: products/bigqueryanalyticshub/ListingSubscription.yaml +api_service_name: analyticshub.googleapis.com +api_version: v1 +api_resource_type_kind: Subscription fields: - - api_field: 'commercialInfo.cloudMarketplace.order' - - api_field: 'creationTime' - - field: 'data_exchange_id' - provider_only: true - - api_field: 'destinationDataset.datasetReference.datasetId' - - api_field: 'destinationDataset.datasetReference.projectId' - - api_field: 'destinationDataset.description' - - api_field: 'destinationDataset.friendlyName' - - api_field: 'destinationDataset.labels' - - api_field: 'destinationDataset.location' - - api_field: 'lastModifyTime' - - api_field: 'linkedDatasetMap.linked_resource.linkedDataset' - - api_field: 'linkedDatasetMap.linked_resource.listing' - - api_field: 'linkedResources.linkedDataset' - - api_field: 'linkedResources.listing' - - field: 'listing_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'logLinkedDatasetQueryUserEmail' - - api_field: 'name' - - api_field: 'organizationDisplayName' - - api_field: 'organizationId' - - api_field: 'resourceType' - - api_field: 'state' - - api_field: 'subscriberContact' - - api_field: 'subscriptionId' + - api_field: commercialInfo.cloudMarketplace.order + - api_field: creationTime + - field: data_exchange_id + provider_only: true + - api_field: destinationDataset.datasetReference.datasetId + - api_field: destinationDataset.datasetReference.projectId + - api_field: destinationDataset.description + - api_field: destinationDataset.friendlyName + - api_field: destinationDataset.labels + - api_field: destinationDataset.location + - api_field: lastModifyTime + - api_field: linkedDatasetMap.key + field: linked_dataset_map.resource_name + - api_field: linkedDatasetMap.value.linkedDataset + field: linked_dataset_map.linked_dataset + - api_field: linkedDatasetMap.value.listing + field: linked_dataset_map.listing + - api_field: linkedResources.linkedDataset + - api_field: linkedResources.listing + - field: listing_id + provider_only: true + - field: location + provider_only: true + - api_field: logLinkedDatasetQueryUserEmail + - api_field: name + - api_field: organizationDisplayName + - api_field: organizationId + - api_field: resourceType + - api_field: state + - api_field: subscriberContact + - api_field: subscriptionId diff --git a/google/services/bigqueryconnection/iam_bigquery_connection_generated_test.go b/google/services/bigqueryconnection/iam_bigquery_connection_generated_test.go index a6c3cd18f13..fce8b3773f0 100644 --- a/google/services/bigqueryconnection/iam_bigquery_connection_generated_test.go +++ b/google/services/bigqueryconnection/iam_bigquery_connection_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -59,7 +60,7 @@ func TestAccBigqueryConnectionConnectionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_connection_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/connections/%s roles/viewer", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf-test-my-connection%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryConnectionConnectionIAMBindingStateID("google_bigquery_connection_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -69,7 +70,7 @@ func TestAccBigqueryConnectionConnectionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_connection_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/connections/%s roles/viewer", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf-test-my-connection%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryConnectionConnectionIAMBindingStateID("google_bigquery_connection_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -99,7 +100,7 @@ func TestAccBigqueryConnectionConnectionIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_connection_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/connections/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf-test-my-connection%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryConnectionConnectionIAMMemberStateID("google_bigquery_connection_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccBigqueryConnectionConnectionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_connection_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/connections/%s", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf-test-my-connection%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryConnectionConnectionIAMPolicyStateID("google_bigquery_connection_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -138,7 +139,7 @@ func TestAccBigqueryConnectionConnectionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_connection_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/connections/%s", envvar.GetTestProjectFromEnv(), "US", fmt.Sprintf("tf-test-my-connection%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryConnectionConnectionIAMPolicyStateID("google_bigquery_connection_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -262,3 +263,57 @@ resource "google_bigquery_connection_iam_binding" "foo" { } `, context) } + +func generateBigqueryConnectionConnectionIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + connection_id := tpgresource.GetResourceNameFromSelfLink(rawState["connection_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/connections/%s", project, location, connection_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryConnectionConnectionIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + connection_id := tpgresource.GetResourceNameFromSelfLink(rawState["connection_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/connections/%s", project, location, connection_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryConnectionConnectionIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + connection_id := tpgresource.GetResourceNameFromSelfLink(rawState["connection_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/connections/%s", project, location, connection_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/bigqueryconnection/resource_bigquery_connection_generated_meta.yaml b/google/services/bigqueryconnection/resource_bigquery_connection_generated_meta.yaml index 93af6b5b15c..03b88d58d51 100644 --- a/google/services/bigqueryconnection/resource_bigquery_connection_generated_meta.yaml +++ b/google/services/bigqueryconnection/resource_bigquery_connection_generated_meta.yaml @@ -1,40 +1,40 @@ -resource: 'google_bigquery_connection' -generation_type: 'mmv1' -source_file: 'products/bigqueryconnection/Connection.yaml' -api_service_name: 'bigqueryconnection.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Connection' +resource: google_bigquery_connection +generation_type: mmv1 +source_file: products/bigqueryconnection/Connection.yaml +api_service_name: bigqueryconnection.googleapis.com +api_version: v1 +api_resource_type_kind: Connection fields: - - api_field: 'aws.accessRole.iamRoleId' - - api_field: 'aws.accessRole.identity' - - api_field: 'azure.application' - - api_field: 'azure.clientId' - - api_field: 'azure.customerTenantId' - - api_field: 'azure.federatedApplicationClientId' - - api_field: 'azure.identity' - - api_field: 'azure.objectId' - - api_field: 'azure.redirectUri' - - api_field: 'cloudResource.serviceAccountId' - - api_field: 'cloudSpanner.database' - - api_field: 'cloudSpanner.databaseRole' - - api_field: 'cloudSpanner.maxParallelism' - - api_field: 'cloudSpanner.useDataBoost' - - api_field: 'cloudSpanner.useParallelism' - - api_field: 'cloudSpanner.useServerlessAnalytics' - - api_field: 'cloudSql.credential.password' - - api_field: 'cloudSql.credential.username' - - api_field: 'cloudSql.database' - - api_field: 'cloudSql.instanceId' - - api_field: 'cloudSql.serviceAccountId' - - api_field: 'cloudSql.type' - - api_field: 'connection_id' - - api_field: 'description' - - api_field: 'friendlyName' - - api_field: 'hasCredential' - - api_field: 'kmsKeyName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'spark.metastoreServiceConfig.metastoreService' - - api_field: 'spark.serviceAccountId' - - api_field: 'spark.sparkHistoryServerConfig.dataprocCluster' + - api_field: aws.accessRole.iamRoleId + - api_field: aws.accessRole.identity + - api_field: azure.application + - api_field: azure.clientId + - api_field: azure.customerTenantId + - api_field: azure.federatedApplicationClientId + - api_field: azure.identity + - api_field: azure.objectId + - api_field: azure.redirectUri + - api_field: cloudResource.serviceAccountId + - api_field: cloudSpanner.database + - api_field: cloudSpanner.databaseRole + - api_field: cloudSpanner.maxParallelism + - api_field: cloudSpanner.useDataBoost + - api_field: cloudSpanner.useParallelism + - api_field: cloudSpanner.useServerlessAnalytics + - api_field: cloudSql.credential.password + - api_field: cloudSql.credential.username + - api_field: cloudSql.database + - api_field: cloudSql.instanceId + - api_field: cloudSql.serviceAccountId + - api_field: cloudSql.type + - api_field: connection_id + - api_field: description + - api_field: friendlyName + - api_field: hasCredential + - api_field: kmsKeyName + - field: location + provider_only: true + - api_field: name + - api_field: spark.metastoreServiceConfig.metastoreService + - api_field: spark.serviceAccountId + - api_field: spark.sparkHistoryServerConfig.dataprocCluster diff --git a/google/services/bigquerydatapolicy/iam_bigquery_datapolicy_data_policy_generated_test.go b/google/services/bigquerydatapolicy/iam_bigquery_datapolicy_data_policy_generated_test.go index 9eb7cf8443e..e6f16b453e7 100644 --- a/google/services/bigquerydatapolicy/iam_bigquery_datapolicy_data_policy_generated_test.go +++ b/google/services/bigquerydatapolicy/iam_bigquery_datapolicy_data_policy_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicy_data_policy_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyDataPolicyIAMBindingStateID("google_bigquery_datapolicy_data_policy_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccBigqueryDatapolicyDataPolicyIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicy_data_policy_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyDataPolicyIAMBindingStateID("google_bigquery_datapolicy_data_policy_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccBigqueryDatapolicyDataPolicyIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicy_data_policy_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyDataPolicyIAMMemberStateID("google_bigquery_datapolicy_data_policy_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicy_data_policy_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyDataPolicyIAMPolicyStateID("google_bigquery_datapolicy_data_policy_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccBigqueryDatapolicyDataPolicyIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicy_data_policy_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyDataPolicyIAMPolicyStateID("google_bigquery_datapolicy_data_policy_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -310,3 +311,57 @@ resource "google_bigquery_datapolicy_data_policy_iam_binding" "foo" { } `, context) } + +func generateBigqueryDatapolicyDataPolicyIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", project, location, data_policy_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryDatapolicyDataPolicyIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", project, location, data_policy_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryDatapolicyDataPolicyIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", project, location, data_policy_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/bigquerydatapolicy/resource_bigquery_datapolicy_data_policy_generated_meta.yaml b/google/services/bigquerydatapolicy/resource_bigquery_datapolicy_data_policy_generated_meta.yaml index 47d67343050..844a60b170e 100644 --- a/google/services/bigquerydatapolicy/resource_bigquery_datapolicy_data_policy_generated_meta.yaml +++ b/google/services/bigquerydatapolicy/resource_bigquery_datapolicy_data_policy_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_bigquery_datapolicy_data_policy' -generation_type: 'mmv1' -source_file: 'products/bigquerydatapolicy/DataPolicy.yaml' -api_service_name: 'bigquerydatapolicy.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataPolicy' +resource: google_bigquery_datapolicy_data_policy +generation_type: mmv1 +source_file: products/bigquerydatapolicy/DataPolicy.yaml +api_service_name: bigquerydatapolicy.googleapis.com +api_version: v1 +api_resource_type_kind: DataPolicy fields: - - api_field: 'dataMaskingPolicy.predefinedExpression' - - api_field: 'dataMaskingPolicy.routine' - - api_field: 'dataPolicyId' - - api_field: 'dataPolicyType' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'policyTag' + - api_field: dataMaskingPolicy.predefinedExpression + - api_field: dataMaskingPolicy.routine + - api_field: dataPolicyId + - api_field: dataPolicyType + - field: location + provider_only: true + - api_field: name + - api_field: policyTag diff --git a/google/services/bigquerydatapolicyv2/iam_bigquery_datapolicyv2_data_policy_generated_test.go b/google/services/bigquerydatapolicyv2/iam_bigquery_datapolicyv2_data_policy_generated_test.go index 955af91a258..2a39bc1e2ad 100644 --- a/google/services/bigquerydatapolicyv2/iam_bigquery_datapolicyv2_data_policy_generated_test.go +++ b/google/services/bigquerydatapolicyv2/iam_bigquery_datapolicyv2_data_policy_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccBigqueryDatapolicyv2DataPolicyIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicyv2_data_policy_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_basic_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyv2DataPolicyIAMBindingStateID("google_bigquery_datapolicyv2_data_policy_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccBigqueryDatapolicyv2DataPolicyIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicyv2_data_policy_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_basic_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyv2DataPolicyIAMBindingStateID("google_bigquery_datapolicyv2_data_policy_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccBigqueryDatapolicyv2DataPolicyIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicyv2_data_policy_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_basic_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyv2DataPolicyIAMMemberStateID("google_bigquery_datapolicyv2_data_policy_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccBigqueryDatapolicyv2DataPolicyIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicyv2_data_policy_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_basic_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyv2DataPolicyIAMPolicyStateID("google_bigquery_datapolicyv2_data_policy_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccBigqueryDatapolicyv2DataPolicyIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_bigquery_datapolicyv2_data_policy_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_basic_data_policy%s", context["random_suffix"])), + ImportStateIdFunc: generateBigqueryDatapolicyv2DataPolicyIAMPolicyStateID("google_bigquery_datapolicyv2_data_policy_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -240,3 +241,57 @@ resource "google_bigquery_datapolicyv2_data_policy_iam_binding" "foo" { } `, context) } + +func generateBigqueryDatapolicyv2DataPolicyIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", project, location, data_policy_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryDatapolicyv2DataPolicyIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", project, location, data_policy_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBigqueryDatapolicyv2DataPolicyIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataPolicies/%s", project, location, data_policy_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/bigquerydatapolicyv2/resource_bigquery_datapolicyv2_data_policy_generated_meta.yaml b/google/services/bigquerydatapolicyv2/resource_bigquery_datapolicyv2_data_policy_generated_meta.yaml index fee6eaabdd6..d8d573b2226 100644 --- a/google/services/bigquerydatapolicyv2/resource_bigquery_datapolicyv2_data_policy_generated_meta.yaml +++ b/google/services/bigquerydatapolicyv2/resource_bigquery_datapolicyv2_data_policy_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_bigquery_datapolicyv2_data_policy' -generation_type: 'mmv1' -source_file: 'products/bigquerydatapolicyv2/DataPolicy.yaml' -api_service_name: 'bigquerydatapolicy.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'DataPolicy' +resource: google_bigquery_datapolicyv2_data_policy +generation_type: mmv1 +source_file: products/bigquerydatapolicyv2/DataPolicy.yaml +api_service_name: bigquerydatapolicy.googleapis.com +api_version: v2 +api_resource_type_kind: DataPolicy fields: - - api_field: 'dataMaskingPolicy.predefinedExpression' - - api_field: 'dataMaskingPolicy.routine' - - api_field: 'dataPolicyId' - - api_field: 'dataPolicyType' - - api_field: 'etag' - - api_field: 'grantees' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'policyTag' - - api_field: 'version' + - api_field: dataMaskingPolicy.predefinedExpression + - api_field: dataMaskingPolicy.routine + - api_field: dataPolicyId + - api_field: dataPolicyType + - api_field: etag + - api_field: grantees + - field: location + provider_only: true + - api_field: name + - api_field: policyTag + - api_field: version diff --git a/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_generated_meta.yaml b/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_generated_meta.yaml index acc76ad3205..ddb05e0282f 100644 --- a/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_generated_meta.yaml +++ b/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_bigquery_data_transfer_config' -generation_type: 'mmv1' -source_file: 'products/bigquerydatatransfer/Config.yaml' -api_service_name: 'bigquerydatatransfer.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TransferConfig' +resource: google_bigquery_data_transfer_config +generation_type: mmv1 +source_file: products/bigquerydatatransfer/Config.yaml +api_service_name: bigquerydatatransfer.googleapis.com +api_version: v1 +api_resource_type_kind: TransferConfig fields: - - api_field: 'dataRefreshWindowDays' - - api_field: 'dataSourceId' - - api_field: 'destinationDatasetId' - - api_field: 'disabled' - - api_field: 'displayName' - - api_field: 'emailPreferences.enableFailureEmail' - - api_field: 'encryptionConfiguration.kmsKeyName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'notificationPubsubTopic' - - api_field: 'params' - - api_field: 'schedule' - - api_field: 'scheduleOptions.disableAutoScheduling' - - api_field: 'scheduleOptions.endTime' - - api_field: 'scheduleOptions.startTime' - - field: 'sensitive_params.secret_access_key' - provider_only: true - - field: 'sensitive_params.secret_access_key_wo' - provider_only: true - - field: 'sensitive_params.secret_access_key_wo_version' - provider_only: true - - field: 'service_account_name' - provider_only: true + - api_field: dataRefreshWindowDays + - api_field: dataSourceId + - api_field: destinationDatasetId + - api_field: disabled + - api_field: displayName + - api_field: emailPreferences.enableFailureEmail + - api_field: encryptionConfiguration.kmsKeyName + - field: location + provider_only: true + - api_field: name + - api_field: notificationPubsubTopic + - api_field: params + - api_field: schedule + - api_field: scheduleOptions.disableAutoScheduling + - api_field: scheduleOptions.endTime + - api_field: scheduleOptions.startTime + - field: sensitive_params.secret_access_key + provider_only: true + - field: sensitive_params.secret_access_key_wo + provider_only: true + - field: sensitive_params.secret_access_key_wo_version + provider_only: true + - field: service_account_name + provider_only: true diff --git a/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_test.go b/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_test.go index 484c7ea710f..fe8ad622b8f 100644 --- a/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_test.go +++ b/google/services/bigquerydatatransfer/resource_bigquery_data_transfer_config_test.go @@ -18,16 +18,15 @@ package bigquerydatatransfer_test import ( "fmt" - "strings" - "testing" - "time" - "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/services/bigquerydatatransfer" "github.com/hashicorp/terraform-provider-google/google/tpgresource" transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "strings" + "testing" + "time" ) func TestBigqueryDataTransferConfig_resourceBigqueryDTCParamsCustomDiffFuncForceNewWhenGoogleCloudStorage(t *testing.T) { @@ -657,6 +656,19 @@ resource "google_pubsub_topic" "my_topic" { name = "tf-test-my-topic-%s" } +resource "google_bigquery_table" "my_table" { + deletion_protection = false + + dataset_id = google_bigquery_dataset.my_dataset.dataset_id + table_id = "my_table" + schema = < 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + attestor := tpgresource.GetResourceNameFromSelfLink(rawState["attestor"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/attestors/%s", project, attestor), "", "", rawState["condition.0.title"]), nil + } +} + +func generateBinaryAuthorizationAttestorIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + attestor := tpgresource.GetResourceNameFromSelfLink(rawState["attestor"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/attestors/%s", project, attestor), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateBinaryAuthorizationAttestorIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + attestor := tpgresource.GetResourceNameFromSelfLink(rawState["attestor"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/attestors/%s", project, attestor), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/binaryauthorization/resource_binary_authorization_attestor_generated_meta.yaml b/google/services/binaryauthorization/resource_binary_authorization_attestor_generated_meta.yaml index 264007fbcff..acb86d23e03 100644 --- a/google/services/binaryauthorization/resource_binary_authorization_attestor_generated_meta.yaml +++ b/google/services/binaryauthorization/resource_binary_authorization_attestor_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_binary_authorization_attestor' -generation_type: 'mmv1' -source_file: 'products/binaryauthorization/Attestor.yaml' -api_service_name: 'binaryauthorization.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Attestor' +resource: google_binary_authorization_attestor +generation_type: mmv1 +source_file: products/binaryauthorization/Attestor.yaml +api_service_name: binaryauthorization.googleapis.com +api_version: v1 +api_resource_type_kind: Attestor fields: - - api_field: 'userOwnedGrafeasNote.delegationServiceAccountEmail' - field: 'attestation_authority_note.delegation_service_account_email' - - api_field: 'userOwnedGrafeasNote.noteReference' - field: 'attestation_authority_note.note_reference' - - api_field: 'userOwnedGrafeasNote.publicKeys.asciiArmoredPgpPublicKey' - field: 'attestation_authority_note.public_keys.ascii_armored_pgp_public_key' - - api_field: 'userOwnedGrafeasNote.publicKeys.comment' - field: 'attestation_authority_note.public_keys.comment' - - api_field: 'userOwnedGrafeasNote.publicKeys.id' - field: 'attestation_authority_note.public_keys.id' - - api_field: 'userOwnedGrafeasNote.publicKeys.pkixPublicKey.publicKeyPem' - field: 'attestation_authority_note.public_keys.pkix_public_key.public_key_pem' - - api_field: 'userOwnedGrafeasNote.publicKeys.pkixPublicKey.signatureAlgorithm' - field: 'attestation_authority_note.public_keys.pkix_public_key.signature_algorithm' - - api_field: 'description' - - api_field: 'name' + - api_field: userOwnedGrafeasNote.delegationServiceAccountEmail + field: attestation_authority_note.delegation_service_account_email + - api_field: userOwnedGrafeasNote.noteReference + field: attestation_authority_note.note_reference + - api_field: userOwnedGrafeasNote.publicKeys.asciiArmoredPgpPublicKey + field: attestation_authority_note.public_keys.ascii_armored_pgp_public_key + - api_field: userOwnedGrafeasNote.publicKeys.comment + field: attestation_authority_note.public_keys.comment + - api_field: userOwnedGrafeasNote.publicKeys.id + field: attestation_authority_note.public_keys.id + - api_field: userOwnedGrafeasNote.publicKeys.pkixPublicKey.publicKeyPem + field: attestation_authority_note.public_keys.pkix_public_key.public_key_pem + - api_field: userOwnedGrafeasNote.publicKeys.pkixPublicKey.signatureAlgorithm + field: attestation_authority_note.public_keys.pkix_public_key.signature_algorithm + - api_field: description + - api_field: name diff --git a/google/services/binaryauthorization/resource_binary_authorization_policy_generated_meta.yaml b/google/services/binaryauthorization/resource_binary_authorization_policy_generated_meta.yaml index 67defcb67f6..90500a57e39 100644 --- a/google/services/binaryauthorization/resource_binary_authorization_policy_generated_meta.yaml +++ b/google/services/binaryauthorization/resource_binary_authorization_policy_generated_meta.yaml @@ -1,17 +1,22 @@ -resource: 'google_binary_authorization_policy' -generation_type: 'mmv1' -source_file: 'products/binaryauthorization/Policy.yaml' -api_service_name: 'binaryauthorization.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Policy' -cai_asset_name_format: '//binaryauthorization.googleapis.com/projects/{{project}}/policy' +resource: google_binary_authorization_policy +generation_type: mmv1 +source_file: products/binaryauthorization/Policy.yaml +api_service_name: binaryauthorization.googleapis.com +api_version: v1 +api_resource_type_kind: Policy +cai_asset_name_format: //binaryauthorization.googleapis.com/projects/{{project}}/policy fields: - - api_field: 'admissionWhitelistPatterns.namePattern' - - api_field: 'clusterAdmissionRules.clusterAdmissionRule.enforcementMode' - - api_field: 'clusterAdmissionRules.clusterAdmissionRule.evaluationMode' - - api_field: 'clusterAdmissionRules.clusterAdmissionRule.requireAttestationsBy' - - api_field: 'defaultAdmissionRule.enforcementMode' - - api_field: 'defaultAdmissionRule.evaluationMode' - - api_field: 'defaultAdmissionRule.requireAttestationsBy' - - api_field: 'description' - - api_field: 'globalPolicyEvaluationMode' + - api_field: admissionWhitelistPatterns.namePattern + - api_field: clusterAdmissionRules.key + field: cluster_admission_rules.cluster + - api_field: clusterAdmissionRules.value.enforcementMode + field: cluster_admission_rules.enforcement_mode + - api_field: clusterAdmissionRules.value.evaluationMode + field: cluster_admission_rules.evaluation_mode + - api_field: clusterAdmissionRules.value.requireAttestationsBy + field: cluster_admission_rules.require_attestations_by + - api_field: defaultAdmissionRule.enforcementMode + - api_field: defaultAdmissionRule.evaluationMode + - api_field: defaultAdmissionRule.requireAttestationsBy + - api_field: description + - api_field: globalPolicyEvaluationMode diff --git a/google/services/blockchainnodeengine/resource_blockchain_node_engine_blockchain_nodes_generated_meta.yaml b/google/services/blockchainnodeengine/resource_blockchain_node_engine_blockchain_nodes_generated_meta.yaml index 9c675857da2..291283aa7db 100644 --- a/google/services/blockchainnodeengine/resource_blockchain_node_engine_blockchain_nodes_generated_meta.yaml +++ b/google/services/blockchainnodeengine/resource_blockchain_node_engine_blockchain_nodes_generated_meta.yaml @@ -1,34 +1,34 @@ -resource: 'google_blockchain_node_engine_blockchain_nodes' -generation_type: 'mmv1' -source_file: 'products/blockchainnodeengine/BlockchainNodes.yaml' -api_service_name: 'blockchainnodeengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BlockchainNode' +resource: google_blockchain_node_engine_blockchain_nodes +generation_type: mmv1 +source_file: products/blockchainnodeengine/BlockchainNodes.yaml +api_service_name: blockchainnodeengine.googleapis.com +api_version: v1 +api_resource_type_kind: BlockchainNode fields: - - field: 'blockchain_node_id' - provider_only: true - - api_field: 'blockchainType' - - api_field: 'connectionInfo.endpointInfo.jsonRpcApiEndpoint' - - api_field: 'connectionInfo.endpointInfo.websocketsApiEndpoint' - - api_field: 'connectionInfo.serviceAttachment' - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'ethereumDetails.additionalEndpoints.beaconApiEndpoint' - - api_field: 'ethereumDetails.additionalEndpoints.beaconPrometheusMetricsApiEndpoint' - - api_field: 'ethereumDetails.additionalEndpoints.executionClientPrometheusMetricsApiEndpoint' - - api_field: 'ethereumDetails.apiEnableAdmin' - - api_field: 'ethereumDetails.apiEnableDebug' - - api_field: 'ethereumDetails.consensusClient' - - api_field: 'ethereumDetails.executionClient' - - api_field: 'ethereumDetails.gethDetails.garbageCollectionMode' - - api_field: 'ethereumDetails.network' - - api_field: 'ethereumDetails.nodeType' - - api_field: 'ethereumDetails.validatorConfig.mevRelayUrls' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: blockchain_node_id + provider_only: true + - api_field: blockchainType + - api_field: connectionInfo.endpointInfo.jsonRpcApiEndpoint + - api_field: connectionInfo.endpointInfo.websocketsApiEndpoint + - api_field: connectionInfo.serviceAttachment + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: ethereumDetails.additionalEndpoints.beaconApiEndpoint + - api_field: ethereumDetails.additionalEndpoints.beaconPrometheusMetricsApiEndpoint + - api_field: ethereumDetails.additionalEndpoints.executionClientPrometheusMetricsApiEndpoint + - api_field: ethereumDetails.apiEnableAdmin + - api_field: ethereumDetails.apiEnableDebug + - api_field: ethereumDetails.consensusClient + - api_field: ethereumDetails.executionClient + - api_field: ethereumDetails.gethDetails.garbageCollectionMode + - api_field: ethereumDetails.network + - api_field: ethereumDetails.nodeType + - api_field: ethereumDetails.validatorConfig.mevRelayUrls + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/certificatemanager/resource_certificate_manager_certificate_generated_meta.yaml b/google/services/certificatemanager/resource_certificate_manager_certificate_generated_meta.yaml index c092214e7d3..d8996ff3a04 100644 --- a/google/services/certificatemanager/resource_certificate_manager_certificate_generated_meta.yaml +++ b/google/services/certificatemanager/resource_certificate_manager_certificate_generated_meta.yaml @@ -1,33 +1,33 @@ -resource: 'google_certificate_manager_certificate' -generation_type: 'mmv1' -source_file: 'products/certificatemanager/Certificate.yaml' -api_service_name: 'certificatemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Certificate' +resource: google_certificate_manager_certificate +generation_type: mmv1 +source_file: products/certificatemanager/Certificate.yaml +api_service_name: certificatemanager.googleapis.com +api_version: v1 +api_resource_type_kind: Certificate fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'managed.authorizationAttemptInfo.details' - - api_field: 'managed.authorizationAttemptInfo.domain' - - api_field: 'managed.authorizationAttemptInfo.failureReason' - - api_field: 'managed.authorizationAttemptInfo.state' - - api_field: 'managed.dnsAuthorizations' - - api_field: 'managed.domains' - - api_field: 'managed.issuanceConfig' - - api_field: 'managed.provisioningIssue.details' - - api_field: 'managed.provisioningIssue.reason' - - api_field: 'managed.state' - - field: 'name' - provider_only: true - - api_field: 'sanDnsnames' - - api_field: 'scope' - - api_field: 'selfManaged.certificatePem' - - api_field: 'selfManaged.pemCertificate' - - api_field: 'selfManaged.pemPrivateKey' - - api_field: 'selfManaged.privateKeyPem' - - field: 'terraform_labels' - provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: managed.authorizationAttemptInfo.details + - api_field: managed.authorizationAttemptInfo.domain + - api_field: managed.authorizationAttemptInfo.failureReason + - api_field: managed.authorizationAttemptInfo.state + - api_field: managed.dnsAuthorizations + - api_field: managed.domains + - api_field: managed.issuanceConfig + - api_field: managed.provisioningIssue.details + - api_field: managed.provisioningIssue.reason + - api_field: managed.state + - field: name + provider_only: true + - api_field: sanDnsnames + - api_field: scope + - api_field: selfManaged.certificatePem + - api_field: selfManaged.pemCertificate + - api_field: selfManaged.pemPrivateKey + - api_field: selfManaged.privateKeyPem + - field: terraform_labels + provider_only: true diff --git a/google/services/certificatemanager/resource_certificate_manager_certificate_issuance_config_generated_meta.yaml b/google/services/certificatemanager/resource_certificate_manager_certificate_issuance_config_generated_meta.yaml index 0fb276aba3f..f2750c25c8a 100644 --- a/google/services/certificatemanager/resource_certificate_manager_certificate_issuance_config_generated_meta.yaml +++ b/google/services/certificatemanager/resource_certificate_manager_certificate_issuance_config_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_certificate_manager_certificate_issuance_config' -generation_type: 'mmv1' -source_file: 'products/certificatemanager/CertificateIssuanceConfig.yaml' -api_service_name: 'certificatemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CertificateIssuanceConfig' +resource: google_certificate_manager_certificate_issuance_config +generation_type: mmv1 +source_file: products/certificatemanager/CertificateIssuanceConfig.yaml +api_service_name: certificatemanager.googleapis.com +api_version: v1 +api_resource_type_kind: CertificateIssuanceConfig fields: - - api_field: 'certificateAuthorityConfig.certificateAuthorityServiceConfig.caPool' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'keyAlgorithm' - - api_field: 'labels' - - api_field: 'lifetime' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'rotationWindowPercentage' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: certificateAuthorityConfig.certificateAuthorityServiceConfig.caPool + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: keyAlgorithm + - api_field: labels + - api_field: lifetime + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: rotationWindowPercentage + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/certificatemanager/resource_certificate_manager_certificate_map_entry_generated_meta.yaml b/google/services/certificatemanager/resource_certificate_manager_certificate_map_entry_generated_meta.yaml index 334934c3d5c..d4cb6bd27f4 100644 --- a/google/services/certificatemanager/resource_certificate_manager_certificate_map_entry_generated_meta.yaml +++ b/google/services/certificatemanager/resource_certificate_manager_certificate_map_entry_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_certificate_manager_certificate_map_entry' -generation_type: 'mmv1' -source_file: 'products/certificatemanager/CertificateMapEntry.yaml' -api_service_name: 'certificatemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CertificateMapEntry' +resource: google_certificate_manager_certificate_map_entry +generation_type: mmv1 +source_file: products/certificatemanager/CertificateMapEntry.yaml +api_service_name: certificatemanager.googleapis.com +api_version: v1 +api_resource_type_kind: CertificateMapEntry fields: - - api_field: 'certificates' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'hostname' - - api_field: 'labels' - - field: 'map' - provider_only: true - - api_field: 'matcher' - - api_field: 'name' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: certificates + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: hostname + - api_field: labels + - field: map + provider_only: true + - api_field: matcher + - api_field: name + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/certificatemanager/resource_certificate_manager_certificate_map_generated_meta.yaml b/google/services/certificatemanager/resource_certificate_manager_certificate_map_generated_meta.yaml index d82aeb6ce9c..84980db39d5 100644 --- a/google/services/certificatemanager/resource_certificate_manager_certificate_map_generated_meta.yaml +++ b/google/services/certificatemanager/resource_certificate_manager_certificate_map_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_certificate_manager_certificate_map' -generation_type: 'mmv1' -source_file: 'products/certificatemanager/CertificateMap.yaml' -api_service_name: 'certificatemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CertificateMap' +resource: google_certificate_manager_certificate_map +generation_type: mmv1 +source_file: products/certificatemanager/CertificateMap.yaml +api_service_name: certificatemanager.googleapis.com +api_version: v1 +api_resource_type_kind: CertificateMap fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'gclbTargets.ipConfigs.ipAddress' - - api_field: 'gclbTargets.ipConfigs.ports' - - api_field: 'gclbTargets.targetHttpsProxy' - - api_field: 'gclbTargets.targetSslProxy' - - api_field: 'labels' - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: gclbTargets.ipConfigs.ipAddress + - api_field: gclbTargets.ipConfigs.ports + - api_field: gclbTargets.targetHttpsProxy + - api_field: gclbTargets.targetSslProxy + - api_field: labels + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/certificatemanager/resource_certificate_manager_dns_authorization_generated_meta.yaml b/google/services/certificatemanager/resource_certificate_manager_dns_authorization_generated_meta.yaml index 14f4181075c..5ba476f205a 100644 --- a/google/services/certificatemanager/resource_certificate_manager_dns_authorization_generated_meta.yaml +++ b/google/services/certificatemanager/resource_certificate_manager_dns_authorization_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_certificate_manager_dns_authorization' -generation_type: 'mmv1' -source_file: 'products/certificatemanager/DnsAuthorization.yaml' -api_service_name: 'certificatemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DnsAuthorization' +resource: google_certificate_manager_dns_authorization +generation_type: mmv1 +source_file: products/certificatemanager/DnsAuthorization.yaml +api_service_name: certificatemanager.googleapis.com +api_version: v1 +api_resource_type_kind: DnsAuthorization fields: - - api_field: 'description' - - api_field: 'dnsResourceRecord.data' - - api_field: 'dnsResourceRecord.name' - - api_field: 'dnsResourceRecord.type' - - api_field: 'domain' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' + - api_field: description + - api_field: dnsResourceRecord.data + - api_field: dnsResourceRecord.name + - api_field: dnsResourceRecord.type + - api_field: domain + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: type diff --git a/google/services/certificatemanager/resource_certificate_manager_trust_config_generated_meta.yaml b/google/services/certificatemanager/resource_certificate_manager_trust_config_generated_meta.yaml index 7e73614cbed..1ca9dcef718 100644 --- a/google/services/certificatemanager/resource_certificate_manager_trust_config_generated_meta.yaml +++ b/google/services/certificatemanager/resource_certificate_manager_trust_config_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_certificate_manager_trust_config' -generation_type: 'mmv1' -source_file: 'products/certificatemanager/TrustConfig.yaml' -api_service_name: 'certificatemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TrustConfig' +resource: google_certificate_manager_trust_config +generation_type: mmv1 +source_file: products/certificatemanager/TrustConfig.yaml +api_service_name: certificatemanager.googleapis.com +api_version: v1 +api_resource_type_kind: TrustConfig fields: - - api_field: 'allowlistedCertificates.pemCertificate' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'trustStores.intermediateCas.pemCertificate' - - api_field: 'trustStores.trustAnchors.pemCertificate' - - api_field: 'updateTime' + - api_field: allowlistedCertificates.pemCertificate + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: trustStores.intermediateCas.pemCertificate + - api_field: trustStores.trustAnchors.pemCertificate + - api_field: updateTime diff --git a/google/services/ces/resource_ces_agent_generated_meta.yaml b/google/services/ces/resource_ces_agent_generated_meta.yaml index e5074159ec0..343ac9e8f7e 100644 --- a/google/services/ces/resource_ces_agent_generated_meta.yaml +++ b/google/services/ces/resource_ces_agent_generated_meta.yaml @@ -1,52 +1,52 @@ -resource: 'google_ces_agent' -generation_type: 'mmv1' -source_file: 'products/ces/Agent.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Agent' +resource: google_ces_agent +generation_type: mmv1 +source_file: products/ces/Agent.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: Agent fields: - - api_field: 'afterAgentCallbacks.description' - - api_field: 'afterAgentCallbacks.disabled' - - api_field: 'afterAgentCallbacks.pythonCode' - - api_field: 'afterModelCallbacks.description' - - api_field: 'afterModelCallbacks.disabled' - - api_field: 'afterModelCallbacks.pythonCode' - - api_field: 'afterToolCallbacks.description' - - api_field: 'afterToolCallbacks.disabled' - - api_field: 'afterToolCallbacks.pythonCode' - - field: 'agent_id' - provider_only: true - - field: 'app' - provider_only: true - - api_field: 'beforeAgentCallbacks.description' - - api_field: 'beforeAgentCallbacks.disabled' - - api_field: 'beforeAgentCallbacks.pythonCode' - - api_field: 'beforeModelCallbacks.description' - - api_field: 'beforeModelCallbacks.disabled' - - api_field: 'beforeModelCallbacks.pythonCode' - - api_field: 'beforeToolCallbacks.description' - - api_field: 'beforeToolCallbacks.disabled' - - api_field: 'beforeToolCallbacks.pythonCode' - - api_field: 'childAgents' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'etag' - - api_field: 'generatedSummary' - - api_field: 'guardrails' - - api_field: 'instruction' - - api_field: 'llmAgent' - - field: 'location' - provider_only: true - - api_field: 'modelSettings.model' - - api_field: 'modelSettings.temperature' - - api_field: 'name' - - api_field: 'remoteDialogflowAgent.agent' - - api_field: 'remoteDialogflowAgent.environmentId' - - api_field: 'remoteDialogflowAgent.flowId' - - api_field: 'remoteDialogflowAgent.inputVariableMapping' - - api_field: 'remoteDialogflowAgent.outputVariableMapping' - - api_field: 'tools' - - api_field: 'toolsets.toolIds' - - api_field: 'toolsets.toolset' - - api_field: 'updateTime' + - api_field: afterAgentCallbacks.description + - api_field: afterAgentCallbacks.disabled + - api_field: afterAgentCallbacks.pythonCode + - api_field: afterModelCallbacks.description + - api_field: afterModelCallbacks.disabled + - api_field: afterModelCallbacks.pythonCode + - api_field: afterToolCallbacks.description + - api_field: afterToolCallbacks.disabled + - api_field: afterToolCallbacks.pythonCode + - field: agent_id + provider_only: true + - field: app + provider_only: true + - api_field: beforeAgentCallbacks.description + - api_field: beforeAgentCallbacks.disabled + - api_field: beforeAgentCallbacks.pythonCode + - api_field: beforeModelCallbacks.description + - api_field: beforeModelCallbacks.disabled + - api_field: beforeModelCallbacks.pythonCode + - api_field: beforeToolCallbacks.description + - api_field: beforeToolCallbacks.disabled + - api_field: beforeToolCallbacks.pythonCode + - api_field: childAgents + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: etag + - api_field: generatedSummary + - api_field: guardrails + - api_field: instruction + - api_field: llmAgent + - field: location + provider_only: true + - api_field: modelSettings.model + - api_field: modelSettings.temperature + - api_field: name + - api_field: remoteDialogflowAgent.agent + - api_field: remoteDialogflowAgent.environmentId + - api_field: remoteDialogflowAgent.flowId + - api_field: remoteDialogflowAgent.inputVariableMapping + - api_field: remoteDialogflowAgent.outputVariableMapping + - api_field: tools + - api_field: toolsets.toolIds + - api_field: toolsets.toolset + - api_field: updateTime diff --git a/google/services/ces/resource_ces_app_generated_meta.yaml b/google/services/ces/resource_ces_app_generated_meta.yaml index 57175b359ec..91c2e7fe301 100644 --- a/google/services/ces/resource_ces_app_generated_meta.yaml +++ b/google/services/ces/resource_ces_app_generated_meta.yaml @@ -1,87 +1,91 @@ -resource: 'google_ces_app' -generation_type: 'mmv1' -source_file: 'products/ces/App.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'App' +resource: google_ces_app +generation_type: mmv1 +source_file: products/ces/App.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: App autogen_status: true fields: - - field: 'app_id' - provider_only: true - - api_field: 'audioProcessingConfig.ambientSoundConfig.gcsUri' - - api_field: 'audioProcessingConfig.ambientSoundConfig.prebuiltAmbientSound' - - api_field: 'audioProcessingConfig.ambientSoundConfig.volumeGainDb' - - api_field: 'audioProcessingConfig.bargeInConfig.bargeInAwareness' - - api_field: 'audioProcessingConfig.inactivityTimeout' - - api_field: 'audioProcessingConfig.synthesizeSpeechConfigs.SynthesizeSpeechConfig.speakingRate' - - api_field: 'audioProcessingConfig.synthesizeSpeechConfigs.SynthesizeSpeechConfig.voice' - - api_field: 'clientCertificateSettings.passphrase' - - api_field: 'clientCertificateSettings.privateKey' - - api_field: 'clientCertificateSettings.tlsCertificate' - - api_field: 'createTime' - - api_field: 'dataStoreSettings.engines.name' - - api_field: 'dataStoreSettings.engines.type' - - api_field: 'defaultChannelProfile.channelType' - - api_field: 'defaultChannelProfile.disableBargeInControl' - - api_field: 'defaultChannelProfile.disableDtmf' - - api_field: 'defaultChannelProfile.personaProperty.persona' - - api_field: 'defaultChannelProfile.profileId' - - api_field: 'defaultChannelProfile.webWidgetConfig.modality' - - api_field: 'defaultChannelProfile.webWidgetConfig.theme' - - api_field: 'defaultChannelProfile.webWidgetConfig.webWidgetTitle' - - api_field: 'deploymentCount' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'etag' - - api_field: 'evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.expectationLevelMetricsThresholds.toolInvocationParameterCorrectnessThreshold' - - api_field: 'evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.overallToolInvocationCorrectnessThreshold' - - api_field: 'evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.semanticSimilaritySuccessThreshold' - - api_field: 'globalInstruction' - - api_field: 'guardrails' - - api_field: 'languageSettings.defaultLanguageCode' - - api_field: 'languageSettings.enableMultilingualSupport' - - api_field: 'languageSettings.fallbackAction' - - api_field: 'languageSettings.supportedLanguageCodes' - - field: 'location' - provider_only: true - - api_field: 'loggingSettings.audioRecordingConfig.gcsBucket' - - api_field: 'loggingSettings.audioRecordingConfig.gcsPathPrefix' - - api_field: 'loggingSettings.bigqueryExportSettings.dataset' - - api_field: 'loggingSettings.bigqueryExportSettings.enabled' - - api_field: 'loggingSettings.bigqueryExportSettings.project' - - api_field: 'loggingSettings.cloudLoggingSettings.enableCloudLogging' - - api_field: 'loggingSettings.conversationLoggingSettings.disableConversationLogging' - - api_field: 'loggingSettings.redactionConfig.deidentifyTemplate' - - api_field: 'loggingSettings.redactionConfig.enableRedaction' - - api_field: 'loggingSettings.redactionConfig.inspectTemplate' - - api_field: 'metadata' - - api_field: 'modelSettings.model' - - api_field: 'modelSettings.temperature' - - api_field: 'name' - - api_field: 'pinned' - - api_field: 'rootAgent' - - api_field: 'timeZoneSettings.timeZone' - - api_field: 'updateTime' - - api_field: 'variableDeclarations.description' - - api_field: 'variableDeclarations.name' - - api_field: 'variableDeclarations.schema.additionalProperties' - json: true - - api_field: 'variableDeclarations.schema.anyOf' - json: true - - api_field: 'variableDeclarations.schema.default' - - api_field: 'variableDeclarations.schema.defs' - json: true - - api_field: 'variableDeclarations.schema.description' - - api_field: 'variableDeclarations.schema.enum' - - api_field: 'variableDeclarations.schema.items' - json: true - - api_field: 'variableDeclarations.schema.nullable' - - api_field: 'variableDeclarations.schema.prefixItems' - json: true - - api_field: 'variableDeclarations.schema.properties' - json: true - - api_field: 'variableDeclarations.schema.ref' - - api_field: 'variableDeclarations.schema.required' - - api_field: 'variableDeclarations.schema.title' - - api_field: 'variableDeclarations.schema.type' - - api_field: 'variableDeclarations.schema.uniqueItems' + - field: app_id + provider_only: true + - api_field: audioProcessingConfig.ambientSoundConfig.gcsUri + - api_field: audioProcessingConfig.ambientSoundConfig.prebuiltAmbientSound + - api_field: audioProcessingConfig.ambientSoundConfig.volumeGainDb + - api_field: audioProcessingConfig.bargeInConfig.bargeInAwareness + - api_field: audioProcessingConfig.inactivityTimeout + - api_field: audioProcessingConfig.synthesizeSpeechConfigs.key + field: audio_processing_config.synthesize_speech_configs.language_code + - api_field: audioProcessingConfig.synthesizeSpeechConfigs.value.speakingRate + field: audio_processing_config.synthesize_speech_configs.speaking_rate + - api_field: audioProcessingConfig.synthesizeSpeechConfigs.value.voice + field: audio_processing_config.synthesize_speech_configs.voice + - api_field: clientCertificateSettings.passphrase + - api_field: clientCertificateSettings.privateKey + - api_field: clientCertificateSettings.tlsCertificate + - api_field: createTime + - api_field: dataStoreSettings.engines.name + - api_field: dataStoreSettings.engines.type + - api_field: defaultChannelProfile.channelType + - api_field: defaultChannelProfile.disableBargeInControl + - api_field: defaultChannelProfile.disableDtmf + - api_field: defaultChannelProfile.personaProperty.persona + - api_field: defaultChannelProfile.profileId + - api_field: defaultChannelProfile.webWidgetConfig.modality + - api_field: defaultChannelProfile.webWidgetConfig.theme + - api_field: defaultChannelProfile.webWidgetConfig.webWidgetTitle + - api_field: deploymentCount + - api_field: description + - api_field: displayName + - api_field: etag + - api_field: evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.expectationLevelMetricsThresholds.toolInvocationParameterCorrectnessThreshold + - api_field: evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.overallToolInvocationCorrectnessThreshold + - api_field: evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.semanticSimilaritySuccessThreshold + - api_field: globalInstruction + - api_field: guardrails + - api_field: languageSettings.defaultLanguageCode + - api_field: languageSettings.enableMultilingualSupport + - api_field: languageSettings.fallbackAction + - api_field: languageSettings.supportedLanguageCodes + - field: location + provider_only: true + - api_field: loggingSettings.audioRecordingConfig.gcsBucket + - api_field: loggingSettings.audioRecordingConfig.gcsPathPrefix + - api_field: loggingSettings.bigqueryExportSettings.dataset + - api_field: loggingSettings.bigqueryExportSettings.enabled + - api_field: loggingSettings.bigqueryExportSettings.project + - api_field: loggingSettings.cloudLoggingSettings.enableCloudLogging + - api_field: loggingSettings.conversationLoggingSettings.disableConversationLogging + - api_field: loggingSettings.redactionConfig.deidentifyTemplate + - api_field: loggingSettings.redactionConfig.enableRedaction + - api_field: loggingSettings.redactionConfig.inspectTemplate + - api_field: metadata + - api_field: modelSettings.model + - api_field: modelSettings.temperature + - api_field: name + - api_field: pinned + - api_field: rootAgent + - api_field: timeZoneSettings.timeZone + - api_field: updateTime + - api_field: variableDeclarations.description + - api_field: variableDeclarations.name + - api_field: variableDeclarations.schema.additionalProperties + json: true + - api_field: variableDeclarations.schema.anyOf + json: true + - api_field: variableDeclarations.schema.default + - api_field: variableDeclarations.schema.defs + json: true + - api_field: variableDeclarations.schema.description + - api_field: variableDeclarations.schema.enum + - api_field: variableDeclarations.schema.items + json: true + - api_field: variableDeclarations.schema.nullable + - api_field: variableDeclarations.schema.prefixItems + json: true + - api_field: variableDeclarations.schema.properties + json: true + - api_field: variableDeclarations.schema.ref + - api_field: variableDeclarations.schema.required + - api_field: variableDeclarations.schema.title + - api_field: variableDeclarations.schema.type + - api_field: variableDeclarations.schema.uniqueItems diff --git a/google/services/ces/resource_ces_app_version_generated_meta.yaml b/google/services/ces/resource_ces_app_version_generated_meta.yaml index 0713630a9af..1aed3c63c96 100644 --- a/google/services/ces/resource_ces_app_version_generated_meta.yaml +++ b/google/services/ces/resource_ces_app_version_generated_meta.yaml @@ -1,337 +1,341 @@ -resource: 'google_ces_app_version' -generation_type: 'mmv1' -source_file: 'products/ces/AppVersion.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AppVersion' +resource: google_ces_app_version +generation_type: mmv1 +source_file: products/ces/AppVersion.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: AppVersion autogen_status: true fields: - - field: 'app' - provider_only: true - - field: 'app_version_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'creator' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'snapshot.agents.afterAgentCallbacks.description' - - api_field: 'snapshot.agents.afterAgentCallbacks.disabled' - - api_field: 'snapshot.agents.afterAgentCallbacks.pythonCode' - - api_field: 'snapshot.agents.afterModelCallbacks.description' - - api_field: 'snapshot.agents.afterModelCallbacks.disabled' - - api_field: 'snapshot.agents.afterModelCallbacks.pythonCode' - - api_field: 'snapshot.agents.afterToolCallbacks.description' - - api_field: 'snapshot.agents.afterToolCallbacks.disabled' - - api_field: 'snapshot.agents.afterToolCallbacks.pythonCode' - - api_field: 'snapshot.agents.beforeAgentCallbacks.description' - - api_field: 'snapshot.agents.beforeAgentCallbacks.disabled' - - api_field: 'snapshot.agents.beforeAgentCallbacks.pythonCode' - - api_field: 'snapshot.agents.beforeModelCallbacks.description' - - api_field: 'snapshot.agents.beforeModelCallbacks.disabled' - - api_field: 'snapshot.agents.beforeModelCallbacks.pythonCode' - - api_field: 'snapshot.agents.beforeToolCallbacks.description' - - api_field: 'snapshot.agents.beforeToolCallbacks.disabled' - - api_field: 'snapshot.agents.beforeToolCallbacks.pythonCode' - - api_field: 'snapshot.agents.childAgents' - - api_field: 'snapshot.agents.createTime' - - api_field: 'snapshot.agents.description' - - api_field: 'snapshot.agents.displayName' - - api_field: 'snapshot.agents.etag' - - api_field: 'snapshot.agents.generatedSummary' - - api_field: 'snapshot.agents.guardrails' - - api_field: 'snapshot.agents.instruction' - - api_field: 'snapshot.agents.llmAgent' - - api_field: 'snapshot.agents.modelSettings.model' - - api_field: 'snapshot.agents.modelSettings.temperature' - - api_field: 'snapshot.agents.name' - - api_field: 'snapshot.agents.remoteDialogflowAgent.agent' - - api_field: 'snapshot.agents.remoteDialogflowAgent.environmentId' - - api_field: 'snapshot.agents.remoteDialogflowAgent.flowId' - - api_field: 'snapshot.agents.remoteDialogflowAgent.inputVariableMapping' - - api_field: 'snapshot.agents.remoteDialogflowAgent.outputVariableMapping' - - api_field: 'snapshot.agents.tools' - - api_field: 'snapshot.agents.toolsets.toolIds' - - api_field: 'snapshot.agents.toolsets.toolset' - - api_field: 'snapshot.agents.updateTime' - - api_field: 'snapshot.app.audioProcessingConfig.ambientSoundConfig.gcsUri' - - api_field: 'snapshot.app.audioProcessingConfig.ambientSoundConfig.prebuiltAmbientSound' - - api_field: 'snapshot.app.audioProcessingConfig.ambientSoundConfig.volumeGainDb' - - api_field: 'snapshot.app.audioProcessingConfig.bargeInConfig.bargeInAwareness' - - api_field: 'snapshot.app.audioProcessingConfig.inactivityTimeout' - - api_field: 'snapshot.app.audioProcessingConfig.synthesizeSpeechConfigs.SynthesizeSpeechConfig.speakingRate' - - api_field: 'snapshot.app.audioProcessingConfig.synthesizeSpeechConfigs.SynthesizeSpeechConfig.voice' - - api_field: 'snapshot.app.clientCertificateSettings.passphrase' - - api_field: 'snapshot.app.clientCertificateSettings.privateKey' - - api_field: 'snapshot.app.clientCertificateSettings.tlsCertificate' - - api_field: 'snapshot.app.createTime' - - api_field: 'snapshot.app.dataStoreSettings.engines.name' - - api_field: 'snapshot.app.dataStoreSettings.engines.type' - - api_field: 'snapshot.app.defaultChannelProfile.channelType' - - api_field: 'snapshot.app.defaultChannelProfile.disableBargeInControl' - - api_field: 'snapshot.app.defaultChannelProfile.disableDtmf' - - api_field: 'snapshot.app.defaultChannelProfile.personaProperty.persona' - - api_field: 'snapshot.app.defaultChannelProfile.profileId' - - api_field: 'snapshot.app.defaultChannelProfile.webWidgetConfig.modality' - - api_field: 'snapshot.app.defaultChannelProfile.webWidgetConfig.theme' - - api_field: 'snapshot.app.defaultChannelProfile.webWidgetConfig.webWidgetTitle' - - api_field: 'snapshot.app.deploymentCount' - - api_field: 'snapshot.app.description' - - api_field: 'snapshot.app.displayName' - - api_field: 'snapshot.app.etag' - - api_field: 'snapshot.app.evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.expectationLevelMetricsThresholds.toolInvocationParameterCorrectnessThreshold' - - api_field: 'snapshot.app.evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.overallToolInvocationCorrectnessThreshold' - - api_field: 'snapshot.app.evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.semanticSimilaritySuccessThreshold' - - api_field: 'snapshot.app.globalInstruction' - - api_field: 'snapshot.app.guardrails' - - api_field: 'snapshot.app.languageSettings.defaultLanguageCode' - - api_field: 'snapshot.app.languageSettings.enableMultilingualSupport' - - api_field: 'snapshot.app.languageSettings.fallbackAction' - - api_field: 'snapshot.app.languageSettings.supportedLanguageCodes' - - api_field: 'snapshot.app.loggingSettings.audioRecordingConfig.gcsBucket' - - api_field: 'snapshot.app.loggingSettings.audioRecordingConfig.gcsPathPrefix' - - api_field: 'snapshot.app.loggingSettings.bigqueryExportSettings.dataset' - - api_field: 'snapshot.app.loggingSettings.bigqueryExportSettings.enabled' - - api_field: 'snapshot.app.loggingSettings.bigqueryExportSettings.project' - - api_field: 'snapshot.app.loggingSettings.cloudLoggingSettings.enableCloudLogging' - - api_field: 'snapshot.app.loggingSettings.conversationLoggingSettings.disableConversationLogging' - - api_field: 'snapshot.app.loggingSettings.redactionConfig.deidentifyTemplate' - - api_field: 'snapshot.app.loggingSettings.redactionConfig.enableRedaction' - - api_field: 'snapshot.app.loggingSettings.redactionConfig.inspectTemplate' - - api_field: 'snapshot.app.metadata' - - api_field: 'snapshot.app.modelSettings.model' - - api_field: 'snapshot.app.modelSettings.temperature' - - api_field: 'snapshot.app.name' - - api_field: 'snapshot.app.rootAgent' - - api_field: 'snapshot.app.timeZoneSettings.timeZone' - - api_field: 'snapshot.app.updateTime' - - api_field: 'snapshot.app.variableDeclarations.description' - - api_field: 'snapshot.app.variableDeclarations.name' - - api_field: 'snapshot.app.variableDeclarations.schema.additionalProperties' - json: true - - api_field: 'snapshot.app.variableDeclarations.schema.anyOf' - json: true - - api_field: 'snapshot.app.variableDeclarations.schema.default' - - api_field: 'snapshot.app.variableDeclarations.schema.defs' - json: true - - api_field: 'snapshot.app.variableDeclarations.schema.description' - - api_field: 'snapshot.app.variableDeclarations.schema.enum' - - api_field: 'snapshot.app.variableDeclarations.schema.items' - json: true - - api_field: 'snapshot.app.variableDeclarations.schema.nullable' - - api_field: 'snapshot.app.variableDeclarations.schema.prefixItems' - json: true - - api_field: 'snapshot.app.variableDeclarations.schema.properties' - json: true - - api_field: 'snapshot.app.variableDeclarations.schema.ref' - - api_field: 'snapshot.app.variableDeclarations.schema.required' - - api_field: 'snapshot.app.variableDeclarations.schema.type' - - api_field: 'snapshot.app.variableDeclarations.schema.uniqueItems' - - api_field: 'snapshot.examples.createTime' - - api_field: 'snapshot.examples.description' - - api_field: 'snapshot.examples.displayName' - - api_field: 'snapshot.examples.entryAgent' - - api_field: 'snapshot.examples.etag' - - api_field: 'snapshot.examples.invalid' - - api_field: 'snapshot.examples.messages.chunks.agentTransfer.displayName' - - api_field: 'snapshot.examples.messages.chunks.agentTransfer.targetAgent' - - api_field: 'snapshot.examples.messages.chunks.image.data' - - api_field: 'snapshot.examples.messages.chunks.image.mimeType' - - api_field: 'snapshot.examples.messages.chunks.text' - - api_field: 'snapshot.examples.messages.chunks.toolCall.args' - json: true - - api_field: 'snapshot.examples.messages.chunks.toolCall.displayName' - - api_field: 'snapshot.examples.messages.chunks.toolCall.id' - - api_field: 'snapshot.examples.messages.chunks.toolCall.tool' - - api_field: 'snapshot.examples.messages.chunks.toolCall.toolsetTool.toolId' - - api_field: 'snapshot.examples.messages.chunks.toolCall.toolsetTool.toolset' - - api_field: 'snapshot.examples.messages.chunks.toolResponse.displayName' - - api_field: 'snapshot.examples.messages.chunks.toolResponse.id' - - api_field: 'snapshot.examples.messages.chunks.toolResponse.response' - json: true - - api_field: 'snapshot.examples.messages.chunks.toolResponse.tool' - - api_field: 'snapshot.examples.messages.chunks.toolResponse.toolsetTool.toolId' - - api_field: 'snapshot.examples.messages.chunks.toolResponse.toolsetTool.toolset' - - api_field: 'snapshot.examples.messages.chunks.updatedVariables' - json: true - - api_field: 'snapshot.examples.messages.role' - - api_field: 'snapshot.examples.name' - - api_field: 'snapshot.examples.updateTime' - - api_field: 'snapshot.guardrails.action.generativeAnswer.prompt' - - api_field: 'snapshot.guardrails.action.respondImmediately.responses.disabled' - - api_field: 'snapshot.guardrails.action.respondImmediately.responses.text' - - api_field: 'snapshot.guardrails.action.transferAgent.agent' - - api_field: 'snapshot.guardrails.codeCallback.afterAgentCallback.description' - - api_field: 'snapshot.guardrails.codeCallback.afterAgentCallback.disabled' - - api_field: 'snapshot.guardrails.codeCallback.afterAgentCallback.pythonCode' - - api_field: 'snapshot.guardrails.codeCallback.afterModelCallback.description' - - api_field: 'snapshot.guardrails.codeCallback.afterModelCallback.disabled' - - api_field: 'snapshot.guardrails.codeCallback.afterModelCallback.pythonCode' - - api_field: 'snapshot.guardrails.codeCallback.beforeAgentCallback.description' - - api_field: 'snapshot.guardrails.codeCallback.beforeAgentCallback.disabled' - - api_field: 'snapshot.guardrails.codeCallback.beforeAgentCallback.pythonCode' - - api_field: 'snapshot.guardrails.codeCallback.beforeModelCallback.description' - - api_field: 'snapshot.guardrails.codeCallback.beforeModelCallback.disabled' - - api_field: 'snapshot.guardrails.codeCallback.beforeModelCallback.pythonCode' - - api_field: 'snapshot.guardrails.contentFilter.bannedContents' - - api_field: 'snapshot.guardrails.contentFilter.bannedContentsInAgentResponse' - - api_field: 'snapshot.guardrails.contentFilter.bannedContentsInUserInput' - - api_field: 'snapshot.guardrails.contentFilter.disregardDiacritics' - - api_field: 'snapshot.guardrails.contentFilter.matchType' - - api_field: 'snapshot.guardrails.createTime' - - api_field: 'snapshot.guardrails.description' - - api_field: 'snapshot.guardrails.displayName' - - api_field: 'snapshot.guardrails.enabled' - - api_field: 'snapshot.guardrails.etag' - - api_field: 'snapshot.guardrails.llmPolicy.failOpen' - - api_field: 'snapshot.guardrails.llmPolicy.maxConversationMessages' - - api_field: 'snapshot.guardrails.llmPolicy.modelSettings.model' - - api_field: 'snapshot.guardrails.llmPolicy.modelSettings.temperature' - - api_field: 'snapshot.guardrails.llmPolicy.policyScope' - - api_field: 'snapshot.guardrails.llmPolicy.prompt' - - api_field: 'snapshot.guardrails.llmPromptSecurity.customPolicy.failOpen' - - api_field: 'snapshot.guardrails.llmPromptSecurity.customPolicy.maxConversationMessages' - - api_field: 'snapshot.guardrails.llmPromptSecurity.customPolicy.modelSettings.model' - - api_field: 'snapshot.guardrails.llmPromptSecurity.customPolicy.modelSettings.temperature' - - api_field: 'snapshot.guardrails.llmPromptSecurity.customPolicy.policyScope' - - api_field: 'snapshot.guardrails.llmPromptSecurity.customPolicy.prompt' - - api_field: 'snapshot.guardrails.llmPromptSecurity.defaultSettings.defaultPromptTemplate' - - api_field: 'snapshot.guardrails.modelSafety.safetySettings.category' - - api_field: 'snapshot.guardrails.modelSafety.safetySettings.threshold' - - api_field: 'snapshot.guardrails.name' - - api_field: 'snapshot.guardrails.updateTime' - - api_field: 'snapshot.tools.clientFunction.description' - - api_field: 'snapshot.tools.clientFunction.name' - - api_field: 'snapshot.tools.clientFunction.parameters.additionalProperties' - json: true - - api_field: 'snapshot.tools.clientFunction.parameters.anyOf' - json: true - - api_field: 'snapshot.tools.clientFunction.parameters.default' - - api_field: 'snapshot.tools.clientFunction.parameters.defs' - json: true - - api_field: 'snapshot.tools.clientFunction.parameters.description' - - api_field: 'snapshot.tools.clientFunction.parameters.enum' - - api_field: 'snapshot.tools.clientFunction.parameters.items' - json: true - - api_field: 'snapshot.tools.clientFunction.parameters.nullable' - - api_field: 'snapshot.tools.clientFunction.parameters.prefixItems' - json: true - - api_field: 'snapshot.tools.clientFunction.parameters.properties' - json: true - - api_field: 'snapshot.tools.clientFunction.parameters.ref' - - api_field: 'snapshot.tools.clientFunction.parameters.required' - - api_field: 'snapshot.tools.clientFunction.parameters.type' - - api_field: 'snapshot.tools.clientFunction.parameters.uniqueItems' - - api_field: 'snapshot.tools.clientFunction.response.additionalProperties' - json: true - - api_field: 'snapshot.tools.clientFunction.response.anyOf' - json: true - - api_field: 'snapshot.tools.clientFunction.response.default' - - api_field: 'snapshot.tools.clientFunction.response.defs' - json: true - - api_field: 'snapshot.tools.clientFunction.response.description' - - api_field: 'snapshot.tools.clientFunction.response.enum' - - api_field: 'snapshot.tools.clientFunction.response.items' - json: true - - api_field: 'snapshot.tools.clientFunction.response.nullable' - - api_field: 'snapshot.tools.clientFunction.response.prefixItems' - json: true - - api_field: 'snapshot.tools.clientFunction.response.properties' - json: true - - api_field: 'snapshot.tools.clientFunction.response.ref' - - api_field: 'snapshot.tools.clientFunction.response.required' - - api_field: 'snapshot.tools.clientFunction.response.type' - - api_field: 'snapshot.tools.clientFunction.response.uniqueItems' - - api_field: 'snapshot.tools.createTime' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.dataStores' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boost' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.attributeType' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.attributeValue' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.boostAmount' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.fieldName' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.interpolationType' - - api_field: 'snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.condition' - - api_field: 'snapshot.tools.dataStoreTool.description' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collection' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collectionDisplayName' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.dataSource' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.createTime' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.displayName' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.documentProcessingMode' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.name' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.type' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.dataStoreSources.filter' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.engine' - - api_field: 'snapshot.tools.dataStoreTool.engineSource.filter' - - api_field: 'snapshot.tools.dataStoreTool.maxResults' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.groundingConfig.disabled' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.groundingConfig.groundingLevel' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.modalityType' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.disabled' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.model' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.temperature' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.prompt' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.disabled' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.model' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.temperature' - - api_field: 'snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.prompt' - - api_field: 'snapshot.tools.dataStoreTool.name' - - api_field: 'snapshot.tools.displayName' - - api_field: 'snapshot.tools.etag' - - api_field: 'snapshot.tools.executionType' - - api_field: 'snapshot.tools.generatedSummary' - - api_field: 'snapshot.tools.googleSearchTool.description' - - api_field: 'snapshot.tools.googleSearchTool.excludeDomains' - - api_field: 'snapshot.tools.googleSearchTool.name' - - api_field: 'snapshot.tools.name' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.apiKeyConfig.apiKeySecretVersion' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.apiKeyConfig.keyName' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.apiKeyConfig.requestLocation' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.oauthConfig.clientId' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.oauthConfig.clientSecretVersion' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.oauthConfig.oauthGrantType' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.oauthConfig.scopes' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.oauthConfig.tokenEndpoint' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.serviceAccountAuthConfig.serviceAccount' - - api_field: 'snapshot.tools.openApiTool.apiAuthentication.serviceAgentIdTokenAuthConfig' - - api_field: 'snapshot.tools.openApiTool.description' - - api_field: 'snapshot.tools.openApiTool.ignoreUnknownFields' - - api_field: 'snapshot.tools.openApiTool.name' - - api_field: 'snapshot.tools.openApiTool.openApiSchema' - - api_field: 'snapshot.tools.openApiTool.serviceDirectoryConfig.service' - - api_field: 'snapshot.tools.openApiTool.tlsConfig.caCerts.cert' - - api_field: 'snapshot.tools.openApiTool.tlsConfig.caCerts.displayName' - - api_field: 'snapshot.tools.openApiTool.url' - - api_field: 'snapshot.tools.pythonFunction.description' - - api_field: 'snapshot.tools.pythonFunction.name' - - api_field: 'snapshot.tools.pythonFunction.pythonCode' - - api_field: 'snapshot.tools.systemTool.description' - - api_field: 'snapshot.tools.systemTool.name' - - api_field: 'snapshot.tools.updateTime' - - api_field: 'snapshot.toolsets.createTime' - - api_field: 'snapshot.toolsets.description' - - api_field: 'snapshot.toolsets.displayName' - - api_field: 'snapshot.toolsets.etag' - - api_field: 'snapshot.toolsets.executionType' - - api_field: 'snapshot.toolsets.name' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.apiKeyConfig.apiKeySecretVersion' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.apiKeyConfig.keyName' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.apiKeyConfig.requestLocation' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.bearerTokenConfig.token' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.clientId' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.clientSecretVersion' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.oauthGrantType' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.scopes' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.tokenEndpoint' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.serviceAccountAuthConfig.serviceAccount' - - api_field: 'snapshot.toolsets.openApiToolset.apiAuthentication.serviceAgentIdTokenAuthConfig' - - api_field: 'snapshot.toolsets.openApiToolset.ignoreUnknownFields' - - api_field: 'snapshot.toolsets.openApiToolset.openApiSchema' - - api_field: 'snapshot.toolsets.openApiToolset.serviceDirectoryConfig.service' - - api_field: 'snapshot.toolsets.openApiToolset.tlsConfig.caCerts.cert' - - api_field: 'snapshot.toolsets.openApiToolset.tlsConfig.caCerts.displayName' - - api_field: 'snapshot.toolsets.openApiToolset.url' - - api_field: 'snapshot.toolsets.updateTime' + - field: app + provider_only: true + - field: app_version_id + provider_only: true + - api_field: createTime + - api_field: creator + - api_field: description + - api_field: displayName + - api_field: etag + - field: location + provider_only: true + - api_field: name + - api_field: snapshot.agents.afterAgentCallbacks.description + - api_field: snapshot.agents.afterAgentCallbacks.disabled + - api_field: snapshot.agents.afterAgentCallbacks.pythonCode + - api_field: snapshot.agents.afterModelCallbacks.description + - api_field: snapshot.agents.afterModelCallbacks.disabled + - api_field: snapshot.agents.afterModelCallbacks.pythonCode + - api_field: snapshot.agents.afterToolCallbacks.description + - api_field: snapshot.agents.afterToolCallbacks.disabled + - api_field: snapshot.agents.afterToolCallbacks.pythonCode + - api_field: snapshot.agents.beforeAgentCallbacks.description + - api_field: snapshot.agents.beforeAgentCallbacks.disabled + - api_field: snapshot.agents.beforeAgentCallbacks.pythonCode + - api_field: snapshot.agents.beforeModelCallbacks.description + - api_field: snapshot.agents.beforeModelCallbacks.disabled + - api_field: snapshot.agents.beforeModelCallbacks.pythonCode + - api_field: snapshot.agents.beforeToolCallbacks.description + - api_field: snapshot.agents.beforeToolCallbacks.disabled + - api_field: snapshot.agents.beforeToolCallbacks.pythonCode + - api_field: snapshot.agents.childAgents + - api_field: snapshot.agents.createTime + - api_field: snapshot.agents.description + - api_field: snapshot.agents.displayName + - api_field: snapshot.agents.etag + - api_field: snapshot.agents.generatedSummary + - api_field: snapshot.agents.guardrails + - api_field: snapshot.agents.instruction + - api_field: snapshot.agents.llmAgent + - api_field: snapshot.agents.modelSettings.model + - api_field: snapshot.agents.modelSettings.temperature + - api_field: snapshot.agents.name + - api_field: snapshot.agents.remoteDialogflowAgent.agent + - api_field: snapshot.agents.remoteDialogflowAgent.environmentId + - api_field: snapshot.agents.remoteDialogflowAgent.flowId + - api_field: snapshot.agents.remoteDialogflowAgent.inputVariableMapping + - api_field: snapshot.agents.remoteDialogflowAgent.outputVariableMapping + - api_field: snapshot.agents.tools + - api_field: snapshot.agents.toolsets.toolIds + - api_field: snapshot.agents.toolsets.toolset + - api_field: snapshot.agents.updateTime + - api_field: snapshot.app.audioProcessingConfig.ambientSoundConfig.gcsUri + - api_field: snapshot.app.audioProcessingConfig.ambientSoundConfig.prebuiltAmbientSound + - api_field: snapshot.app.audioProcessingConfig.ambientSoundConfig.volumeGainDb + - api_field: snapshot.app.audioProcessingConfig.bargeInConfig.bargeInAwareness + - api_field: snapshot.app.audioProcessingConfig.inactivityTimeout + - api_field: snapshot.app.audioProcessingConfig.synthesizeSpeechConfigs.key + field: snapshot.app.audio_processing_config.synthesize_speech_configs.language_code + - api_field: snapshot.app.audioProcessingConfig.synthesizeSpeechConfigs.value.speakingRate + field: snapshot.app.audio_processing_config.synthesize_speech_configs.speaking_rate + - api_field: snapshot.app.audioProcessingConfig.synthesizeSpeechConfigs.value.voice + field: snapshot.app.audio_processing_config.synthesize_speech_configs.voice + - api_field: snapshot.app.clientCertificateSettings.passphrase + - api_field: snapshot.app.clientCertificateSettings.privateKey + - api_field: snapshot.app.clientCertificateSettings.tlsCertificate + - api_field: snapshot.app.createTime + - api_field: snapshot.app.dataStoreSettings.engines.name + - api_field: snapshot.app.dataStoreSettings.engines.type + - api_field: snapshot.app.defaultChannelProfile.channelType + - api_field: snapshot.app.defaultChannelProfile.disableBargeInControl + - api_field: snapshot.app.defaultChannelProfile.disableDtmf + - api_field: snapshot.app.defaultChannelProfile.personaProperty.persona + - api_field: snapshot.app.defaultChannelProfile.profileId + - api_field: snapshot.app.defaultChannelProfile.webWidgetConfig.modality + - api_field: snapshot.app.defaultChannelProfile.webWidgetConfig.theme + - api_field: snapshot.app.defaultChannelProfile.webWidgetConfig.webWidgetTitle + - api_field: snapshot.app.deploymentCount + - api_field: snapshot.app.description + - api_field: snapshot.app.displayName + - api_field: snapshot.app.etag + - api_field: snapshot.app.evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.expectationLevelMetricsThresholds.toolInvocationParameterCorrectnessThreshold + - api_field: snapshot.app.evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.overallToolInvocationCorrectnessThreshold + - api_field: snapshot.app.evaluationMetricsThresholds.goldenEvaluationMetricsThresholds.turnLevelMetricsThresholds.semanticSimilaritySuccessThreshold + - api_field: snapshot.app.globalInstruction + - api_field: snapshot.app.guardrails + - api_field: snapshot.app.languageSettings.defaultLanguageCode + - api_field: snapshot.app.languageSettings.enableMultilingualSupport + - api_field: snapshot.app.languageSettings.fallbackAction + - api_field: snapshot.app.languageSettings.supportedLanguageCodes + - api_field: snapshot.app.loggingSettings.audioRecordingConfig.gcsBucket + - api_field: snapshot.app.loggingSettings.audioRecordingConfig.gcsPathPrefix + - api_field: snapshot.app.loggingSettings.bigqueryExportSettings.dataset + - api_field: snapshot.app.loggingSettings.bigqueryExportSettings.enabled + - api_field: snapshot.app.loggingSettings.bigqueryExportSettings.project + - api_field: snapshot.app.loggingSettings.cloudLoggingSettings.enableCloudLogging + - api_field: snapshot.app.loggingSettings.conversationLoggingSettings.disableConversationLogging + - api_field: snapshot.app.loggingSettings.redactionConfig.deidentifyTemplate + - api_field: snapshot.app.loggingSettings.redactionConfig.enableRedaction + - api_field: snapshot.app.loggingSettings.redactionConfig.inspectTemplate + - api_field: snapshot.app.metadata + - api_field: snapshot.app.modelSettings.model + - api_field: snapshot.app.modelSettings.temperature + - api_field: snapshot.app.name + - api_field: snapshot.app.rootAgent + - api_field: snapshot.app.timeZoneSettings.timeZone + - api_field: snapshot.app.updateTime + - api_field: snapshot.app.variableDeclarations.description + - api_field: snapshot.app.variableDeclarations.name + - api_field: snapshot.app.variableDeclarations.schema.additionalProperties + json: true + - api_field: snapshot.app.variableDeclarations.schema.anyOf + json: true + - api_field: snapshot.app.variableDeclarations.schema.default + - api_field: snapshot.app.variableDeclarations.schema.defs + json: true + - api_field: snapshot.app.variableDeclarations.schema.description + - api_field: snapshot.app.variableDeclarations.schema.enum + - api_field: snapshot.app.variableDeclarations.schema.items + json: true + - api_field: snapshot.app.variableDeclarations.schema.nullable + - api_field: snapshot.app.variableDeclarations.schema.prefixItems + json: true + - api_field: snapshot.app.variableDeclarations.schema.properties + json: true + - api_field: snapshot.app.variableDeclarations.schema.ref + - api_field: snapshot.app.variableDeclarations.schema.required + - api_field: snapshot.app.variableDeclarations.schema.type + - api_field: snapshot.app.variableDeclarations.schema.uniqueItems + - api_field: snapshot.examples.createTime + - api_field: snapshot.examples.description + - api_field: snapshot.examples.displayName + - api_field: snapshot.examples.entryAgent + - api_field: snapshot.examples.etag + - api_field: snapshot.examples.invalid + - api_field: snapshot.examples.messages.chunks.agentTransfer.displayName + - api_field: snapshot.examples.messages.chunks.agentTransfer.targetAgent + - api_field: snapshot.examples.messages.chunks.image.data + - api_field: snapshot.examples.messages.chunks.image.mimeType + - api_field: snapshot.examples.messages.chunks.text + - api_field: snapshot.examples.messages.chunks.toolCall.args + json: true + - api_field: snapshot.examples.messages.chunks.toolCall.displayName + - api_field: snapshot.examples.messages.chunks.toolCall.id + - api_field: snapshot.examples.messages.chunks.toolCall.tool + - api_field: snapshot.examples.messages.chunks.toolCall.toolsetTool.toolId + - api_field: snapshot.examples.messages.chunks.toolCall.toolsetTool.toolset + - api_field: snapshot.examples.messages.chunks.toolResponse.displayName + - api_field: snapshot.examples.messages.chunks.toolResponse.id + - api_field: snapshot.examples.messages.chunks.toolResponse.response + json: true + - api_field: snapshot.examples.messages.chunks.toolResponse.tool + - api_field: snapshot.examples.messages.chunks.toolResponse.toolsetTool.toolId + - api_field: snapshot.examples.messages.chunks.toolResponse.toolsetTool.toolset + - api_field: snapshot.examples.messages.chunks.updatedVariables + json: true + - api_field: snapshot.examples.messages.role + - api_field: snapshot.examples.name + - api_field: snapshot.examples.updateTime + - api_field: snapshot.guardrails.action.generativeAnswer.prompt + - api_field: snapshot.guardrails.action.respondImmediately.responses.disabled + - api_field: snapshot.guardrails.action.respondImmediately.responses.text + - api_field: snapshot.guardrails.action.transferAgent.agent + - api_field: snapshot.guardrails.codeCallback.afterAgentCallback.description + - api_field: snapshot.guardrails.codeCallback.afterAgentCallback.disabled + - api_field: snapshot.guardrails.codeCallback.afterAgentCallback.pythonCode + - api_field: snapshot.guardrails.codeCallback.afterModelCallback.description + - api_field: snapshot.guardrails.codeCallback.afterModelCallback.disabled + - api_field: snapshot.guardrails.codeCallback.afterModelCallback.pythonCode + - api_field: snapshot.guardrails.codeCallback.beforeAgentCallback.description + - api_field: snapshot.guardrails.codeCallback.beforeAgentCallback.disabled + - api_field: snapshot.guardrails.codeCallback.beforeAgentCallback.pythonCode + - api_field: snapshot.guardrails.codeCallback.beforeModelCallback.description + - api_field: snapshot.guardrails.codeCallback.beforeModelCallback.disabled + - api_field: snapshot.guardrails.codeCallback.beforeModelCallback.pythonCode + - api_field: snapshot.guardrails.contentFilter.bannedContents + - api_field: snapshot.guardrails.contentFilter.bannedContentsInAgentResponse + - api_field: snapshot.guardrails.contentFilter.bannedContentsInUserInput + - api_field: snapshot.guardrails.contentFilter.disregardDiacritics + - api_field: snapshot.guardrails.contentFilter.matchType + - api_field: snapshot.guardrails.createTime + - api_field: snapshot.guardrails.description + - api_field: snapshot.guardrails.displayName + - api_field: snapshot.guardrails.enabled + - api_field: snapshot.guardrails.etag + - api_field: snapshot.guardrails.llmPolicy.failOpen + - api_field: snapshot.guardrails.llmPolicy.maxConversationMessages + - api_field: snapshot.guardrails.llmPolicy.modelSettings.model + - api_field: snapshot.guardrails.llmPolicy.modelSettings.temperature + - api_field: snapshot.guardrails.llmPolicy.policyScope + - api_field: snapshot.guardrails.llmPolicy.prompt + - api_field: snapshot.guardrails.llmPromptSecurity.customPolicy.failOpen + - api_field: snapshot.guardrails.llmPromptSecurity.customPolicy.maxConversationMessages + - api_field: snapshot.guardrails.llmPromptSecurity.customPolicy.modelSettings.model + - api_field: snapshot.guardrails.llmPromptSecurity.customPolicy.modelSettings.temperature + - api_field: snapshot.guardrails.llmPromptSecurity.customPolicy.policyScope + - api_field: snapshot.guardrails.llmPromptSecurity.customPolicy.prompt + - api_field: snapshot.guardrails.llmPromptSecurity.defaultSettings.defaultPromptTemplate + - api_field: snapshot.guardrails.modelSafety.safetySettings.category + - api_field: snapshot.guardrails.modelSafety.safetySettings.threshold + - api_field: snapshot.guardrails.name + - api_field: snapshot.guardrails.updateTime + - api_field: snapshot.tools.clientFunction.description + - api_field: snapshot.tools.clientFunction.name + - api_field: snapshot.tools.clientFunction.parameters.additionalProperties + json: true + - api_field: snapshot.tools.clientFunction.parameters.anyOf + json: true + - api_field: snapshot.tools.clientFunction.parameters.default + - api_field: snapshot.tools.clientFunction.parameters.defs + json: true + - api_field: snapshot.tools.clientFunction.parameters.description + - api_field: snapshot.tools.clientFunction.parameters.enum + - api_field: snapshot.tools.clientFunction.parameters.items + json: true + - api_field: snapshot.tools.clientFunction.parameters.nullable + - api_field: snapshot.tools.clientFunction.parameters.prefixItems + json: true + - api_field: snapshot.tools.clientFunction.parameters.properties + json: true + - api_field: snapshot.tools.clientFunction.parameters.ref + - api_field: snapshot.tools.clientFunction.parameters.required + - api_field: snapshot.tools.clientFunction.parameters.type + - api_field: snapshot.tools.clientFunction.parameters.uniqueItems + - api_field: snapshot.tools.clientFunction.response.additionalProperties + json: true + - api_field: snapshot.tools.clientFunction.response.anyOf + json: true + - api_field: snapshot.tools.clientFunction.response.default + - api_field: snapshot.tools.clientFunction.response.defs + json: true + - api_field: snapshot.tools.clientFunction.response.description + - api_field: snapshot.tools.clientFunction.response.enum + - api_field: snapshot.tools.clientFunction.response.items + json: true + - api_field: snapshot.tools.clientFunction.response.nullable + - api_field: snapshot.tools.clientFunction.response.prefixItems + json: true + - api_field: snapshot.tools.clientFunction.response.properties + json: true + - api_field: snapshot.tools.clientFunction.response.ref + - api_field: snapshot.tools.clientFunction.response.required + - api_field: snapshot.tools.clientFunction.response.type + - api_field: snapshot.tools.clientFunction.response.uniqueItems + - api_field: snapshot.tools.createTime + - api_field: snapshot.tools.dataStoreTool.boostSpecs.dataStores + - api_field: snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boost + - api_field: snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.attributeType + - api_field: snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.attributeValue + - api_field: snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.boostAmount + - api_field: snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.fieldName + - api_field: snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.interpolationType + - api_field: snapshot.tools.dataStoreTool.boostSpecs.spec.conditionBoostSpecs.condition + - api_field: snapshot.tools.dataStoreTool.description + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collection + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collectionDisplayName + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.dataSource + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.createTime + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.displayName + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.documentProcessingMode + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.name + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.dataStore.type + - api_field: snapshot.tools.dataStoreTool.engineSource.dataStoreSources.filter + - api_field: snapshot.tools.dataStoreTool.engineSource.engine + - api_field: snapshot.tools.dataStoreTool.engineSource.filter + - api_field: snapshot.tools.dataStoreTool.maxResults + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.groundingConfig.disabled + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.groundingConfig.groundingLevel + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.modalityType + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.disabled + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.model + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.temperature + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.rewriterConfig.prompt + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.disabled + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.model + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.temperature + - api_field: snapshot.tools.dataStoreTool.modalityConfigs.summarizationConfig.prompt + - api_field: snapshot.tools.dataStoreTool.name + - api_field: snapshot.tools.displayName + - api_field: snapshot.tools.etag + - api_field: snapshot.tools.executionType + - api_field: snapshot.tools.generatedSummary + - api_field: snapshot.tools.googleSearchTool.description + - api_field: snapshot.tools.googleSearchTool.excludeDomains + - api_field: snapshot.tools.googleSearchTool.name + - api_field: snapshot.tools.name + - api_field: snapshot.tools.openApiTool.apiAuthentication.apiKeyConfig.apiKeySecretVersion + - api_field: snapshot.tools.openApiTool.apiAuthentication.apiKeyConfig.keyName + - api_field: snapshot.tools.openApiTool.apiAuthentication.apiKeyConfig.requestLocation + - api_field: snapshot.tools.openApiTool.apiAuthentication.oauthConfig.clientId + - api_field: snapshot.tools.openApiTool.apiAuthentication.oauthConfig.clientSecretVersion + - api_field: snapshot.tools.openApiTool.apiAuthentication.oauthConfig.oauthGrantType + - api_field: snapshot.tools.openApiTool.apiAuthentication.oauthConfig.scopes + - api_field: snapshot.tools.openApiTool.apiAuthentication.oauthConfig.tokenEndpoint + - api_field: snapshot.tools.openApiTool.apiAuthentication.serviceAccountAuthConfig.serviceAccount + - api_field: snapshot.tools.openApiTool.apiAuthentication.serviceAgentIdTokenAuthConfig + - api_field: snapshot.tools.openApiTool.description + - api_field: snapshot.tools.openApiTool.ignoreUnknownFields + - api_field: snapshot.tools.openApiTool.name + - api_field: snapshot.tools.openApiTool.openApiSchema + - api_field: snapshot.tools.openApiTool.serviceDirectoryConfig.service + - api_field: snapshot.tools.openApiTool.tlsConfig.caCerts.cert + - api_field: snapshot.tools.openApiTool.tlsConfig.caCerts.displayName + - api_field: snapshot.tools.openApiTool.url + - api_field: snapshot.tools.pythonFunction.description + - api_field: snapshot.tools.pythonFunction.name + - api_field: snapshot.tools.pythonFunction.pythonCode + - api_field: snapshot.tools.systemTool.description + - api_field: snapshot.tools.systemTool.name + - api_field: snapshot.tools.updateTime + - api_field: snapshot.toolsets.createTime + - api_field: snapshot.toolsets.description + - api_field: snapshot.toolsets.displayName + - api_field: snapshot.toolsets.etag + - api_field: snapshot.toolsets.executionType + - api_field: snapshot.toolsets.name + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.apiKeyConfig.apiKeySecretVersion + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.apiKeyConfig.keyName + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.apiKeyConfig.requestLocation + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.bearerTokenConfig.token + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.clientId + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.clientSecretVersion + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.oauthGrantType + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.scopes + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.oauthConfig.tokenEndpoint + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.serviceAccountAuthConfig.serviceAccount + - api_field: snapshot.toolsets.openApiToolset.apiAuthentication.serviceAgentIdTokenAuthConfig + - api_field: snapshot.toolsets.openApiToolset.ignoreUnknownFields + - api_field: snapshot.toolsets.openApiToolset.openApiSchema + - api_field: snapshot.toolsets.openApiToolset.serviceDirectoryConfig.service + - api_field: snapshot.toolsets.openApiToolset.tlsConfig.caCerts.cert + - api_field: snapshot.toolsets.openApiToolset.tlsConfig.caCerts.displayName + - api_field: snapshot.toolsets.openApiToolset.url + - api_field: snapshot.toolsets.updateTime diff --git a/google/services/ces/resource_ces_deployment_generated_meta.yaml b/google/services/ces/resource_ces_deployment_generated_meta.yaml index 102f9088b01..8a24cf5bb82 100644 --- a/google/services/ces/resource_ces_deployment_generated_meta.yaml +++ b/google/services/ces/resource_ces_deployment_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_ces_deployment' -generation_type: 'mmv1' -source_file: 'products/ces/Deployment.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Deployment' +resource: google_ces_deployment +generation_type: mmv1 +source_file: products/ces/Deployment.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: Deployment autogen_status: true fields: - - field: 'app' - provider_only: true - - api_field: 'appVersion' - - api_field: 'channelProfile.channelType' - - api_field: 'channelProfile.disableBargeInControl' - - api_field: 'channelProfile.disableDtmf' - - api_field: 'channelProfile.personaProperty.persona' - - api_field: 'channelProfile.profileId' - - api_field: 'channelProfile.webWidgetConfig.modality' - - api_field: 'channelProfile.webWidgetConfig.theme' - - api_field: 'channelProfile.webWidgetConfig.webWidgetTitle' - - api_field: 'createTime' - - api_field: 'displayName' - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' + - field: app + provider_only: true + - api_field: appVersion + - api_field: channelProfile.channelType + - api_field: channelProfile.disableBargeInControl + - api_field: channelProfile.disableDtmf + - api_field: channelProfile.personaProperty.persona + - api_field: channelProfile.profileId + - api_field: channelProfile.webWidgetConfig.modality + - api_field: channelProfile.webWidgetConfig.theme + - api_field: channelProfile.webWidgetConfig.webWidgetTitle + - api_field: createTime + - api_field: displayName + - api_field: etag + - field: location + provider_only: true + - api_field: name + - api_field: updateTime diff --git a/google/services/ces/resource_ces_example_generated_meta.yaml b/google/services/ces/resource_ces_example_generated_meta.yaml index 20fd5021513..004451390fe 100644 --- a/google/services/ces/resource_ces_example_generated_meta.yaml +++ b/google/services/ces/resource_ces_example_generated_meta.yaml @@ -1,44 +1,44 @@ -resource: 'google_ces_example' -generation_type: 'mmv1' -source_file: 'products/ces/Example.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Example' +resource: google_ces_example +generation_type: mmv1 +source_file: products/ces/Example.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: Example autogen_status: true fields: - - field: 'app' - provider_only: true - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'entryAgent' - - api_field: 'etag' - - field: 'example_id' - provider_only: true - - api_field: 'invalid' - - field: 'location' - provider_only: true - - api_field: 'messages.chunks.agentTransfer.displayName' - - api_field: 'messages.chunks.agentTransfer.targetAgent' - - api_field: 'messages.chunks.image.data' - - api_field: 'messages.chunks.image.mimeType' - - api_field: 'messages.chunks.text' - - api_field: 'messages.chunks.toolCall.args' - json: true - - api_field: 'messages.chunks.toolCall.displayName' - - api_field: 'messages.chunks.toolCall.id' - - api_field: 'messages.chunks.toolCall.tool' - - api_field: 'messages.chunks.toolCall.toolsetTool.toolId' - - api_field: 'messages.chunks.toolCall.toolsetTool.toolset' - - api_field: 'messages.chunks.toolResponse.displayName' - - api_field: 'messages.chunks.toolResponse.id' - - api_field: 'messages.chunks.toolResponse.response' - json: true - - api_field: 'messages.chunks.toolResponse.tool' - - api_field: 'messages.chunks.toolResponse.toolsetTool.toolId' - - api_field: 'messages.chunks.toolResponse.toolsetTool.toolset' - - api_field: 'messages.chunks.updatedVariables' - json: true - - api_field: 'messages.role' - - api_field: 'name' - - api_field: 'updateTime' + - field: app + provider_only: true + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: entryAgent + - api_field: etag + - field: example_id + provider_only: true + - api_field: invalid + - field: location + provider_only: true + - api_field: messages.chunks.agentTransfer.displayName + - api_field: messages.chunks.agentTransfer.targetAgent + - api_field: messages.chunks.image.data + - api_field: messages.chunks.image.mimeType + - api_field: messages.chunks.text + - api_field: messages.chunks.toolCall.args + json: true + - api_field: messages.chunks.toolCall.displayName + - api_field: messages.chunks.toolCall.id + - api_field: messages.chunks.toolCall.tool + - api_field: messages.chunks.toolCall.toolsetTool.toolId + - api_field: messages.chunks.toolCall.toolsetTool.toolset + - api_field: messages.chunks.toolResponse.displayName + - api_field: messages.chunks.toolResponse.id + - api_field: messages.chunks.toolResponse.response + json: true + - api_field: messages.chunks.toolResponse.tool + - api_field: messages.chunks.toolResponse.toolsetTool.toolId + - api_field: messages.chunks.toolResponse.toolsetTool.toolset + - api_field: messages.chunks.updatedVariables + json: true + - api_field: messages.role + - api_field: name + - api_field: updateTime diff --git a/google/services/ces/resource_ces_guardrail_generated_meta.yaml b/google/services/ces/resource_ces_guardrail_generated_meta.yaml index 488f3dd182b..f8c1c6f0ff5 100644 --- a/google/services/ces/resource_ces_guardrail_generated_meta.yaml +++ b/google/services/ces/resource_ces_guardrail_generated_meta.yaml @@ -1,59 +1,59 @@ -resource: 'google_ces_guardrail' -generation_type: 'mmv1' -source_file: 'products/ces/Guardrail.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Guardrail' +resource: google_ces_guardrail +generation_type: mmv1 +source_file: products/ces/Guardrail.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: Guardrail autogen_status: true fields: - - api_field: 'action.generativeAnswer.prompt' - - api_field: 'action.respondImmediately.responses.disabled' - - api_field: 'action.respondImmediately.responses.text' - - api_field: 'action.transferAgent.agent' - - field: 'app' - provider_only: true - - api_field: 'codeCallback.afterAgentCallback.description' - - api_field: 'codeCallback.afterAgentCallback.disabled' - - api_field: 'codeCallback.afterAgentCallback.pythonCode' - - api_field: 'codeCallback.afterModelCallback.description' - - api_field: 'codeCallback.afterModelCallback.disabled' - - api_field: 'codeCallback.afterModelCallback.pythonCode' - - api_field: 'codeCallback.beforeAgentCallback.description' - - api_field: 'codeCallback.beforeAgentCallback.disabled' - - api_field: 'codeCallback.beforeAgentCallback.pythonCode' - - api_field: 'codeCallback.beforeModelCallback.description' - - api_field: 'codeCallback.beforeModelCallback.disabled' - - api_field: 'codeCallback.beforeModelCallback.pythonCode' - - api_field: 'contentFilter.bannedContents' - - api_field: 'contentFilter.bannedContentsInAgentResponse' - - api_field: 'contentFilter.bannedContentsInUserInput' - - api_field: 'contentFilter.disregardDiacritics' - - api_field: 'contentFilter.matchType' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'enabled' - - api_field: 'etag' - - field: 'guardrail_id' - provider_only: true - - api_field: 'llmPolicy.allowShortUtterance' - - api_field: 'llmPolicy.failOpen' - - api_field: 'llmPolicy.maxConversationMessages' - - api_field: 'llmPolicy.modelSettings.model' - - api_field: 'llmPolicy.modelSettings.temperature' - - api_field: 'llmPolicy.policyScope' - - api_field: 'llmPolicy.prompt' - - api_field: 'llmPromptSecurity.customPolicy.allowShortUtterance' - - api_field: 'llmPromptSecurity.customPolicy.failOpen' - - api_field: 'llmPromptSecurity.customPolicy.maxConversationMessages' - - api_field: 'llmPromptSecurity.customPolicy.modelSettings.model' - - api_field: 'llmPromptSecurity.customPolicy.modelSettings.temperature' - - api_field: 'llmPromptSecurity.customPolicy.policyScope' - - api_field: 'llmPromptSecurity.customPolicy.prompt' - - api_field: 'llmPromptSecurity.defaultSettings.defaultPromptTemplate' - - field: 'location' - provider_only: true - - api_field: 'modelSafety.safetySettings.category' - - api_field: 'modelSafety.safetySettings.threshold' - - api_field: 'name' - - api_field: 'updateTime' + - api_field: action.generativeAnswer.prompt + - api_field: action.respondImmediately.responses.disabled + - api_field: action.respondImmediately.responses.text + - api_field: action.transferAgent.agent + - field: app + provider_only: true + - api_field: codeCallback.afterAgentCallback.description + - api_field: codeCallback.afterAgentCallback.disabled + - api_field: codeCallback.afterAgentCallback.pythonCode + - api_field: codeCallback.afterModelCallback.description + - api_field: codeCallback.afterModelCallback.disabled + - api_field: codeCallback.afterModelCallback.pythonCode + - api_field: codeCallback.beforeAgentCallback.description + - api_field: codeCallback.beforeAgentCallback.disabled + - api_field: codeCallback.beforeAgentCallback.pythonCode + - api_field: codeCallback.beforeModelCallback.description + - api_field: codeCallback.beforeModelCallback.disabled + - api_field: codeCallback.beforeModelCallback.pythonCode + - api_field: contentFilter.bannedContents + - api_field: contentFilter.bannedContentsInAgentResponse + - api_field: contentFilter.bannedContentsInUserInput + - api_field: contentFilter.disregardDiacritics + - api_field: contentFilter.matchType + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: enabled + - api_field: etag + - field: guardrail_id + provider_only: true + - api_field: llmPolicy.allowShortUtterance + - api_field: llmPolicy.failOpen + - api_field: llmPolicy.maxConversationMessages + - api_field: llmPolicy.modelSettings.model + - api_field: llmPolicy.modelSettings.temperature + - api_field: llmPolicy.policyScope + - api_field: llmPolicy.prompt + - api_field: llmPromptSecurity.customPolicy.allowShortUtterance + - api_field: llmPromptSecurity.customPolicy.failOpen + - api_field: llmPromptSecurity.customPolicy.maxConversationMessages + - api_field: llmPromptSecurity.customPolicy.modelSettings.model + - api_field: llmPromptSecurity.customPolicy.modelSettings.temperature + - api_field: llmPromptSecurity.customPolicy.policyScope + - api_field: llmPromptSecurity.customPolicy.prompt + - api_field: llmPromptSecurity.defaultSettings.defaultPromptTemplate + - field: location + provider_only: true + - api_field: modelSafety.safetySettings.category + - api_field: modelSafety.safetySettings.threshold + - api_field: name + - api_field: updateTime diff --git a/google/services/ces/resource_ces_tool_generated_meta.yaml b/google/services/ces/resource_ces_tool_generated_meta.yaml index 98ae3be74c2..b1b0cebe6b5 100644 --- a/google/services/ces/resource_ces_tool_generated_meta.yaml +++ b/google/services/ces/resource_ces_tool_generated_meta.yaml @@ -1,135 +1,135 @@ -resource: 'google_ces_tool' -generation_type: 'mmv1' -source_file: 'products/ces/Tool.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Tool' +resource: google_ces_tool +generation_type: mmv1 +source_file: products/ces/Tool.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: Tool autogen_status: true fields: - - field: 'app' - provider_only: true - - api_field: 'clientFunction.description' - - api_field: 'clientFunction.name' - - api_field: 'clientFunction.parameters.additionalProperties' - json: true - - api_field: 'clientFunction.parameters.anyOf' - json: true - - api_field: 'clientFunction.parameters.default' - - api_field: 'clientFunction.parameters.defs' - json: true - - api_field: 'clientFunction.parameters.description' - - api_field: 'clientFunction.parameters.enum' - - api_field: 'clientFunction.parameters.items' - json: true - - api_field: 'clientFunction.parameters.maxItems' - - api_field: 'clientFunction.parameters.maximum' - - api_field: 'clientFunction.parameters.minItems' - - api_field: 'clientFunction.parameters.minimum' - - api_field: 'clientFunction.parameters.nullable' - - api_field: 'clientFunction.parameters.prefixItems' - json: true - - api_field: 'clientFunction.parameters.properties' - json: true - - api_field: 'clientFunction.parameters.ref' - - api_field: 'clientFunction.parameters.required' - - api_field: 'clientFunction.parameters.title' - - api_field: 'clientFunction.parameters.type' - - api_field: 'clientFunction.parameters.uniqueItems' - - api_field: 'clientFunction.response.additionalProperties' - json: true - - api_field: 'clientFunction.response.anyOf' - json: true - - api_field: 'clientFunction.response.default' - - api_field: 'clientFunction.response.defs' - json: true - - api_field: 'clientFunction.response.description' - - api_field: 'clientFunction.response.enum' - - api_field: 'clientFunction.response.items' - json: true - - api_field: 'clientFunction.response.maxItems' - - api_field: 'clientFunction.response.maximum' - - api_field: 'clientFunction.response.minItems' - - api_field: 'clientFunction.response.minimum' - - api_field: 'clientFunction.response.nullable' - - api_field: 'clientFunction.response.prefixItems' - json: true - - api_field: 'clientFunction.response.properties' - json: true - - api_field: 'clientFunction.response.ref' - - api_field: 'clientFunction.response.required' - - api_field: 'clientFunction.response.title' - - api_field: 'clientFunction.response.type' - - api_field: 'clientFunction.response.uniqueItems' - - api_field: 'createTime' - - api_field: 'dataStoreTool.boostSpecs.dataStores' - - api_field: 'dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boost' - - api_field: 'dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.attributeType' - - api_field: 'dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.attributeValue' - - api_field: 'dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.boostAmount' - - api_field: 'dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.fieldName' - - api_field: 'dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.interpolationType' - - api_field: 'dataStoreTool.boostSpecs.spec.conditionBoostSpecs.condition' - - api_field: 'dataStoreTool.description' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collection' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collectionDisplayName' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.dataSource' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.createTime' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.displayName' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.documentProcessingMode' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.name' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.dataStore.type' - - api_field: 'dataStoreTool.engineSource.dataStoreSources.filter' - - api_field: 'dataStoreTool.engineSource.engine' - - api_field: 'dataStoreTool.engineSource.filter' - - api_field: 'dataStoreTool.maxResults' - - api_field: 'dataStoreTool.modalityConfigs.groundingConfig.disabled' - - api_field: 'dataStoreTool.modalityConfigs.groundingConfig.groundingLevel' - - api_field: 'dataStoreTool.modalityConfigs.modalityType' - - api_field: 'dataStoreTool.modalityConfigs.rewriterConfig.disabled' - - api_field: 'dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.model' - - api_field: 'dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.temperature' - - api_field: 'dataStoreTool.modalityConfigs.rewriterConfig.prompt' - - api_field: 'dataStoreTool.modalityConfigs.summarizationConfig.disabled' - - api_field: 'dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.model' - - api_field: 'dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.temperature' - - api_field: 'dataStoreTool.modalityConfigs.summarizationConfig.prompt' - - api_field: 'dataStoreTool.name' - - api_field: 'displayName' - - api_field: 'etag' - - api_field: 'executionType' - - api_field: 'generatedSummary' - - api_field: 'googleSearchTool.contextUrls' - - api_field: 'googleSearchTool.description' - - api_field: 'googleSearchTool.excludeDomains' - - api_field: 'googleSearchTool.name' - - api_field: 'googleSearchTool.preferredDomains' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'openApiTool.apiAuthentication.apiKeyConfig.apiKeySecretVersion' - - api_field: 'openApiTool.apiAuthentication.apiKeyConfig.keyName' - - api_field: 'openApiTool.apiAuthentication.apiKeyConfig.requestLocation' - - api_field: 'openApiTool.apiAuthentication.bearerTokenConfig.token' - - api_field: 'openApiTool.apiAuthentication.oauthConfig.clientId' - - api_field: 'openApiTool.apiAuthentication.oauthConfig.clientSecretVersion' - - api_field: 'openApiTool.apiAuthentication.oauthConfig.oauthGrantType' - - api_field: 'openApiTool.apiAuthentication.oauthConfig.scopes' - - api_field: 'openApiTool.apiAuthentication.oauthConfig.tokenEndpoint' - - api_field: 'openApiTool.apiAuthentication.serviceAccountAuthConfig.serviceAccount' - - api_field: 'openApiTool.apiAuthentication.serviceAgentIdTokenAuthConfig' - - api_field: 'openApiTool.description' - - api_field: 'openApiTool.ignoreUnknownFields' - - api_field: 'openApiTool.name' - - api_field: 'openApiTool.openApiSchema' - - api_field: 'openApiTool.serviceDirectoryConfig.service' - - api_field: 'openApiTool.tlsConfig.caCerts.cert' - - api_field: 'openApiTool.tlsConfig.caCerts.displayName' - - api_field: 'openApiTool.url' - - api_field: 'pythonFunction.description' - - api_field: 'pythonFunction.name' - - api_field: 'pythonFunction.pythonCode' - - api_field: 'systemTool.description' - - api_field: 'systemTool.name' - - field: 'tool_id' - provider_only: true - - api_field: 'updateTime' + - field: app + provider_only: true + - api_field: clientFunction.description + - api_field: clientFunction.name + - api_field: clientFunction.parameters.additionalProperties + json: true + - api_field: clientFunction.parameters.anyOf + json: true + - api_field: clientFunction.parameters.default + - api_field: clientFunction.parameters.defs + json: true + - api_field: clientFunction.parameters.description + - api_field: clientFunction.parameters.enum + - api_field: clientFunction.parameters.items + json: true + - api_field: clientFunction.parameters.maxItems + - api_field: clientFunction.parameters.maximum + - api_field: clientFunction.parameters.minItems + - api_field: clientFunction.parameters.minimum + - api_field: clientFunction.parameters.nullable + - api_field: clientFunction.parameters.prefixItems + json: true + - api_field: clientFunction.parameters.properties + json: true + - api_field: clientFunction.parameters.ref + - api_field: clientFunction.parameters.required + - api_field: clientFunction.parameters.title + - api_field: clientFunction.parameters.type + - api_field: clientFunction.parameters.uniqueItems + - api_field: clientFunction.response.additionalProperties + json: true + - api_field: clientFunction.response.anyOf + json: true + - api_field: clientFunction.response.default + - api_field: clientFunction.response.defs + json: true + - api_field: clientFunction.response.description + - api_field: clientFunction.response.enum + - api_field: clientFunction.response.items + json: true + - api_field: clientFunction.response.maxItems + - api_field: clientFunction.response.maximum + - api_field: clientFunction.response.minItems + - api_field: clientFunction.response.minimum + - api_field: clientFunction.response.nullable + - api_field: clientFunction.response.prefixItems + json: true + - api_field: clientFunction.response.properties + json: true + - api_field: clientFunction.response.ref + - api_field: clientFunction.response.required + - api_field: clientFunction.response.title + - api_field: clientFunction.response.type + - api_field: clientFunction.response.uniqueItems + - api_field: createTime + - api_field: dataStoreTool.boostSpecs.dataStores + - api_field: dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boost + - api_field: dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.attributeType + - api_field: dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.attributeValue + - api_field: dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.controlPoints.boostAmount + - api_field: dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.fieldName + - api_field: dataStoreTool.boostSpecs.spec.conditionBoostSpecs.boostControlSpec.interpolationType + - api_field: dataStoreTool.boostSpecs.spec.conditionBoostSpecs.condition + - api_field: dataStoreTool.description + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collection + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.collectionDisplayName + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.connectorConfig.dataSource + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.createTime + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.displayName + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.documentProcessingMode + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.name + - api_field: dataStoreTool.engineSource.dataStoreSources.dataStore.type + - api_field: dataStoreTool.engineSource.dataStoreSources.filter + - api_field: dataStoreTool.engineSource.engine + - api_field: dataStoreTool.engineSource.filter + - api_field: dataStoreTool.maxResults + - api_field: dataStoreTool.modalityConfigs.groundingConfig.disabled + - api_field: dataStoreTool.modalityConfigs.groundingConfig.groundingLevel + - api_field: dataStoreTool.modalityConfigs.modalityType + - api_field: dataStoreTool.modalityConfigs.rewriterConfig.disabled + - api_field: dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.model + - api_field: dataStoreTool.modalityConfigs.rewriterConfig.modelSettings.temperature + - api_field: dataStoreTool.modalityConfigs.rewriterConfig.prompt + - api_field: dataStoreTool.modalityConfigs.summarizationConfig.disabled + - api_field: dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.model + - api_field: dataStoreTool.modalityConfigs.summarizationConfig.modelSettings.temperature + - api_field: dataStoreTool.modalityConfigs.summarizationConfig.prompt + - api_field: dataStoreTool.name + - api_field: displayName + - api_field: etag + - api_field: executionType + - api_field: generatedSummary + - api_field: googleSearchTool.contextUrls + - api_field: googleSearchTool.description + - api_field: googleSearchTool.excludeDomains + - api_field: googleSearchTool.name + - api_field: googleSearchTool.preferredDomains + - field: location + provider_only: true + - api_field: name + - api_field: openApiTool.apiAuthentication.apiKeyConfig.apiKeySecretVersion + - api_field: openApiTool.apiAuthentication.apiKeyConfig.keyName + - api_field: openApiTool.apiAuthentication.apiKeyConfig.requestLocation + - api_field: openApiTool.apiAuthentication.bearerTokenConfig.token + - api_field: openApiTool.apiAuthentication.oauthConfig.clientId + - api_field: openApiTool.apiAuthentication.oauthConfig.clientSecretVersion + - api_field: openApiTool.apiAuthentication.oauthConfig.oauthGrantType + - api_field: openApiTool.apiAuthentication.oauthConfig.scopes + - api_field: openApiTool.apiAuthentication.oauthConfig.tokenEndpoint + - api_field: openApiTool.apiAuthentication.serviceAccountAuthConfig.serviceAccount + - api_field: openApiTool.apiAuthentication.serviceAgentIdTokenAuthConfig + - api_field: openApiTool.description + - api_field: openApiTool.ignoreUnknownFields + - api_field: openApiTool.name + - api_field: openApiTool.openApiSchema + - api_field: openApiTool.serviceDirectoryConfig.service + - api_field: openApiTool.tlsConfig.caCerts.cert + - api_field: openApiTool.tlsConfig.caCerts.displayName + - api_field: openApiTool.url + - api_field: pythonFunction.description + - api_field: pythonFunction.name + - api_field: pythonFunction.pythonCode + - api_field: systemTool.description + - api_field: systemTool.name + - field: tool_id + provider_only: true + - api_field: updateTime diff --git a/google/services/ces/resource_ces_toolset_generated_meta.yaml b/google/services/ces/resource_ces_toolset_generated_meta.yaml index 21482eaf98d..657f1aec45a 100644 --- a/google/services/ces/resource_ces_toolset_generated_meta.yaml +++ b/google/services/ces/resource_ces_toolset_generated_meta.yaml @@ -1,38 +1,38 @@ -resource: 'google_ces_toolset' -generation_type: 'mmv1' -source_file: 'products/ces/Toolset.yaml' -api_service_name: 'ces.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Toolset' +resource: google_ces_toolset +generation_type: mmv1 +source_file: products/ces/Toolset.yaml +api_service_name: ces.googleapis.com +api_version: v1 +api_resource_type_kind: Toolset autogen_status: true fields: - - field: 'app' - provider_only: true - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'etag' - - api_field: 'executionType' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'openApiToolset.apiAuthentication.apiKeyConfig.apiKeySecretVersion' - - api_field: 'openApiToolset.apiAuthentication.apiKeyConfig.keyName' - - api_field: 'openApiToolset.apiAuthentication.apiKeyConfig.requestLocation' - - api_field: 'openApiToolset.apiAuthentication.bearerTokenConfig.token' - - api_field: 'openApiToolset.apiAuthentication.oauthConfig.clientId' - - api_field: 'openApiToolset.apiAuthentication.oauthConfig.clientSecretVersion' - - api_field: 'openApiToolset.apiAuthentication.oauthConfig.oauthGrantType' - - api_field: 'openApiToolset.apiAuthentication.oauthConfig.scopes' - - api_field: 'openApiToolset.apiAuthentication.oauthConfig.tokenEndpoint' - - api_field: 'openApiToolset.apiAuthentication.serviceAccountAuthConfig.serviceAccount' - - api_field: 'openApiToolset.apiAuthentication.serviceAgentIdTokenAuthConfig' - - api_field: 'openApiToolset.ignoreUnknownFields' - - api_field: 'openApiToolset.openApiSchema' - - api_field: 'openApiToolset.serviceDirectoryConfig.service' - - api_field: 'openApiToolset.tlsConfig.caCerts.cert' - - api_field: 'openApiToolset.tlsConfig.caCerts.displayName' - - api_field: 'openApiToolset.url' - - field: 'toolset_id' - provider_only: true - - api_field: 'updateTime' + - field: app + provider_only: true + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: etag + - api_field: executionType + - field: location + provider_only: true + - api_field: name + - api_field: openApiToolset.apiAuthentication.apiKeyConfig.apiKeySecretVersion + - api_field: openApiToolset.apiAuthentication.apiKeyConfig.keyName + - api_field: openApiToolset.apiAuthentication.apiKeyConfig.requestLocation + - api_field: openApiToolset.apiAuthentication.bearerTokenConfig.token + - api_field: openApiToolset.apiAuthentication.oauthConfig.clientId + - api_field: openApiToolset.apiAuthentication.oauthConfig.clientSecretVersion + - api_field: openApiToolset.apiAuthentication.oauthConfig.oauthGrantType + - api_field: openApiToolset.apiAuthentication.oauthConfig.scopes + - api_field: openApiToolset.apiAuthentication.oauthConfig.tokenEndpoint + - api_field: openApiToolset.apiAuthentication.serviceAccountAuthConfig.serviceAccount + - api_field: openApiToolset.apiAuthentication.serviceAgentIdTokenAuthConfig + - api_field: openApiToolset.ignoreUnknownFields + - api_field: openApiToolset.openApiSchema + - api_field: openApiToolset.serviceDirectoryConfig.service + - api_field: openApiToolset.tlsConfig.caCerts.cert + - api_field: openApiToolset.tlsConfig.caCerts.displayName + - api_field: openApiToolset.url + - field: toolset_id + provider_only: true + - api_field: updateTime diff --git a/google/services/chronicle/resource_chronicle_data_access_label_generated_meta.yaml b/google/services/chronicle/resource_chronicle_data_access_label_generated_meta.yaml index 2e707769426..968a5934fb0 100644 --- a/google/services/chronicle/resource_chronicle_data_access_label_generated_meta.yaml +++ b/google/services/chronicle/resource_chronicle_data_access_label_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_chronicle_data_access_label' -generation_type: 'mmv1' -source_file: 'products/chronicle/DataAccessLabel.yaml' -api_service_name: 'chronicle.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataAccessLabel' +resource: google_chronicle_data_access_label +generation_type: mmv1 +source_file: products/chronicle/DataAccessLabel.yaml +api_service_name: chronicle.googleapis.com +api_version: v1 +api_resource_type_kind: DataAccessLabel autogen_status: true fields: - - api_field: 'author' - - api_field: 'createTime' - - field: 'data_access_label_id' - provider_only: true - - api_field: 'description' - - api_field: 'displayName' - - field: 'instance' - provider_only: true - - api_field: 'lastEditor' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'udmQuery' - - api_field: 'updateTime' + - api_field: author + - api_field: createTime + - field: data_access_label_id + provider_only: true + - api_field: description + - api_field: displayName + - field: instance + provider_only: true + - api_field: lastEditor + - field: location + provider_only: true + - api_field: name + - api_field: udmQuery + - api_field: updateTime diff --git a/google/services/chronicle/resource_chronicle_data_access_scope_generated_meta.yaml b/google/services/chronicle/resource_chronicle_data_access_scope_generated_meta.yaml index c4f4aeb560f..80d7052ab56 100644 --- a/google/services/chronicle/resource_chronicle_data_access_scope_generated_meta.yaml +++ b/google/services/chronicle/resource_chronicle_data_access_scope_generated_meta.yaml @@ -1,34 +1,34 @@ -resource: 'google_chronicle_data_access_scope' -generation_type: 'mmv1' -source_file: 'products/chronicle/DataAccessScope.yaml' -api_service_name: 'chronicle.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataAccessScope' +resource: google_chronicle_data_access_scope +generation_type: mmv1 +source_file: products/chronicle/DataAccessScope.yaml +api_service_name: chronicle.googleapis.com +api_version: v1 +api_resource_type_kind: DataAccessScope autogen_status: true fields: - - api_field: 'allowAll' - - api_field: 'allowedDataAccessLabels.assetNamespace' - - api_field: 'allowedDataAccessLabels.dataAccessLabel' - - api_field: 'allowedDataAccessLabels.displayName' - - api_field: 'allowedDataAccessLabels.ingestionLabel.ingestionLabelKey' - - api_field: 'allowedDataAccessLabels.ingestionLabel.ingestionLabelValue' - - api_field: 'allowedDataAccessLabels.logType' - - api_field: 'author' - - api_field: 'createTime' - - field: 'data_access_scope_id' - provider_only: true - - api_field: 'deniedDataAccessLabels.assetNamespace' - - api_field: 'deniedDataAccessLabels.dataAccessLabel' - - api_field: 'deniedDataAccessLabels.displayName' - - api_field: 'deniedDataAccessLabels.ingestionLabel.ingestionLabelKey' - - api_field: 'deniedDataAccessLabels.ingestionLabel.ingestionLabelValue' - - api_field: 'deniedDataAccessLabels.logType' - - api_field: 'description' - - api_field: 'displayName' - - field: 'instance' - provider_only: true - - api_field: 'lastEditor' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' + - api_field: allowAll + - api_field: allowedDataAccessLabels.assetNamespace + - api_field: allowedDataAccessLabels.dataAccessLabel + - api_field: allowedDataAccessLabels.displayName + - api_field: allowedDataAccessLabels.ingestionLabel.ingestionLabelKey + - api_field: allowedDataAccessLabels.ingestionLabel.ingestionLabelValue + - api_field: allowedDataAccessLabels.logType + - api_field: author + - api_field: createTime + - field: data_access_scope_id + provider_only: true + - api_field: deniedDataAccessLabels.assetNamespace + - api_field: deniedDataAccessLabels.dataAccessLabel + - api_field: deniedDataAccessLabels.displayName + - api_field: deniedDataAccessLabels.ingestionLabel.ingestionLabelKey + - api_field: deniedDataAccessLabels.ingestionLabel.ingestionLabelValue + - api_field: deniedDataAccessLabels.logType + - api_field: description + - api_field: displayName + - field: instance + provider_only: true + - api_field: lastEditor + - field: location + provider_only: true + - api_field: name + - api_field: updateTime diff --git a/google/services/chronicle/resource_chronicle_reference_list_generated_meta.yaml b/google/services/chronicle/resource_chronicle_reference_list_generated_meta.yaml index 4d74212fd8e..661f1356a8d 100644 --- a/google/services/chronicle/resource_chronicle_reference_list_generated_meta.yaml +++ b/google/services/chronicle/resource_chronicle_reference_list_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_chronicle_reference_list' -generation_type: 'mmv1' -source_file: 'products/chronicle/ReferenceList.yaml' -api_service_name: 'chronicle.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ReferenceList' +resource: google_chronicle_reference_list +generation_type: mmv1 +source_file: products/chronicle/ReferenceList.yaml +api_service_name: chronicle.googleapis.com +api_version: v1 +api_resource_type_kind: ReferenceList autogen_status: true fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'entries.value' - - field: 'instance' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'reference_list_id' - provider_only: true - - api_field: 'revisionCreateTime' - - api_field: 'ruleAssociationsCount' - - api_field: 'rules' - - api_field: 'scopeInfo.referenceListScope.scopeNames' - - api_field: 'syntaxType' + - api_field: description + - api_field: displayName + - api_field: entries.value + - field: instance + provider_only: true + - field: location + provider_only: true + - api_field: name + - field: reference_list_id + provider_only: true + - api_field: revisionCreateTime + - api_field: ruleAssociationsCount + - api_field: rules + - api_field: scopeInfo.referenceListScope.scopeNames + - api_field: syntaxType diff --git a/google/services/chronicle/resource_chronicle_retrohunt_generated_meta.yaml b/google/services/chronicle/resource_chronicle_retrohunt_generated_meta.yaml index 1caf7dae5ab..c8b50d95868 100644 --- a/google/services/chronicle/resource_chronicle_retrohunt_generated_meta.yaml +++ b/google/services/chronicle/resource_chronicle_retrohunt_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_chronicle_retrohunt' -generation_type: 'mmv1' -source_file: 'products/chronicle/Retrohunt.yaml' -api_service_name: 'chronicle.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Retrohunt' +resource: google_chronicle_retrohunt +generation_type: mmv1 +source_file: products/chronicle/Retrohunt.yaml +api_service_name: chronicle.googleapis.com +api_version: v1 +api_resource_type_kind: Retrohunt autogen_status: true fields: - - api_field: 'executionInterval.endTime' - - api_field: 'executionInterval.startTime' - - field: 'instance' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'processInterval.endTime' - - api_field: 'processInterval.startTime' - - api_field: 'progressPercentage' - - api_field: 'retrohunt' - - field: 'rule' - provider_only: true - - api_field: 'state' + - api_field: executionInterval.endTime + - api_field: executionInterval.startTime + - field: instance + provider_only: true + - field: location + provider_only: true + - api_field: name + - api_field: processInterval.endTime + - api_field: processInterval.startTime + - api_field: progressPercentage + - api_field: retrohunt + - field: rule + provider_only: true + - api_field: state diff --git a/google/services/chronicle/resource_chronicle_rule_deployment_generated_meta.yaml b/google/services/chronicle/resource_chronicle_rule_deployment_generated_meta.yaml index 9674e55e71b..82279749ac8 100644 --- a/google/services/chronicle/resource_chronicle_rule_deployment_generated_meta.yaml +++ b/google/services/chronicle/resource_chronicle_rule_deployment_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_chronicle_rule_deployment' -generation_type: 'mmv1' -source_file: 'products/chronicle/RuleDeployment.yaml' -api_service_name: 'chronicle.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RuleDeployment' +resource: google_chronicle_rule_deployment +generation_type: mmv1 +source_file: products/chronicle/RuleDeployment.yaml +api_service_name: chronicle.googleapis.com +api_version: v1 +api_resource_type_kind: RuleDeployment autogen_status: true fields: - - api_field: 'alerting' - - api_field: 'archiveTime' - - api_field: 'archived' - - api_field: 'consumerRules' - - api_field: 'enabled' - - api_field: 'executionState' - - field: 'instance' - provider_only: true - - api_field: 'lastAlertStatusChangeTime' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'producerRules' - - field: 'rule' - provider_only: true - - api_field: 'runFrequency' + - api_field: alerting + - api_field: archiveTime + - api_field: archived + - api_field: consumerRules + - api_field: enabled + - api_field: executionState + - field: instance + provider_only: true + - api_field: lastAlertStatusChangeTime + - field: location + provider_only: true + - api_field: name + - api_field: producerRules + - field: rule + provider_only: true + - api_field: runFrequency diff --git a/google/services/chronicle/resource_chronicle_rule_generated_meta.yaml b/google/services/chronicle/resource_chronicle_rule_generated_meta.yaml index 8c308bdab13..71739b87062 100644 --- a/google/services/chronicle/resource_chronicle_rule_generated_meta.yaml +++ b/google/services/chronicle/resource_chronicle_rule_generated_meta.yaml @@ -1,39 +1,39 @@ -resource: 'google_chronicle_rule' -generation_type: 'mmv1' -source_file: 'products/chronicle/Rule.yaml' -api_service_name: 'chronicle.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Rule' +resource: google_chronicle_rule +generation_type: mmv1 +source_file: products/chronicle/Rule.yaml +api_service_name: chronicle.googleapis.com +api_version: v1 +api_resource_type_kind: Rule autogen_status: true fields: - - api_field: 'allowedRunFrequencies' - - api_field: 'author' - - api_field: 'compilationDiagnostics.message' - - api_field: 'compilationDiagnostics.position.endColumn' - - api_field: 'compilationDiagnostics.position.endLine' - - api_field: 'compilationDiagnostics.position.startColumn' - - api_field: 'compilationDiagnostics.position.startLine' - - api_field: 'compilationDiagnostics.severity' - - api_field: 'compilationDiagnostics.uri' - - api_field: 'compilationState' - - api_field: 'createTime' - - api_field: 'dataTables' - - field: 'deletion_policy' - provider_only: true - - api_field: 'displayName' - - api_field: 'etag' - - field: 'instance' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'metadata' - - api_field: 'name' - - api_field: 'nearRealTimeLiveRuleEligible' - - api_field: 'referenceLists' - - api_field: 'revisionCreateTime' - - api_field: 'revisionId' - - api_field: 'ruleId' - - api_field: 'scope' - - api_field: 'severity.displayName' - - api_field: 'text' - - api_field: 'type' + - api_field: allowedRunFrequencies + - api_field: author + - api_field: compilationDiagnostics.message + - api_field: compilationDiagnostics.position.endColumn + - api_field: compilationDiagnostics.position.endLine + - api_field: compilationDiagnostics.position.startColumn + - api_field: compilationDiagnostics.position.startLine + - api_field: compilationDiagnostics.severity + - api_field: compilationDiagnostics.uri + - api_field: compilationState + - api_field: createTime + - api_field: dataTables + - field: deletion_policy + provider_only: true + - api_field: displayName + - api_field: etag + - field: instance + provider_only: true + - field: location + provider_only: true + - api_field: metadata + - api_field: name + - api_field: nearRealTimeLiveRuleEligible + - api_field: referenceLists + - api_field: revisionCreateTime + - api_field: revisionId + - api_field: ruleId + - api_field: scope + - api_field: severity.displayName + - api_field: text + - api_field: type diff --git a/google/services/chronicle/resource_chronicle_watchlist_generated_meta.yaml b/google/services/chronicle/resource_chronicle_watchlist_generated_meta.yaml index 0c004d1511f..1a1353d7d54 100644 --- a/google/services/chronicle/resource_chronicle_watchlist_generated_meta.yaml +++ b/google/services/chronicle/resource_chronicle_watchlist_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_chronicle_watchlist' -generation_type: 'mmv1' -source_file: 'products/chronicle/Watchlist.yaml' -api_service_name: 'chronicle.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Watchlist' +resource: google_chronicle_watchlist +generation_type: mmv1 +source_file: products/chronicle/Watchlist.yaml +api_service_name: chronicle.googleapis.com +api_version: v1 +api_resource_type_kind: Watchlist autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'entityCount.asset' - - api_field: 'entityCount.user' - - api_field: 'entityPopulationMechanism.manual' - - field: 'instance' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'multiplyingFactor' - - api_field: 'name' - - api_field: 'updateTime' - - api_field: 'watchlistId' - - api_field: 'watchlistUserPreferences.pinned' + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: entityCount.asset + - api_field: entityCount.user + - api_field: entityPopulationMechanism.manual + - field: instance + provider_only: true + - field: location + provider_only: true + - api_field: multiplyingFactor + - api_field: name + - api_field: updateTime + - api_field: watchlistId + - api_field: watchlistUserPreferences.pinned diff --git a/google/services/cloudasset/resource_cloud_asset_folder_feed_generated_meta.yaml b/google/services/cloudasset/resource_cloud_asset_folder_feed_generated_meta.yaml index 27ae75b8d0b..f08ae6e53dd 100644 --- a/google/services/cloudasset/resource_cloud_asset_folder_feed_generated_meta.yaml +++ b/google/services/cloudasset/resource_cloud_asset_folder_feed_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_cloud_asset_folder_feed' -generation_type: 'mmv1' -source_file: 'products/cloudasset/FolderFeed.yaml' -api_service_name: 'cloudasset.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Feed' -cai_asset_name_format: '//cloudasset.googleapis.com/folders/{{folder}}/feeds/{{feed_id}}' +resource: google_cloud_asset_folder_feed +generation_type: mmv1 +source_file: products/cloudasset/FolderFeed.yaml +api_service_name: cloudasset.googleapis.com +api_version: v1 +api_resource_type_kind: Feed +cai_asset_name_format: //cloudasset.googleapis.com/folders/{{folder}}/feeds/{{feed_id}} api_variant_patterns: - - 'folders/{folder}/feeds/{feed}' + - folders/{folder}/feeds/{feed} fields: - - api_field: 'assetNames' - - api_field: 'assetTypes' - - field: 'billing_project' - provider_only: true - - api_field: 'condition.description' - - api_field: 'condition.expression' - - api_field: 'condition.location' - - api_field: 'condition.title' - - api_field: 'contentType' - - field: 'feed_id' - provider_only: true - - api_field: 'feedOutputConfig.pubsubDestination.topic' - - field: 'folder' - provider_only: true - - api_field: 'folder_id' - - api_field: 'name' + - api_field: assetNames + - api_field: assetTypes + - field: billing_project + provider_only: true + - api_field: condition.description + - api_field: condition.expression + - api_field: condition.location + - api_field: condition.title + - api_field: contentType + - field: feed_id + provider_only: true + - api_field: feedOutputConfig.pubsubDestination.topic + - field: folder + provider_only: true + - api_field: folder_id + - api_field: name diff --git a/google/services/cloudasset/resource_cloud_asset_organization_feed_generated_meta.yaml b/google/services/cloudasset/resource_cloud_asset_organization_feed_generated_meta.yaml index 9fa4181f9ce..d43e92cb5b2 100644 --- a/google/services/cloudasset/resource_cloud_asset_organization_feed_generated_meta.yaml +++ b/google/services/cloudasset/resource_cloud_asset_organization_feed_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_cloud_asset_organization_feed' -generation_type: 'mmv1' -source_file: 'products/cloudasset/OrganizationFeed.yaml' -api_service_name: 'cloudasset.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Feed' -cai_asset_name_format: '//cloudasset.googleapis.com/organizations/{{org_id}}/feeds/{{feed_id}}' +resource: google_cloud_asset_organization_feed +generation_type: mmv1 +source_file: products/cloudasset/OrganizationFeed.yaml +api_service_name: cloudasset.googleapis.com +api_version: v1 +api_resource_type_kind: Feed +cai_asset_name_format: //cloudasset.googleapis.com/organizations/{{org_id}}/feeds/{{feed_id}} api_variant_patterns: - - 'organizations/{organization}/feeds/{feed}' + - organizations/{organization}/feeds/{feed} fields: - - api_field: 'assetNames' - - api_field: 'assetTypes' - - field: 'billing_project' - provider_only: true - - api_field: 'condition.description' - - api_field: 'condition.expression' - - api_field: 'condition.location' - - api_field: 'condition.title' - - api_field: 'contentType' - - field: 'feed_id' - provider_only: true - - api_field: 'feedOutputConfig.pubsubDestination.topic' - - api_field: 'name' - - field: 'org_id' - provider_only: true + - api_field: assetNames + - api_field: assetTypes + - field: billing_project + provider_only: true + - api_field: condition.description + - api_field: condition.expression + - api_field: condition.location + - api_field: condition.title + - api_field: contentType + - field: feed_id + provider_only: true + - api_field: feedOutputConfig.pubsubDestination.topic + - api_field: name + - field: org_id + provider_only: true diff --git a/google/services/cloudasset/resource_cloud_asset_project_feed_generated_meta.yaml b/google/services/cloudasset/resource_cloud_asset_project_feed_generated_meta.yaml index c36cdb79112..d2a9b0cd128 100644 --- a/google/services/cloudasset/resource_cloud_asset_project_feed_generated_meta.yaml +++ b/google/services/cloudasset/resource_cloud_asset_project_feed_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_cloud_asset_project_feed' -generation_type: 'mmv1' -source_file: 'products/cloudasset/ProjectFeed.yaml' -api_service_name: 'cloudasset.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Feed' -cai_asset_name_format: '//cloudasset.googleapis.com/projects/{{project}}/feeds/{{feed_id}}' +resource: google_cloud_asset_project_feed +generation_type: mmv1 +source_file: products/cloudasset/ProjectFeed.yaml +api_service_name: cloudasset.googleapis.com +api_version: v1 +api_resource_type_kind: Feed +cai_asset_name_format: //cloudasset.googleapis.com/projects/{{project}}/feeds/{{feed_id}} api_variant_patterns: - - 'projects/{project}/feeds/{feed}' + - projects/{project}/feeds/{feed} fields: - - api_field: 'assetNames' - - api_field: 'assetTypes' - - field: 'billing_project' - provider_only: true - - api_field: 'condition.description' - - api_field: 'condition.expression' - - api_field: 'condition.location' - - api_field: 'condition.title' - - api_field: 'contentType' - - field: 'feed_id' - provider_only: true - - api_field: 'feedOutputConfig.pubsubDestination.topic' - - api_field: 'name' + - api_field: assetNames + - api_field: assetTypes + - field: billing_project + provider_only: true + - api_field: condition.description + - api_field: condition.expression + - api_field: condition.location + - api_field: condition.title + - api_field: contentType + - field: feed_id + provider_only: true + - api_field: feedOutputConfig.pubsubDestination.topic + - api_field: name diff --git a/google/services/cloudbuild/resource_cloudbuild_bitbucket_server_config_generated_meta.yaml b/google/services/cloudbuild/resource_cloudbuild_bitbucket_server_config_generated_meta.yaml index 40ec0415298..c23c3427dcc 100644 --- a/google/services/cloudbuild/resource_cloudbuild_bitbucket_server_config_generated_meta.yaml +++ b/google/services/cloudbuild/resource_cloudbuild_bitbucket_server_config_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_cloudbuild_bitbucket_server_config' -generation_type: 'mmv1' -source_file: 'products/cloudbuild/BitbucketServerConfig.yaml' -api_service_name: 'cloudbuild.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BitbucketServerConfig' +resource: google_cloudbuild_bitbucket_server_config +generation_type: mmv1 +source_file: products/cloudbuild/BitbucketServerConfig.yaml +api_service_name: cloudbuild.googleapis.com +api_version: v1 +api_resource_type_kind: BitbucketServerConfig fields: - - api_field: 'apiKey' - - field: 'config_id' - provider_only: true - - api_field: 'connectedRepositories.projectKey' - - api_field: 'connectedRepositories.repoSlug' - - api_field: 'hostUri' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'peeredNetwork' - - api_field: 'secrets.adminAccessTokenVersionName' - - api_field: 'secrets.readAccessTokenVersionName' - - api_field: 'secrets.webhookSecretVersionName' - - api_field: 'sslCa' - - api_field: 'username' - - api_field: 'webhookKey' + - api_field: apiKey + - field: config_id + provider_only: true + - api_field: connectedRepositories.projectKey + - api_field: connectedRepositories.repoSlug + - api_field: hostUri + - field: location + provider_only: true + - api_field: name + - api_field: peeredNetwork + - api_field: secrets.adminAccessTokenVersionName + - api_field: secrets.readAccessTokenVersionName + - api_field: secrets.webhookSecretVersionName + - api_field: sslCa + - api_field: username + - api_field: webhookKey diff --git a/google/services/cloudbuild/resource_cloudbuild_trigger_generated_meta.yaml b/google/services/cloudbuild/resource_cloudbuild_trigger_generated_meta.yaml index cc3235561f7..2a4a06bf2cd 100644 --- a/google/services/cloudbuild/resource_cloudbuild_trigger_generated_meta.yaml +++ b/google/services/cloudbuild/resource_cloudbuild_trigger_generated_meta.yaml @@ -1,165 +1,165 @@ -resource: 'google_cloudbuild_trigger' -generation_type: 'mmv1' -source_file: 'products/cloudbuild/Trigger.yaml' -api_service_name: 'cloudbuild.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BuildTrigger' +resource: google_cloudbuild_trigger +generation_type: mmv1 +source_file: products/cloudbuild/Trigger.yaml +api_service_name: cloudbuild.googleapis.com +api_version: v1 +api_resource_type_kind: BuildTrigger api_variant_patterns: - - 'projects/{project}/locations/{location}/triggers/{trigger}' + - projects/{project}/locations/{location}/triggers/{trigger} fields: - - api_field: 'approvalConfig.approvalRequired' - - api_field: 'bitbucketServerTriggerConfig.bitbucketServerConfigResource' - - api_field: 'bitbucketServerTriggerConfig.projectKey' - - api_field: 'bitbucketServerTriggerConfig.pullRequest.branch' - - api_field: 'bitbucketServerTriggerConfig.pullRequest.commentControl' - - api_field: 'bitbucketServerTriggerConfig.pullRequest.invertRegex' - - api_field: 'bitbucketServerTriggerConfig.push.branch' - - api_field: 'bitbucketServerTriggerConfig.push.invertRegex' - - api_field: 'bitbucketServerTriggerConfig.push.tag' - - api_field: 'bitbucketServerTriggerConfig.repoSlug' - - api_field: 'build.artifacts.images' - - api_field: 'build.artifacts.mavenArtifacts.artifactId' - - api_field: 'build.artifacts.mavenArtifacts.groupId' - - api_field: 'build.artifacts.mavenArtifacts.path' - - api_field: 'build.artifacts.mavenArtifacts.repository' - - api_field: 'build.artifacts.mavenArtifacts.version' - - api_field: 'build.artifacts.npmPackages.packagePath' - - api_field: 'build.artifacts.npmPackages.repository' - - api_field: 'build.artifacts.objects.location' - - api_field: 'build.artifacts.objects.paths' - - api_field: 'build.artifacts.objects.timing.endTime' - - api_field: 'build.artifacts.objects.timing.startTime' - - api_field: 'build.artifacts.pythonPackages.paths' - - api_field: 'build.artifacts.pythonPackages.repository' - - api_field: 'build.availableSecrets.secretManager.env' - - api_field: 'build.availableSecrets.secretManager.versionName' - - api_field: 'build.images' - - api_field: 'build.logsBucket' - - api_field: 'build.options.diskSizeGb' - - api_field: 'build.options.dynamicSubstitutions' - - api_field: 'build.options.env' - - api_field: 'build.options.logStreamingOption' - - api_field: 'build.options.logging' - - api_field: 'build.options.machineType' - - api_field: 'build.options.requestedVerifyOption' - - api_field: 'build.options.secretEnv' - - api_field: 'build.options.sourceProvenanceHash' - - api_field: 'build.options.substitutionOption' - - api_field: 'build.options.volumes.name' - - api_field: 'build.options.volumes.path' - - api_field: 'build.options.workerPool' - - api_field: 'build.queueTtl' - - api_field: 'build.secrets.kmsKeyName' - field: 'build.secret.kms_key_name' - - api_field: 'build.secrets.secretEnv' - field: 'build.secret.secret_env' - - api_field: 'build.source.repoSource.branchName' - - api_field: 'build.source.repoSource.commitSha' - - api_field: 'build.source.repoSource.dir' - - api_field: 'build.source.repoSource.invertRegex' - - api_field: 'build.source.repoSource.projectId' - - api_field: 'build.source.repoSource.repoName' - - api_field: 'build.source.repoSource.substitutions' - - api_field: 'build.source.repoSource.tagName' - - api_field: 'build.source.storageSource.bucket' - - api_field: 'build.source.storageSource.generation' - - api_field: 'build.source.storageSource.object' - - api_field: 'build.steps.allowExitCodes' - field: 'build.step.allow_exit_codes' - - api_field: 'build.steps.allowFailure' - field: 'build.step.allow_failure' - - api_field: 'build.steps.args' - field: 'build.step.args' - - api_field: 'build.steps.dir' - field: 'build.step.dir' - - api_field: 'build.steps.entrypoint' - field: 'build.step.entrypoint' - - api_field: 'build.steps.env' - field: 'build.step.env' - - api_field: 'build.steps.id' - field: 'build.step.id' - - api_field: 'build.steps.name' - field: 'build.step.name' - - api_field: 'build.steps.script' - field: 'build.step.script' - - api_field: 'build.steps.secretEnv' - field: 'build.step.secret_env' - - api_field: 'build.steps.timeout' - field: 'build.step.timeout' - - api_field: 'build.steps.timing' - field: 'build.step.timing' - - api_field: 'build.steps.volumes.name' - field: 'build.step.volumes.name' - - api_field: 'build.steps.volumes.path' - field: 'build.step.volumes.path' - - api_field: 'build.steps.waitFor' - field: 'build.step.wait_for' - - api_field: 'build.substitutions' - - api_field: 'build.tags' - - api_field: 'build.timeout' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'developerConnectEventConfig.gitRepositoryLink' - - api_field: 'developerConnectEventConfig.gitRepositoryLinkType' - - api_field: 'developerConnectEventConfig.pullRequest.branch' - - api_field: 'developerConnectEventConfig.pullRequest.commentControl' - - api_field: 'developerConnectEventConfig.pullRequest.invertRegex' - - api_field: 'developerConnectEventConfig.push.branch' - - api_field: 'developerConnectEventConfig.push.invertRegex' - - api_field: 'developerConnectEventConfig.push.tag' - - api_field: 'disabled' - - api_field: 'filename' - - api_field: 'filter' - - api_field: 'gitFileSource.bitbucketServerConfig' - - api_field: 'gitFileSource.githubEnterpriseConfig' - - api_field: 'gitFileSource.path' - - api_field: 'gitFileSource.repoType' - - api_field: 'gitFileSource.repository' - - api_field: 'gitFileSource.revision' - - api_field: 'gitFileSource.uri' - - api_field: 'github.enterpriseConfigResourceName' - - api_field: 'github.name' - - api_field: 'github.owner' - - api_field: 'github.pullRequest.branch' - - api_field: 'github.pullRequest.commentControl' - - api_field: 'github.pullRequest.invertRegex' - - api_field: 'github.push.branch' - - api_field: 'github.push.invertRegex' - - api_field: 'github.push.tag' - - api_field: 'ignoredFiles' - - api_field: 'includeBuildLogs' - - api_field: 'includedFiles' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'pubsubConfig.service_account_email' - - api_field: 'pubsubConfig.state' - - api_field: 'pubsubConfig.subscription' - - api_field: 'pubsubConfig.topic' - - api_field: 'repositoryEventConfig.pullRequest.branch' - - api_field: 'repositoryEventConfig.pullRequest.commentControl' - - api_field: 'repositoryEventConfig.pullRequest.invertRegex' - - api_field: 'repositoryEventConfig.push.branch' - - api_field: 'repositoryEventConfig.push.invertRegex' - - api_field: 'repositoryEventConfig.push.tag' - - api_field: 'repositoryEventConfig.repository' - - api_field: 'serviceAccount' - - api_field: 'sourceToBuild.bitbucketServerConfig' - - api_field: 'sourceToBuild.githubEnterpriseConfig' - - api_field: 'sourceToBuild.ref' - - api_field: 'sourceToBuild.repoType' - - api_field: 'sourceToBuild.repository' - - api_field: 'sourceToBuild.uri' - - api_field: 'substitutions' - - api_field: 'tags' - - api_field: 'id' - field: 'trigger_id' - - api_field: 'triggerTemplate.branchName' - - api_field: 'triggerTemplate.commitSha' - - api_field: 'triggerTemplate.dir' - - api_field: 'triggerTemplate.invertRegex' - - api_field: 'triggerTemplate.projectId' - - api_field: 'triggerTemplate.repoName' - - api_field: 'triggerTemplate.tagName' - - api_field: 'webhookConfig.secret' - - api_field: 'webhookConfig.state' + - api_field: approvalConfig.approvalRequired + - api_field: bitbucketServerTriggerConfig.bitbucketServerConfigResource + - api_field: bitbucketServerTriggerConfig.projectKey + - api_field: bitbucketServerTriggerConfig.pullRequest.branch + - api_field: bitbucketServerTriggerConfig.pullRequest.commentControl + - api_field: bitbucketServerTriggerConfig.pullRequest.invertRegex + - api_field: bitbucketServerTriggerConfig.push.branch + - api_field: bitbucketServerTriggerConfig.push.invertRegex + - api_field: bitbucketServerTriggerConfig.push.tag + - api_field: bitbucketServerTriggerConfig.repoSlug + - api_field: build.artifacts.images + - api_field: build.artifacts.mavenArtifacts.artifactId + - api_field: build.artifacts.mavenArtifacts.groupId + - api_field: build.artifacts.mavenArtifacts.path + - api_field: build.artifacts.mavenArtifacts.repository + - api_field: build.artifacts.mavenArtifacts.version + - api_field: build.artifacts.npmPackages.packagePath + - api_field: build.artifacts.npmPackages.repository + - api_field: build.artifacts.objects.location + - api_field: build.artifacts.objects.paths + - api_field: build.artifacts.objects.timing.endTime + - api_field: build.artifacts.objects.timing.startTime + - api_field: build.artifacts.pythonPackages.paths + - api_field: build.artifacts.pythonPackages.repository + - api_field: build.availableSecrets.secretManager.env + - api_field: build.availableSecrets.secretManager.versionName + - api_field: build.images + - api_field: build.logsBucket + - api_field: build.options.diskSizeGb + - api_field: build.options.dynamicSubstitutions + - api_field: build.options.env + - api_field: build.options.logStreamingOption + - api_field: build.options.logging + - api_field: build.options.machineType + - api_field: build.options.requestedVerifyOption + - api_field: build.options.secretEnv + - api_field: build.options.sourceProvenanceHash + - api_field: build.options.substitutionOption + - api_field: build.options.volumes.name + - api_field: build.options.volumes.path + - api_field: build.options.workerPool + - api_field: build.queueTtl + - api_field: build.secrets.kmsKeyName + field: build.secret.kms_key_name + - api_field: build.secrets.secretEnv + field: build.secret.secret_env + - api_field: build.source.repoSource.branchName + - api_field: build.source.repoSource.commitSha + - api_field: build.source.repoSource.dir + - api_field: build.source.repoSource.invertRegex + - api_field: build.source.repoSource.projectId + - api_field: build.source.repoSource.repoName + - api_field: build.source.repoSource.substitutions + - api_field: build.source.repoSource.tagName + - api_field: build.source.storageSource.bucket + - api_field: build.source.storageSource.generation + - api_field: build.source.storageSource.object + - api_field: build.steps.allowExitCodes + field: build.step.allow_exit_codes + - api_field: build.steps.allowFailure + field: build.step.allow_failure + - api_field: build.steps.args + field: build.step.args + - api_field: build.steps.dir + field: build.step.dir + - api_field: build.steps.entrypoint + field: build.step.entrypoint + - api_field: build.steps.env + field: build.step.env + - api_field: build.steps.id + field: build.step.id + - api_field: build.steps.name + field: build.step.name + - api_field: build.steps.script + field: build.step.script + - api_field: build.steps.secretEnv + field: build.step.secret_env + - api_field: build.steps.timeout + field: build.step.timeout + - api_field: build.steps.timing + field: build.step.timing + - api_field: build.steps.volumes.name + field: build.step.volumes.name + - api_field: build.steps.volumes.path + field: build.step.volumes.path + - api_field: build.steps.waitFor + field: build.step.wait_for + - api_field: build.substitutions + - api_field: build.tags + - api_field: build.timeout + - api_field: createTime + - api_field: description + - api_field: developerConnectEventConfig.gitRepositoryLink + - api_field: developerConnectEventConfig.gitRepositoryLinkType + - api_field: developerConnectEventConfig.pullRequest.branch + - api_field: developerConnectEventConfig.pullRequest.commentControl + - api_field: developerConnectEventConfig.pullRequest.invertRegex + - api_field: developerConnectEventConfig.push.branch + - api_field: developerConnectEventConfig.push.invertRegex + - api_field: developerConnectEventConfig.push.tag + - api_field: disabled + - api_field: filename + - api_field: filter + - api_field: gitFileSource.bitbucketServerConfig + - api_field: gitFileSource.githubEnterpriseConfig + - api_field: gitFileSource.path + - api_field: gitFileSource.repoType + - api_field: gitFileSource.repository + - api_field: gitFileSource.revision + - api_field: gitFileSource.uri + - api_field: github.enterpriseConfigResourceName + - api_field: github.name + - api_field: github.owner + - api_field: github.pullRequest.branch + - api_field: github.pullRequest.commentControl + - api_field: github.pullRequest.invertRegex + - api_field: github.push.branch + - api_field: github.push.invertRegex + - api_field: github.push.tag + - api_field: ignoredFiles + - api_field: includeBuildLogs + - api_field: includedFiles + - field: location + provider_only: true + - api_field: name + - api_field: pubsubConfig.service_account_email + - api_field: pubsubConfig.state + - api_field: pubsubConfig.subscription + - api_field: pubsubConfig.topic + - api_field: repositoryEventConfig.pullRequest.branch + - api_field: repositoryEventConfig.pullRequest.commentControl + - api_field: repositoryEventConfig.pullRequest.invertRegex + - api_field: repositoryEventConfig.push.branch + - api_field: repositoryEventConfig.push.invertRegex + - api_field: repositoryEventConfig.push.tag + - api_field: repositoryEventConfig.repository + - api_field: serviceAccount + - api_field: sourceToBuild.bitbucketServerConfig + - api_field: sourceToBuild.githubEnterpriseConfig + - api_field: sourceToBuild.ref + - api_field: sourceToBuild.repoType + - api_field: sourceToBuild.repository + - api_field: sourceToBuild.uri + - api_field: substitutions + - api_field: tags + - api_field: id + field: trigger_id + - api_field: triggerTemplate.branchName + - api_field: triggerTemplate.commitSha + - api_field: triggerTemplate.dir + - api_field: triggerTemplate.invertRegex + - api_field: triggerTemplate.projectId + - api_field: triggerTemplate.repoName + - api_field: triggerTemplate.tagName + - api_field: webhookConfig.secret + - api_field: webhookConfig.state diff --git a/google/services/cloudbuildv2/iam_cloudbuildv2_connection_generated_test.go b/google/services/cloudbuildv2/iam_cloudbuildv2_connection_generated_test.go index 1734ccd8ea1..f1804dd58f3 100644 --- a/google/services/cloudbuildv2/iam_cloudbuildv2_connection_generated_test.go +++ b/google/services/cloudbuildv2/iam_cloudbuildv2_connection_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -245,3 +246,57 @@ resource "google_cloudbuildv2_connection_iam_binding" "foo" { } `, context) } + +func generateCloudbuildv2ConnectionIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/connections/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudbuildv2ConnectionIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/connections/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudbuildv2ConnectionIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/connections/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudbuildv2/resource_cloudbuildv2_connection_generated_meta.yaml b/google/services/cloudbuildv2/resource_cloudbuildv2_connection_generated_meta.yaml index d4674f33f2d..fe4a046f435 100644 --- a/google/services/cloudbuildv2/resource_cloudbuildv2_connection_generated_meta.yaml +++ b/google/services/cloudbuildv2/resource_cloudbuildv2_connection_generated_meta.yaml @@ -1,57 +1,57 @@ -resource: 'google_cloudbuildv2_connection' -generation_type: 'mmv1' -source_file: 'products/cloudbuildv2/Connection.yaml' -api_service_name: 'cloudbuild.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Connection' +resource: google_cloudbuildv2_connection +generation_type: mmv1 +source_file: products/cloudbuildv2/Connection.yaml +api_service_name: cloudbuild.googleapis.com +api_version: v2 +api_resource_type_kind: Connection fields: - - api_field: 'annotations' - - api_field: 'bitbucketCloudConfig.authorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketCloudConfig.authorizerCredential.username' - - api_field: 'bitbucketCloudConfig.readAuthorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketCloudConfig.readAuthorizerCredential.username' - - api_field: 'bitbucketCloudConfig.webhookSecretSecretVersion' - - api_field: 'bitbucketCloudConfig.workspace' - - api_field: 'bitbucketDataCenterConfig.authorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketDataCenterConfig.authorizerCredential.username' - - api_field: 'bitbucketDataCenterConfig.hostUri' - - api_field: 'bitbucketDataCenterConfig.readAuthorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketDataCenterConfig.readAuthorizerCredential.username' - - api_field: 'bitbucketDataCenterConfig.serverVersion' - - api_field: 'bitbucketDataCenterConfig.serviceDirectoryConfig.service' - - api_field: 'bitbucketDataCenterConfig.sslCa' - - api_field: 'bitbucketDataCenterConfig.webhookSecretSecretVersion' - - api_field: 'createTime' - - api_field: 'disabled' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - api_field: 'githubConfig.appInstallationId' - - api_field: 'githubConfig.authorizerCredential.oauthTokenSecretVersion' - - api_field: 'githubConfig.authorizerCredential.username' - - api_field: 'githubEnterpriseConfig.appId' - - api_field: 'githubEnterpriseConfig.appInstallationId' - - api_field: 'githubEnterpriseConfig.appSlug' - - api_field: 'githubEnterpriseConfig.hostUri' - - api_field: 'githubEnterpriseConfig.privateKeySecretVersion' - - api_field: 'githubEnterpriseConfig.serviceDirectoryConfig.service' - - api_field: 'githubEnterpriseConfig.sslCa' - - api_field: 'githubEnterpriseConfig.webhookSecretSecretVersion' - - api_field: 'gitlabConfig.authorizerCredential.userTokenSecretVersion' - - api_field: 'gitlabConfig.authorizerCredential.username' - - api_field: 'gitlabConfig.hostUri' - - api_field: 'gitlabConfig.readAuthorizerCredential.userTokenSecretVersion' - - api_field: 'gitlabConfig.readAuthorizerCredential.username' - - api_field: 'gitlabConfig.serverVersion' - - api_field: 'gitlabConfig.serviceDirectoryConfig.service' - - api_field: 'gitlabConfig.sslCa' - - api_field: 'gitlabConfig.webhookSecretSecretVersion' - - api_field: 'installationState.actionUri' - - api_field: 'installationState.message' - - api_field: 'installationState.stage' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'reconciling' - - api_field: 'updateTime' + - api_field: annotations + - api_field: bitbucketCloudConfig.authorizerCredential.userTokenSecretVersion + - api_field: bitbucketCloudConfig.authorizerCredential.username + - api_field: bitbucketCloudConfig.readAuthorizerCredential.userTokenSecretVersion + - api_field: bitbucketCloudConfig.readAuthorizerCredential.username + - api_field: bitbucketCloudConfig.webhookSecretSecretVersion + - api_field: bitbucketCloudConfig.workspace + - api_field: bitbucketDataCenterConfig.authorizerCredential.userTokenSecretVersion + - api_field: bitbucketDataCenterConfig.authorizerCredential.username + - api_field: bitbucketDataCenterConfig.hostUri + - api_field: bitbucketDataCenterConfig.readAuthorizerCredential.userTokenSecretVersion + - api_field: bitbucketDataCenterConfig.readAuthorizerCredential.username + - api_field: bitbucketDataCenterConfig.serverVersion + - api_field: bitbucketDataCenterConfig.serviceDirectoryConfig.service + - api_field: bitbucketDataCenterConfig.sslCa + - api_field: bitbucketDataCenterConfig.webhookSecretSecretVersion + - api_field: createTime + - api_field: disabled + - field: effective_annotations + provider_only: true + - api_field: etag + - api_field: githubConfig.appInstallationId + - api_field: githubConfig.authorizerCredential.oauthTokenSecretVersion + - api_field: githubConfig.authorizerCredential.username + - api_field: githubEnterpriseConfig.appId + - api_field: githubEnterpriseConfig.appInstallationId + - api_field: githubEnterpriseConfig.appSlug + - api_field: githubEnterpriseConfig.hostUri + - api_field: githubEnterpriseConfig.privateKeySecretVersion + - api_field: githubEnterpriseConfig.serviceDirectoryConfig.service + - api_field: githubEnterpriseConfig.sslCa + - api_field: githubEnterpriseConfig.webhookSecretSecretVersion + - api_field: gitlabConfig.authorizerCredential.userTokenSecretVersion + - api_field: gitlabConfig.authorizerCredential.username + - api_field: gitlabConfig.hostUri + - api_field: gitlabConfig.readAuthorizerCredential.userTokenSecretVersion + - api_field: gitlabConfig.readAuthorizerCredential.username + - api_field: gitlabConfig.serverVersion + - api_field: gitlabConfig.serviceDirectoryConfig.service + - api_field: gitlabConfig.sslCa + - api_field: gitlabConfig.webhookSecretSecretVersion + - api_field: installationState.actionUri + - api_field: installationState.message + - api_field: installationState.stage + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: reconciling + - api_field: updateTime diff --git a/google/services/cloudbuildv2/resource_cloudbuildv2_repository_generated_meta.yaml b/google/services/cloudbuildv2/resource_cloudbuildv2_repository_generated_meta.yaml index e37ae6e4dd8..a3b12e41a93 100644 --- a/google/services/cloudbuildv2/resource_cloudbuildv2_repository_generated_meta.yaml +++ b/google/services/cloudbuildv2/resource_cloudbuildv2_repository_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_cloudbuildv2_repository' -generation_type: 'mmv1' -source_file: 'products/cloudbuildv2/Repository.yaml' -api_service_name: 'cloudbuild.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Repository' +resource: google_cloudbuildv2_repository +generation_type: mmv1 +source_file: products/cloudbuildv2/Repository.yaml +api_service_name: cloudbuild.googleapis.com +api_version: v2 +api_resource_type_kind: Repository fields: - - api_field: 'annotations' - - api_field: 'createTime' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent_connection' - provider_only: true - - api_field: 'remoteUri' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - field: effective_annotations + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: name + - field: parent_connection + provider_only: true + - api_field: remoteUri + - api_field: updateTime diff --git a/google/services/clouddeploy/iam_clouddeploy_custom_target_type_generated_test.go b/google/services/clouddeploy/iam_clouddeploy_custom_target_type_generated_test.go index bc596af3be6..0d14733ca58 100644 --- a/google/services/clouddeploy/iam_clouddeploy_custom_target_type_generated_test.go +++ b/google/services/clouddeploy/iam_clouddeploy_custom_target_type_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccClouddeployCustomTargetTypeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_custom_target_type_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-custom-target-type%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployCustomTargetTypeIAMBindingStateID("google_clouddeploy_custom_target_type_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccClouddeployCustomTargetTypeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_custom_target_type_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-custom-target-type%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployCustomTargetTypeIAMBindingStateID("google_clouddeploy_custom_target_type_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccClouddeployCustomTargetTypeIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_custom_target_type_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-custom-target-type%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployCustomTargetTypeIAMMemberStateID("google_clouddeploy_custom_target_type_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccClouddeployCustomTargetTypeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_custom_target_type_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-custom-target-type%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployCustomTargetTypeIAMPolicyStateID("google_clouddeploy_custom_target_type_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccClouddeployCustomTargetTypeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_custom_target_type_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-custom-target-type%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployCustomTargetTypeIAMPolicyStateID("google_clouddeploy_custom_target_type_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -300,3 +301,57 @@ resource "google_clouddeploy_custom_target_type_iam_binding" "foo" { } `, context) } + +func generateClouddeployCustomTargetTypeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateClouddeployCustomTargetTypeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateClouddeployCustomTargetTypeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/customTargetTypes/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/clouddeploy/iam_clouddeploy_delivery_pipeline_generated_test.go b/google/services/clouddeploy/iam_clouddeploy_delivery_pipeline_generated_test.go index 03c091356b8..ad9355adbdf 100644 --- a/google/services/clouddeploy/iam_clouddeploy_delivery_pipeline_generated_test.go +++ b/google/services/clouddeploy/iam_clouddeploy_delivery_pipeline_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccClouddeployDeliveryPipelineIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_delivery_pipeline_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-delivery-pipeline%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployDeliveryPipelineIAMBindingStateID("google_clouddeploy_delivery_pipeline_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccClouddeployDeliveryPipelineIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_delivery_pipeline_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-delivery-pipeline%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployDeliveryPipelineIAMBindingStateID("google_clouddeploy_delivery_pipeline_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccClouddeployDeliveryPipelineIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_delivery_pipeline_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-delivery-pipeline%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployDeliveryPipelineIAMMemberStateID("google_clouddeploy_delivery_pipeline_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccClouddeployDeliveryPipelineIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_delivery_pipeline_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-delivery-pipeline%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployDeliveryPipelineIAMPolicyStateID("google_clouddeploy_delivery_pipeline_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccClouddeployDeliveryPipelineIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_delivery_pipeline_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-delivery-pipeline%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployDeliveryPipelineIAMPolicyStateID("google_clouddeploy_delivery_pipeline_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -265,3 +266,57 @@ resource "google_clouddeploy_delivery_pipeline_iam_binding" "foo" { } `, context) } + +func generateClouddeployDeliveryPipelineIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateClouddeployDeliveryPipelineIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateClouddeployDeliveryPipelineIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/deliveryPipelines/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/clouddeploy/iam_clouddeploy_target_generated_test.go b/google/services/clouddeploy/iam_clouddeploy_target_generated_test.go index 8bb458411df..718f4e75057 100644 --- a/google/services/clouddeploy/iam_clouddeploy_target_generated_test.go +++ b/google/services/clouddeploy/iam_clouddeploy_target_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccClouddeployTargetIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_target_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/targets/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-target%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployTargetIAMBindingStateID("google_clouddeploy_target_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccClouddeployTargetIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_target_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/targets/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-target%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployTargetIAMBindingStateID("google_clouddeploy_target_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccClouddeployTargetIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_target_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/targets/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-target%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployTargetIAMMemberStateID("google_clouddeploy_target_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccClouddeployTargetIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_target_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/targets/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-target%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployTargetIAMPolicyStateID("google_clouddeploy_target_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccClouddeployTargetIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_clouddeploy_target_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/targets/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cd-target%s", context["random_suffix"])), + ImportStateIdFunc: generateClouddeployTargetIAMPolicyStateID("google_clouddeploy_target_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -235,3 +236,57 @@ resource "google_clouddeploy_target_iam_binding" "foo" { } `, context) } + +func generateClouddeployTargetIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/targets/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateClouddeployTargetIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/targets/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateClouddeployTargetIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/targets/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/clouddeploy/resource_clouddeploy_automation_generated_meta.yaml b/google/services/clouddeploy/resource_clouddeploy_automation_generated_meta.yaml index 7a77c647442..042261a7d88 100644 --- a/google/services/clouddeploy/resource_clouddeploy_automation_generated_meta.yaml +++ b/google/services/clouddeploy/resource_clouddeploy_automation_generated_meta.yaml @@ -1,50 +1,50 @@ -resource: 'google_clouddeploy_automation' -generation_type: 'mmv1' -source_file: 'products/clouddeploy/Automation.yaml' -api_service_name: 'clouddeploy.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Automation' +resource: google_clouddeploy_automation +generation_type: mmv1 +source_file: products/clouddeploy/Automation.yaml +api_service_name: clouddeploy.googleapis.com +api_version: v1 +api_resource_type_kind: Automation fields: - - api_field: 'annotations' - - api_field: 'createTime' - - field: 'delivery_pipeline' - provider_only: true - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'rules.advanceRolloutRule.id' - - api_field: 'rules.advanceRolloutRule.sourcePhases' - - api_field: 'rules.advanceRolloutRule.wait' - - api_field: 'rules.promoteReleaseRule.destinationPhase' - - api_field: 'rules.promoteReleaseRule.destinationTargetId' - - api_field: 'rules.promoteReleaseRule.id' - - api_field: 'rules.promoteReleaseRule.wait' - - api_field: 'rules.repairRolloutRule.id' - - api_field: 'rules.repairRolloutRule.jobs' - - api_field: 'rules.repairRolloutRule.phases' - - api_field: 'rules.repairRolloutRule.repairPhases.retry.attempts' - - api_field: 'rules.repairRolloutRule.repairPhases.retry.backoffMode' - - api_field: 'rules.repairRolloutRule.repairPhases.retry.wait' - - api_field: 'rules.repairRolloutRule.repairPhases.rollback.destinationPhase' - - api_field: 'rules.repairRolloutRule.repairPhases.rollback.disableRollbackIfRolloutPending' - - api_field: 'rules.timedPromoteReleaseRule.destinationPhase' - - api_field: 'rules.timedPromoteReleaseRule.destinationTargetId' - - api_field: 'rules.timedPromoteReleaseRule.id' - - api_field: 'rules.timedPromoteReleaseRule.schedule' - - api_field: 'rules.timedPromoteReleaseRule.timeZone' - - api_field: 'selector.targets.id' - - api_field: 'selector.targets.labels' - - api_field: 'serviceAccount' - - api_field: 'suspended' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - field: delivery_pipeline + provider_only: true + - api_field: description + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: rules.advanceRolloutRule.id + - api_field: rules.advanceRolloutRule.sourcePhases + - api_field: rules.advanceRolloutRule.wait + - api_field: rules.promoteReleaseRule.destinationPhase + - api_field: rules.promoteReleaseRule.destinationTargetId + - api_field: rules.promoteReleaseRule.id + - api_field: rules.promoteReleaseRule.wait + - api_field: rules.repairRolloutRule.id + - api_field: rules.repairRolloutRule.jobs + - api_field: rules.repairRolloutRule.phases + - api_field: rules.repairRolloutRule.repairPhases.retry.attempts + - api_field: rules.repairRolloutRule.repairPhases.retry.backoffMode + - api_field: rules.repairRolloutRule.repairPhases.retry.wait + - api_field: rules.repairRolloutRule.repairPhases.rollback.destinationPhase + - api_field: rules.repairRolloutRule.repairPhases.rollback.disableRollbackIfRolloutPending + - api_field: rules.timedPromoteReleaseRule.destinationPhase + - api_field: rules.timedPromoteReleaseRule.destinationTargetId + - api_field: rules.timedPromoteReleaseRule.id + - api_field: rules.timedPromoteReleaseRule.schedule + - api_field: rules.timedPromoteReleaseRule.timeZone + - api_field: selector.targets.id + - api_field: selector.targets.labels + - api_field: serviceAccount + - api_field: suspended + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/clouddeploy/resource_clouddeploy_custom_target_type_generated_meta.yaml b/google/services/clouddeploy/resource_clouddeploy_custom_target_type_generated_meta.yaml index 49d195f693e..3ba0dbc699e 100644 --- a/google/services/clouddeploy/resource_clouddeploy_custom_target_type_generated_meta.yaml +++ b/google/services/clouddeploy/resource_clouddeploy_custom_target_type_generated_meta.yaml @@ -1,36 +1,36 @@ -resource: 'google_clouddeploy_custom_target_type' -generation_type: 'mmv1' -source_file: 'products/clouddeploy/CustomTargetType.yaml' -api_service_name: 'clouddeploy.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CustomTargetType' +resource: google_clouddeploy_custom_target_type +generation_type: mmv1 +source_file: products/clouddeploy/CustomTargetType.yaml +api_service_name: clouddeploy.googleapis.com +api_version: v1 +api_resource_type_kind: CustomTargetType fields: - - api_field: 'annotations' - - api_field: 'createTime' - - api_field: 'customActions.deployAction' - - api_field: 'customActions.includeSkaffoldModules.configs' - - api_field: 'customActions.includeSkaffoldModules.git.path' - - api_field: 'customActions.includeSkaffoldModules.git.ref' - - api_field: 'customActions.includeSkaffoldModules.git.repo' - - api_field: 'customActions.includeSkaffoldModules.googleCloudBuildRepo.path' - - api_field: 'customActions.includeSkaffoldModules.googleCloudBuildRepo.ref' - - api_field: 'customActions.includeSkaffoldModules.googleCloudBuildRepo.repository' - - api_field: 'customActions.includeSkaffoldModules.googleCloudStorage.path' - - api_field: 'customActions.includeSkaffoldModules.googleCloudStorage.source' - - api_field: 'customActions.renderAction' - - api_field: 'customTargetTypeId' - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - api_field: customActions.deployAction + - api_field: customActions.includeSkaffoldModules.configs + - api_field: customActions.includeSkaffoldModules.git.path + - api_field: customActions.includeSkaffoldModules.git.ref + - api_field: customActions.includeSkaffoldModules.git.repo + - api_field: customActions.includeSkaffoldModules.googleCloudBuildRepo.path + - api_field: customActions.includeSkaffoldModules.googleCloudBuildRepo.ref + - api_field: customActions.includeSkaffoldModules.googleCloudBuildRepo.repository + - api_field: customActions.includeSkaffoldModules.googleCloudStorage.path + - api_field: customActions.includeSkaffoldModules.googleCloudStorage.source + - api_field: customActions.renderAction + - api_field: customTargetTypeId + - api_field: description + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/clouddeploy/resource_clouddeploy_deploy_policy_generated_meta.yaml b/google/services/clouddeploy/resource_clouddeploy_deploy_policy_generated_meta.yaml index 94fc13119d9..1538b21b03c 100644 --- a/google/services/clouddeploy/resource_clouddeploy_deploy_policy_generated_meta.yaml +++ b/google/services/clouddeploy/resource_clouddeploy_deploy_policy_generated_meta.yaml @@ -1,56 +1,56 @@ -resource: 'google_clouddeploy_deploy_policy' -generation_type: 'mmv1' -source_file: 'products/clouddeploy/DeployPolicy.yaml' -api_service_name: 'clouddeploy.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DeployPolicy' +resource: google_clouddeploy_deploy_policy +generation_type: mmv1 +source_file: products/clouddeploy/DeployPolicy.yaml +api_service_name: clouddeploy.googleapis.com +api_version: v1 +api_resource_type_kind: DeployPolicy fields: - - api_field: 'annotations' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'rules.rolloutRestriction.actions' - - api_field: 'rules.rolloutRestriction.id' - - api_field: 'rules.rolloutRestriction.invokers' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.endDate.day' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.endDate.month' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.endDate.year' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.hours' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.minutes' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.nanos' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.seconds' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.startDate.day' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.startDate.month' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.startDate.year' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.hours' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.minutes' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.nanos' - - api_field: 'rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.seconds' - - api_field: 'rules.rolloutRestriction.timeWindows.timeZone' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.daysOfWeek' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.hours' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.minutes' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.nanos' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.seconds' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.hours' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.minutes' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.nanos' - - api_field: 'rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.seconds' - - api_field: 'selectors.deliveryPipeline.id' - - api_field: 'selectors.deliveryPipeline.labels' - - api_field: 'selectors.target.id' - - api_field: 'selectors.target.labels' - - api_field: 'suspended' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - api_field: description + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: rules.rolloutRestriction.actions + - api_field: rules.rolloutRestriction.id + - api_field: rules.rolloutRestriction.invokers + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.endDate.day + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.endDate.month + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.endDate.year + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.hours + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.minutes + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.nanos + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.endTime.seconds + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.startDate.day + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.startDate.month + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.startDate.year + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.hours + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.minutes + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.nanos + - api_field: rules.rolloutRestriction.timeWindows.oneTimeWindows.startTime.seconds + - api_field: rules.rolloutRestriction.timeWindows.timeZone + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.daysOfWeek + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.hours + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.minutes + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.nanos + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.endTime.seconds + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.hours + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.minutes + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.nanos + - api_field: rules.rolloutRestriction.timeWindows.weeklyWindows.startTime.seconds + - api_field: selectors.deliveryPipeline.id + - api_field: selectors.deliveryPipeline.labels + - api_field: selectors.target.id + - api_field: selectors.target.labels + - api_field: suspended + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/clouddomains/resource_clouddomains_registration_generated_meta.yaml b/google/services/clouddomains/resource_clouddomains_registration_generated_meta.yaml index e4a37fdb098..b4442b974d0 100644 --- a/google/services/clouddomains/resource_clouddomains_registration_generated_meta.yaml +++ b/google/services/clouddomains/resource_clouddomains_registration_generated_meta.yaml @@ -1,68 +1,68 @@ -resource: 'google_clouddomains_registration' -generation_type: 'mmv1' -source_file: 'products/clouddomains/Registration.yaml' -api_service_name: 'domains.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Registration' +resource: google_clouddomains_registration +generation_type: mmv1 +source_file: products/clouddomains/Registration.yaml +api_service_name: domains.googleapis.com +api_version: v1 +api_resource_type_kind: Registration fields: - - api_field: 'contactNotices' - - api_field: 'contactSettings.adminContact.email' - - api_field: 'contactSettings.adminContact.faxNumber' - - api_field: 'contactSettings.adminContact.phoneNumber' - - api_field: 'contactSettings.adminContact.postalAddress.addressLines' - - api_field: 'contactSettings.adminContact.postalAddress.administrativeArea' - - api_field: 'contactSettings.adminContact.postalAddress.locality' - - api_field: 'contactSettings.adminContact.postalAddress.organization' - - api_field: 'contactSettings.adminContact.postalAddress.postalCode' - - api_field: 'contactSettings.adminContact.postalAddress.recipients' - - api_field: 'contactSettings.adminContact.postalAddress.regionCode' - - api_field: 'contactSettings.privacy' - - api_field: 'contactSettings.registrantContact.email' - - api_field: 'contactSettings.registrantContact.faxNumber' - - api_field: 'contactSettings.registrantContact.phoneNumber' - - api_field: 'contactSettings.registrantContact.postalAddress.addressLines' - - api_field: 'contactSettings.registrantContact.postalAddress.administrativeArea' - - api_field: 'contactSettings.registrantContact.postalAddress.locality' - - api_field: 'contactSettings.registrantContact.postalAddress.organization' - - api_field: 'contactSettings.registrantContact.postalAddress.postalCode' - - api_field: 'contactSettings.registrantContact.postalAddress.recipients' - - api_field: 'contactSettings.registrantContact.postalAddress.regionCode' - - api_field: 'contactSettings.technicalContact.email' - - api_field: 'contactSettings.technicalContact.faxNumber' - - api_field: 'contactSettings.technicalContact.phoneNumber' - - api_field: 'contactSettings.technicalContact.postalAddress.addressLines' - - api_field: 'contactSettings.technicalContact.postalAddress.administrativeArea' - - api_field: 'contactSettings.technicalContact.postalAddress.locality' - - api_field: 'contactSettings.technicalContact.postalAddress.organization' - - api_field: 'contactSettings.technicalContact.postalAddress.postalCode' - - api_field: 'contactSettings.technicalContact.postalAddress.recipients' - - api_field: 'contactSettings.technicalContact.postalAddress.regionCode' - - api_field: 'createTime' - - api_field: 'dnsSettings.customDns.dsRecords.algorithm' - - api_field: 'dnsSettings.customDns.dsRecords.digest' - - api_field: 'dnsSettings.customDns.dsRecords.digestType' - - api_field: 'dnsSettings.customDns.dsRecords.keyTag' - - api_field: 'dnsSettings.customDns.nameServers' - - api_field: 'dnsSettings.glueRecords.hostName' - - api_field: 'dnsSettings.glueRecords.ipv4Addresses' - - api_field: 'dnsSettings.glueRecords.ipv6Addresses' - - api_field: 'domainName' - - api_field: 'domainNotices' - - field: 'effective_labels' - provider_only: true - - api_field: 'expireTime' - - api_field: 'issues' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'managementSettings.preferredRenewalMethod' - - api_field: 'managementSettings.renewalMethod' - - api_field: 'managementSettings.transferLockState' - - api_field: 'name' - - api_field: 'registerFailureReason' - - api_field: 'state' - - api_field: 'supportedPrivacy' - - field: 'terraform_labels' - provider_only: true - - api_field: 'yearlyPrice.currencyCode' - - api_field: 'yearlyPrice.units' + - api_field: contactNotices + - api_field: contactSettings.adminContact.email + - api_field: contactSettings.adminContact.faxNumber + - api_field: contactSettings.adminContact.phoneNumber + - api_field: contactSettings.adminContact.postalAddress.addressLines + - api_field: contactSettings.adminContact.postalAddress.administrativeArea + - api_field: contactSettings.adminContact.postalAddress.locality + - api_field: contactSettings.adminContact.postalAddress.organization + - api_field: contactSettings.adminContact.postalAddress.postalCode + - api_field: contactSettings.adminContact.postalAddress.recipients + - api_field: contactSettings.adminContact.postalAddress.regionCode + - api_field: contactSettings.privacy + - api_field: contactSettings.registrantContact.email + - api_field: contactSettings.registrantContact.faxNumber + - api_field: contactSettings.registrantContact.phoneNumber + - api_field: contactSettings.registrantContact.postalAddress.addressLines + - api_field: contactSettings.registrantContact.postalAddress.administrativeArea + - api_field: contactSettings.registrantContact.postalAddress.locality + - api_field: contactSettings.registrantContact.postalAddress.organization + - api_field: contactSettings.registrantContact.postalAddress.postalCode + - api_field: contactSettings.registrantContact.postalAddress.recipients + - api_field: contactSettings.registrantContact.postalAddress.regionCode + - api_field: contactSettings.technicalContact.email + - api_field: contactSettings.technicalContact.faxNumber + - api_field: contactSettings.technicalContact.phoneNumber + - api_field: contactSettings.technicalContact.postalAddress.addressLines + - api_field: contactSettings.technicalContact.postalAddress.administrativeArea + - api_field: contactSettings.technicalContact.postalAddress.locality + - api_field: contactSettings.technicalContact.postalAddress.organization + - api_field: contactSettings.technicalContact.postalAddress.postalCode + - api_field: contactSettings.technicalContact.postalAddress.recipients + - api_field: contactSettings.technicalContact.postalAddress.regionCode + - api_field: createTime + - api_field: dnsSettings.customDns.dsRecords.algorithm + - api_field: dnsSettings.customDns.dsRecords.digest + - api_field: dnsSettings.customDns.dsRecords.digestType + - api_field: dnsSettings.customDns.dsRecords.keyTag + - api_field: dnsSettings.customDns.nameServers + - api_field: dnsSettings.glueRecords.hostName + - api_field: dnsSettings.glueRecords.ipv4Addresses + - api_field: dnsSettings.glueRecords.ipv6Addresses + - api_field: domainName + - api_field: domainNotices + - field: effective_labels + provider_only: true + - api_field: expireTime + - api_field: issues + - api_field: labels + - field: location + provider_only: true + - api_field: managementSettings.preferredRenewalMethod + - api_field: managementSettings.renewalMethod + - api_field: managementSettings.transferLockState + - api_field: name + - api_field: registerFailureReason + - api_field: state + - api_field: supportedPrivacy + - field: terraform_labels + provider_only: true + - api_field: yearlyPrice.currencyCode + - api_field: yearlyPrice.units diff --git a/google/services/cloudfunctions/iam_cloudfunctions_function_generated_test.go b/google/services/cloudfunctions/iam_cloudfunctions_function_generated_test.go index 5d5d88b66b0..c575614a4f2 100644 --- a/google/services/cloudfunctions/iam_cloudfunctions_function_generated_test.go +++ b/google/services/cloudfunctions/iam_cloudfunctions_function_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccCloudFunctionsCloudFunctionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions_function_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-function%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudFunctionsCloudFunctionIAMBindingStateID("google_cloudfunctions_function_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccCloudFunctionsCloudFunctionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions_function_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-function%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudFunctionsCloudFunctionIAMBindingStateID("google_cloudfunctions_function_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccCloudFunctionsCloudFunctionIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions_function_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-function%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudFunctionsCloudFunctionIAMMemberStateID("google_cloudfunctions_function_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccCloudFunctionsCloudFunctionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions_function_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-function%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudFunctionsCloudFunctionIAMPolicyStateID("google_cloudfunctions_function_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccCloudFunctionsCloudFunctionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions_function_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-function%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudFunctionsCloudFunctionIAMPolicyStateID("google_cloudfunctions_function_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -333,3 +334,57 @@ resource "google_cloudfunctions_function_iam_binding" "foo" { } `, context) } + +func generateCloudFunctionsCloudFunctionIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + cloud_function := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_function"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/functions/%s", project, region, cloud_function), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudFunctionsCloudFunctionIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + cloud_function := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_function"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/functions/%s", project, region, cloud_function), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudFunctionsCloudFunctionIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + cloud_function := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_function"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/functions/%s", project, region, cloud_function), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudfunctions2/iam_cloudfunctions2_function_generated_test.go b/google/services/cloudfunctions2/iam_cloudfunctions2_function_generated_test.go index 49086d22f85..f01dae874f2 100644 --- a/google/services/cloudfunctions2/iam_cloudfunctions2_function_generated_test.go +++ b/google/services/cloudfunctions2/iam_cloudfunctions2_function_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -59,7 +60,7 @@ func TestAccCloudfunctions2functionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions2_function_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-function-v2%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudfunctions2functionIAMBindingStateID("google_cloudfunctions2_function_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -69,7 +70,7 @@ func TestAccCloudfunctions2functionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions2_function_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-function-v2%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudfunctions2functionIAMBindingStateID("google_cloudfunctions2_function_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -99,7 +100,7 @@ func TestAccCloudfunctions2functionIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions2_function_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-function-v2%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudfunctions2functionIAMMemberStateID("google_cloudfunctions2_function_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccCloudfunctions2functionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions2_function_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-function-v2%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudfunctions2functionIAMPolicyStateID("google_cloudfunctions2_function_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -138,7 +139,7 @@ func TestAccCloudfunctions2functionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloudfunctions2_function_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/functions/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-function-v2%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudfunctions2functionIAMPolicyStateID("google_cloudfunctions2_function_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -417,3 +418,57 @@ resource "google_cloudfunctions2_function_iam_binding" "foo" { } `, context) } + +func generateCloudfunctions2functionIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + cloud_function := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_function"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/functions/%s", project, location, cloud_function), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudfunctions2functionIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + cloud_function := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_function"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/functions/%s", project, location, cloud_function), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudfunctions2functionIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + cloud_function := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_function"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/functions/%s", project, location, cloud_function), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudfunctions2/resource_cloudfunctions2_function_generated_meta.yaml b/google/services/cloudfunctions2/resource_cloudfunctions2_function_generated_meta.yaml index ddd2821bd31..c9f9fc03851 100644 --- a/google/services/cloudfunctions2/resource_cloudfunctions2_function_generated_meta.yaml +++ b/google/services/cloudfunctions2/resource_cloudfunctions2_function_generated_meta.yaml @@ -1,74 +1,74 @@ -resource: 'google_cloudfunctions2_function' -generation_type: 'mmv1' -source_file: 'products/cloudfunctions2/Function.yaml' -api_service_name: 'cloudfunctions.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Function' +resource: google_cloudfunctions2_function +generation_type: mmv1 +source_file: products/cloudfunctions2/Function.yaml +api_service_name: cloudfunctions.googleapis.com +api_version: v2 +api_resource_type_kind: Function fields: - - api_field: 'buildConfig.automaticUpdatePolicy' - - api_field: 'buildConfig.build' - - api_field: 'buildConfig.dockerRepository' - - api_field: 'buildConfig.entryPoint' - - api_field: 'buildConfig.environmentVariables' - - api_field: 'buildConfig.onDeployUpdatePolicy.runtimeVersion' - - api_field: 'buildConfig.runtime' - - api_field: 'buildConfig.serviceAccount' - - api_field: 'buildConfig.source.repoSource.branchName' - - api_field: 'buildConfig.source.repoSource.commitSha' - - api_field: 'buildConfig.source.repoSource.dir' - - api_field: 'buildConfig.source.repoSource.invertRegex' - - api_field: 'buildConfig.source.repoSource.projectId' - - api_field: 'buildConfig.source.repoSource.repoName' - - api_field: 'buildConfig.source.repoSource.tagName' - - api_field: 'buildConfig.source.storageSource.bucket' - - api_field: 'buildConfig.source.storageSource.generation' - - api_field: 'buildConfig.source.storageSource.object' - - api_field: 'buildConfig.workerPool' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'environment' - - api_field: 'eventTrigger.eventFilters.attribute' - - api_field: 'eventTrigger.eventFilters.operator' - - api_field: 'eventTrigger.eventFilters.value' - - api_field: 'eventTrigger.eventType' - - api_field: 'eventTrigger.pubsubTopic' - - api_field: 'eventTrigger.retryPolicy' - - api_field: 'eventTrigger.serviceAccountEmail' - - api_field: 'eventTrigger.trigger' - - api_field: 'eventTrigger.triggerRegion' - - api_field: 'kmsKeyName' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'serviceConfig.allTrafficOnLatestRevision' - - api_field: 'serviceConfig.availableCpu' - - api_field: 'serviceConfig.availableMemory' - - api_field: 'serviceConfig.binaryAuthorizationPolicy' - - api_field: 'serviceConfig.environmentVariables' - - api_field: 'serviceConfig.gcfUri' - - api_field: 'serviceConfig.ingressSettings' - - api_field: 'serviceConfig.maxInstanceCount' - - api_field: 'serviceConfig.maxInstanceRequestConcurrency' - - api_field: 'serviceConfig.minInstanceCount' - - api_field: 'serviceConfig.secretEnvironmentVariables.key' - - api_field: 'serviceConfig.secretEnvironmentVariables.projectId' - - api_field: 'serviceConfig.secretEnvironmentVariables.secret' - - api_field: 'serviceConfig.secretEnvironmentVariables.version' - - api_field: 'serviceConfig.secretVolumes.mountPath' - - api_field: 'serviceConfig.secretVolumes.projectId' - - api_field: 'serviceConfig.secretVolumes.secret' - - api_field: 'serviceConfig.secretVolumes.versions.path' - - api_field: 'serviceConfig.secretVolumes.versions.version' - - api_field: 'serviceConfig.service' - - api_field: 'serviceConfig.serviceAccountEmail' - - api_field: 'serviceConfig.timeoutSeconds' - - api_field: 'serviceConfig.uri' - - api_field: 'serviceConfig.vpcConnector' - - api_field: 'serviceConfig.vpcConnectorEgressSettings' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'url' + - api_field: buildConfig.automaticUpdatePolicy + - api_field: buildConfig.build + - api_field: buildConfig.dockerRepository + - api_field: buildConfig.entryPoint + - api_field: buildConfig.environmentVariables + - api_field: buildConfig.onDeployUpdatePolicy.runtimeVersion + - api_field: buildConfig.runtime + - api_field: buildConfig.serviceAccount + - api_field: buildConfig.source.repoSource.branchName + - api_field: buildConfig.source.repoSource.commitSha + - api_field: buildConfig.source.repoSource.dir + - api_field: buildConfig.source.repoSource.invertRegex + - api_field: buildConfig.source.repoSource.projectId + - api_field: buildConfig.source.repoSource.repoName + - api_field: buildConfig.source.repoSource.tagName + - api_field: buildConfig.source.storageSource.bucket + - api_field: buildConfig.source.storageSource.generation + - api_field: buildConfig.source.storageSource.object + - api_field: buildConfig.workerPool + - api_field: description + - field: effective_labels + provider_only: true + - api_field: environment + - api_field: eventTrigger.eventFilters.attribute + - api_field: eventTrigger.eventFilters.operator + - api_field: eventTrigger.eventFilters.value + - api_field: eventTrigger.eventType + - api_field: eventTrigger.pubsubTopic + - api_field: eventTrigger.retryPolicy + - api_field: eventTrigger.serviceAccountEmail + - api_field: eventTrigger.trigger + - api_field: eventTrigger.triggerRegion + - api_field: kmsKeyName + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: serviceConfig.allTrafficOnLatestRevision + - api_field: serviceConfig.availableCpu + - api_field: serviceConfig.availableMemory + - api_field: serviceConfig.binaryAuthorizationPolicy + - api_field: serviceConfig.environmentVariables + - api_field: serviceConfig.gcfUri + - api_field: serviceConfig.ingressSettings + - api_field: serviceConfig.maxInstanceCount + - api_field: serviceConfig.maxInstanceRequestConcurrency + - api_field: serviceConfig.minInstanceCount + - api_field: serviceConfig.secretEnvironmentVariables.key + - api_field: serviceConfig.secretEnvironmentVariables.projectId + - api_field: serviceConfig.secretEnvironmentVariables.secret + - api_field: serviceConfig.secretEnvironmentVariables.version + - api_field: serviceConfig.secretVolumes.mountPath + - api_field: serviceConfig.secretVolumes.projectId + - api_field: serviceConfig.secretVolumes.secret + - api_field: serviceConfig.secretVolumes.versions.path + - api_field: serviceConfig.secretVolumes.versions.version + - api_field: serviceConfig.service + - api_field: serviceConfig.serviceAccountEmail + - api_field: serviceConfig.timeoutSeconds + - api_field: serviceConfig.uri + - api_field: serviceConfig.vpcConnector + - api_field: serviceConfig.vpcConnectorEgressSettings + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: url diff --git a/google/services/cloudidentity/data_source_cloud_identity_policies.go b/google/services/cloudidentity/data_source_cloud_identity_policies.go new file mode 100644 index 00000000000..52fccfc289c --- /dev/null +++ b/google/services/cloudidentity/data_source_cloud_identity_policies.go @@ -0,0 +1,186 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/cloudidentity/data_source_cloud_identity_policies.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package cloudidentity + +import ( + "encoding/json" + "fmt" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func DataSourceGoogleCloudIdentityPolicies() *schema.Resource { + return &schema.Resource{ + Read: dataSourceGoogleCloudIdentityPoliciesRead, + Schema: map[string]*schema.Schema{ + "filter": { + Type: schema.TypeString, + Optional: true, + Description: `Filter expression for listing policies, as documented in the Cloud Identity Policy API policies.list method`, + }, + "policies": { + Type: schema.TypeList, + Computed: true, + Description: `List of Cloud Identity policies that match the filter (or all policies if no filter is provided).`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + Description: `The resource name of the policy.`, + }, + "customer": { + Type: schema.TypeString, + Computed: true, + Description: `The customer that the policy belongs to.`, + }, + "policy_query": { + Type: schema.TypeList, + Computed: true, + Description: `The CEL query that defines which entities the policy applies to.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "query": { + Type: schema.TypeString, + Computed: true, + Description: "The query that defines which entities the policy applies to.", + }, + "group": { + Type: schema.TypeString, + Computed: true, + Description: "The group that the policy applies to.", + }, + "org_unit": { + Type: schema.TypeString, + Computed: true, + Description: "The org unit that the policy applies to.", + }, + "sort_order": { + Type: schema.TypeFloat, + Computed: true, + Description: "The sort order of the policy.", + }, + }, + }, + }, + "setting": { + Type: schema.TypeString, + Computed: true, + Description: `The setting configured by this policy.`, + }, + "type": { + Type: schema.TypeString, + Computed: true, + Description: `The type of the policy.`, + }, + }, + }, + }, + }, + } +} + +func dataSourceGoogleCloudIdentityPoliciesRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + policiesListCall := config.NewCloudIdentityClient(userAgent).Policies.List() + + if filter, ok := d.GetOk("filter"); ok { + policiesListCall = policiesListCall.Filter(filter.(string)) + } + + if config.UserProjectOverride { + billingProject := "" + // err may be nil - project isn't required for this resource + if project, err := tpgresource.GetProject(d, config); err == nil { + billingProject = project + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + if billingProject != "" { + policiesListCall.Header().Set("X-Goog-User-Project", billingProject) + } + } + + var allPolicies []map[string]interface{} + + for { + resp, err := policiesListCall.Do() + if err != nil { + return transport_tpg.HandleDataSourceNotFoundError(err, d, "CloudIdentityListPolicies", "Policies") + } + + if resp.Policies != nil { + for _, p := range resp.Policies { + policyMap := map[string]interface{}{ + "name": p.Name, + "customer": p.Customer, + } + + if p.PolicyQuery != nil { + pq := map[string]interface{}{ + "query": p.PolicyQuery.Query, + "group": p.PolicyQuery.Group, + "org_unit": p.PolicyQuery.OrgUnit, + "sort_order": p.PolicyQuery.SortOrder, + } + policyMap["policy_query"] = []interface{}{pq} + } + + if p.Setting != nil { + settingBytes, err := json.Marshal(p.Setting) + if err != nil { + return fmt.Errorf("error marshalling policy setting: %s", err) + } + policyMap["setting"] = string(settingBytes) + } + + policyMap["type"] = p.Type + + allPolicies = append(allPolicies, policyMap) + } + } + + if resp.NextPageToken == "" { + break + } + + policiesListCall = policiesListCall.PageToken(resp.NextPageToken) + } + + if err := d.Set("policies", allPolicies); err != nil { + return fmt.Errorf("error setting policies: %s", err) + } + + if filter, ok := d.GetOk("filter"); ok { + d.SetId(fmt.Sprintf("cloud-identity-policies-%s", filter.(string))) + } else { + d.SetId(fmt.Sprintf("cloud-identity-policies-%d", len(allPolicies))) + } + + return nil +} diff --git a/google/services/cloudidentity/data_source_cloud_identity_policies_test.go b/google/services/cloudidentity/data_source_cloud_identity_policies_test.go new file mode 100644 index 00000000000..10e54bb40c5 --- /dev/null +++ b/google/services/cloudidentity/data_source_cloud_identity_policies_test.go @@ -0,0 +1,68 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/cloudidentity/data_source_cloud_identity_policies_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package cloudidentity_test + +import ( + "context" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-google/google/acctest" + "google.golang.org/api/cloudidentity/v1" +) + +// This test uses the ListPolicies API directly in the precheck to ensure that +// the Cloud Identity Policies API is reachable and that at least one policy +// exists. Once CreatePolicy becomes GA and is supported, this test can be +// updated to create a dedicated policy instead. +func TestAccDataSourceGoogleCloudIdentityPolicies(t *testing.T) { + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { + acctest.AccTestPreCheck(t) + + ctx := context.Background() + ci, err := cloudidentity.NewService(ctx) + if err != nil { + t.Skipf("Cloud Identity service not available in this env: %v", err) + } + lst, err := ci.Policies.List().Context(ctx).PageSize(1).Do() + if err != nil { + t.Skipf("Cloud Identity Policies API not accessible in this env: %v", err) + } + if lst == nil || len(lst.Policies) == 0 { + t.Skip("No Cloud Identity policies found in this customer; skipping data source test.") + } + }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: ` + data "google_cloud_identity_policies" "test" { + } + `, + Check: resource.ComposeTestCheckFunc( + // We know at least one policy exists from the precheck, so we can + // assert that at least the first element in the list is populated. + resource.TestCheckResourceAttrSet("data.google_cloud_identity_policies.test", "policies.#"), + resource.TestCheckResourceAttrSet("data.google_cloud_identity_policies.test", "policies.0.name"), + resource.TestCheckResourceAttrSet("data.google_cloud_identity_policies.test", "policies.0.customer"), + resource.TestCheckResourceAttrSet("data.google_cloud_identity_policies.test", "policies.0.type"), + ), + }, + }, + }) +} diff --git a/google/services/cloudidentity/resource_cloud_identity_group_generated_meta.yaml b/google/services/cloudidentity/resource_cloud_identity_group_generated_meta.yaml index 48f3da17c92..3eb96d5b1df 100644 --- a/google/services/cloudidentity/resource_cloud_identity_group_generated_meta.yaml +++ b/google/services/cloudidentity/resource_cloud_identity_group_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_cloud_identity_group' -generation_type: 'mmv1' -source_file: 'products/cloudidentity/Group.yaml' -api_service_name: 'cloudidentity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Group' +resource: google_cloud_identity_group +generation_type: mmv1 +source_file: products/cloudidentity/Group.yaml +api_service_name: cloudidentity.googleapis.com +api_version: v1 +api_resource_type_kind: Group fields: - - api_field: 'additionalGroupKeys.id' - - api_field: 'additionalGroupKeys.namespace' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'groupKey.id' - - api_field: 'groupKey.namespace' - - field: 'initial_group_config' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'parent' - - api_field: 'updateTime' + - api_field: additionalGroupKeys.id + - api_field: additionalGroupKeys.namespace + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: groupKey.id + - api_field: groupKey.namespace + - field: initial_group_config + provider_only: true + - api_field: labels + - api_field: name + - api_field: parent + - api_field: updateTime diff --git a/google/services/cloudidentity/resource_cloud_identity_group_membership_generated_meta.yaml b/google/services/cloudidentity/resource_cloud_identity_group_membership_generated_meta.yaml index dc49a1e2c94..0a831bed1d4 100644 --- a/google/services/cloudidentity/resource_cloud_identity_group_membership_generated_meta.yaml +++ b/google/services/cloudidentity/resource_cloud_identity_group_membership_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_cloud_identity_group_membership' -generation_type: 'mmv1' -source_file: 'products/cloudidentity/GroupMembership.yaml' -api_service_name: 'cloudidentity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Membership' +resource: google_cloud_identity_group_membership +generation_type: mmv1 +source_file: products/cloudidentity/GroupMembership.yaml +api_service_name: cloudidentity.googleapis.com +api_version: v1 +api_resource_type_kind: Membership fields: - - field: 'create_ignore_already_exists' - provider_only: true - - api_field: 'createTime' - - field: 'group' - provider_only: true - - api_field: 'name' - - api_field: 'preferredMemberKey.id' - - api_field: 'preferredMemberKey.namespace' - - api_field: 'roles.expiryDetail.expireTime' - - api_field: 'roles.name' - - api_field: 'type' - - api_field: 'updateTime' + - field: create_ignore_already_exists + provider_only: true + - api_field: createTime + - field: group + provider_only: true + - api_field: name + - api_field: preferredMemberKey.id + - api_field: preferredMemberKey.namespace + - api_field: roles.expiryDetail.expireTime + - api_field: roles.name + - api_field: type + - api_field: updateTime diff --git a/google/services/cloudids/resource_cloud_ids_endpoint_generated_meta.yaml b/google/services/cloudids/resource_cloud_ids_endpoint_generated_meta.yaml index 6008eef748a..8a1621edd62 100644 --- a/google/services/cloudids/resource_cloud_ids_endpoint_generated_meta.yaml +++ b/google/services/cloudids/resource_cloud_ids_endpoint_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_cloud_ids_endpoint' -generation_type: 'mmv1' -source_file: 'products/cloudids/Endpoint.yaml' -api_service_name: 'ids.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Endpoint' +resource: google_cloud_ids_endpoint +generation_type: mmv1 +source_file: products/cloudids/Endpoint.yaml +api_service_name: ids.googleapis.com +api_version: v1 +api_resource_type_kind: Endpoint fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'endpointForwardingRule' - - api_field: 'endpointIp' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'severity' - - api_field: 'threatExceptions' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: endpointForwardingRule + - api_field: endpointIp + - field: location + provider_only: true + - api_field: name + - api_field: network + - api_field: severity + - api_field: threatExceptions + - api_field: updateTime diff --git a/google/services/cloudquotas/resource_cloud_quotas_quota_preference_generated_meta.yaml b/google/services/cloudquotas/resource_cloud_quotas_quota_preference_generated_meta.yaml index f7231916d59..95b93912610 100644 --- a/google/services/cloudquotas/resource_cloud_quotas_quota_preference_generated_meta.yaml +++ b/google/services/cloudquotas/resource_cloud_quotas_quota_preference_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_cloud_quotas_quota_preference' -generation_type: 'mmv1' -source_file: 'products/cloudquotas/QuotaPreference.yaml' -api_service_name: 'cloudquotas.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'QuotaPreference' +resource: google_cloud_quotas_quota_preference +generation_type: mmv1 +source_file: products/cloudquotas/QuotaPreference.yaml +api_service_name: cloudquotas.googleapis.com +api_version: v1 +api_resource_type_kind: QuotaPreference fields: - - api_field: 'contactEmail' - - api_field: 'createTime' - - api_field: 'dimensions' - - api_field: 'etag' - - field: 'ignore_safety_checks' - provider_only: true - - api_field: 'justification' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'quotaConfig.annotations' - - api_field: 'quotaConfig.grantedValue' - - api_field: 'quotaConfig.preferredValue' - - api_field: 'quotaConfig.requestOrigin' - - api_field: 'quotaConfig.stateDetail' - - api_field: 'quotaConfig.traceId' - - api_field: 'quotaId' - - api_field: 'reconciling' - - api_field: 'service' - - api_field: 'updateTime' + - api_field: contactEmail + - api_field: createTime + - api_field: dimensions + - api_field: etag + - field: ignore_safety_checks + provider_only: true + - api_field: justification + - api_field: name + - field: parent + provider_only: true + - api_field: quotaConfig.annotations + - api_field: quotaConfig.grantedValue + - api_field: quotaConfig.preferredValue + - api_field: quotaConfig.requestOrigin + - api_field: quotaConfig.stateDetail + - api_field: quotaConfig.traceId + - api_field: quotaId + - api_field: reconciling + - api_field: service + - api_field: updateTime diff --git a/google/services/cloudrun/iam_cloud_run_service_generated_test.go b/google/services/cloudrun/iam_cloud_run_service_generated_test.go index 925a800b409..9e0a9fec6e1 100644 --- a/google/services/cloudrun/iam_cloud_run_service_generated_test.go +++ b/google/services/cloudrun/iam_cloud_run_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccCloudRunServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunServiceIAMBindingStateID("google_cloud_run_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccCloudRunServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunServiceIAMBindingStateID("google_cloud_run_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccCloudRunServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunServiceIAMMemberStateID("google_cloud_run_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccCloudRunServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunServiceIAMPolicyStateID("google_cloud_run_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccCloudRunServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunServiceIAMPolicyStateID("google_cloud_run_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -303,3 +304,57 @@ resource "google_cloud_run_service_iam_binding" "foo" { } `, context) } + +func generateCloudRunServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + service := tpgresource.GetResourceNameFromSelfLink(rawState["service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, service), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + service := tpgresource.GetResourceNameFromSelfLink(rawState["service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, service), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + service := tpgresource.GetResourceNameFromSelfLink(rawState["service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, service), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudrun/resource_cloud_run_domain_mapping_generated_meta.yaml b/google/services/cloudrun/resource_cloud_run_domain_mapping_generated_meta.yaml index dbb6531ae6c..e89576709da 100644 --- a/google/services/cloudrun/resource_cloud_run_domain_mapping_generated_meta.yaml +++ b/google/services/cloudrun/resource_cloud_run_domain_mapping_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_cloud_run_domain_mapping' -generation_type: 'mmv1' -source_file: 'products/cloudrun/DomainMapping.yaml' -api_service_name: 'run.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DomainMapping' -cai_asset_name_format: '//run.googleapis.com/projects/{{project}}/locations/{{location}}/domainmappings/{{name}}' +resource: google_cloud_run_domain_mapping +generation_type: mmv1 +source_file: products/cloudrun/DomainMapping.yaml +api_service_name: run.googleapis.com +api_version: v1 +api_resource_type_kind: DomainMapping +cai_asset_name_format: //run.googleapis.com/projects/{{project}}/locations/{{location}}/domainmappings/{{name}} fields: - - field: 'location' - provider_only: true - - api_field: 'metadata.annotations' - - field: 'metadata.effective_annotations' - provider_only: true - - field: 'metadata.effective_labels' - provider_only: true - - api_field: 'metadata.generation' - - api_field: 'metadata.labels' - - api_field: 'metadata.namespace' - - api_field: 'metadata.resourceVersion' - - api_field: 'metadata.selfLink' - - field: 'metadata.terraform_labels' - provider_only: true - - api_field: 'metadata.uid' - - field: 'name' - provider_only: true - - api_field: 'spec.certificateMode' - - api_field: 'spec.forceOverride' - - api_field: 'spec.routeName' - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.status' - - api_field: 'status.conditions.type' - - api_field: 'status.mappedRouteName' - - api_field: 'status.observedGeneration' - - api_field: 'status.resourceRecords.name' - - api_field: 'status.resourceRecords.rrdata' - - api_field: 'status.resourceRecords.type' + - field: location + provider_only: true + - api_field: metadata.annotations + - field: metadata.effective_annotations + provider_only: true + - field: metadata.effective_labels + provider_only: true + - api_field: metadata.generation + - api_field: metadata.labels + - api_field: metadata.namespace + - api_field: metadata.resourceVersion + - api_field: metadata.selfLink + - field: metadata.terraform_labels + provider_only: true + - api_field: metadata.uid + - field: name + provider_only: true + - api_field: spec.certificateMode + - api_field: spec.forceOverride + - api_field: spec.routeName + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.status + - api_field: status.conditions.type + - api_field: status.mappedRouteName + - api_field: status.observedGeneration + - api_field: status.resourceRecords.name + - api_field: status.resourceRecords.rrdata + - api_field: status.resourceRecords.type diff --git a/google/services/cloudrun/resource_cloud_run_service_generated_meta.yaml b/google/services/cloudrun/resource_cloud_run_service_generated_meta.yaml index ab35ed85435..e984d4be241 100644 --- a/google/services/cloudrun/resource_cloud_run_service_generated_meta.yaml +++ b/google/services/cloudrun/resource_cloud_run_service_generated_meta.yaml @@ -1,206 +1,206 @@ -resource: 'google_cloud_run_service' -generation_type: 'mmv1' -source_file: 'products/cloudrun/Service.yaml' -api_service_name: 'run.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' -cai_asset_name_format: '//run.googleapis.com/projects/{{project}}/locations/{{location}}/services/{{name}}' +resource: google_cloud_run_service +generation_type: mmv1 +source_file: products/cloudrun/Service.yaml +api_service_name: run.googleapis.com +api_version: v1 +api_resource_type_kind: Service +cai_asset_name_format: //run.googleapis.com/projects/{{project}}/locations/{{location}}/services/{{name}} fields: - - field: 'autogenerate_revision_name' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'metadata.annotations' - - field: 'metadata.effective_annotations' - provider_only: true - - field: 'metadata.effective_labels' - provider_only: true - - api_field: 'metadata.generation' - - api_field: 'metadata.labels' - - api_field: 'metadata.namespace' - - api_field: 'metadata.resourceVersion' - - api_field: 'metadata.selfLink' - - field: 'metadata.terraform_labels' - provider_only: true - - api_field: 'metadata.uid' - - field: 'name' - provider_only: true - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.status' - - api_field: 'status.conditions.type' - - api_field: 'status.latestCreatedRevisionName' - - api_field: 'status.latestReadyRevisionName' - - api_field: 'status.observedGeneration' - - api_field: 'status.traffic.latestRevision' - - api_field: 'status.traffic.percent' - - api_field: 'status.traffic.revisionName' - - api_field: 'status.traffic.tag' - - api_field: 'status.traffic.url' - - api_field: 'status.url' - - api_field: 'spec.template.metadata.annotations' - field: 'template.metadata.annotations' - - api_field: 'spec.template.metadata.generation' - field: 'template.metadata.generation' - - api_field: 'spec.template.metadata.labels' - field: 'template.metadata.labels' - - api_field: 'spec.template.metadata.name' - field: 'template.metadata.name' - - api_field: 'spec.template.metadata.namespace' - field: 'template.metadata.namespace' - - api_field: 'spec.template.metadata.resourceVersion' - field: 'template.metadata.resource_version' - - api_field: 'spec.template.metadata.selfLink' - field: 'template.metadata.self_link' - - api_field: 'spec.template.metadata.uid' - field: 'template.metadata.uid' - - api_field: 'spec.template.spec.containerConcurrency' - field: 'template.spec.container_concurrency' - - api_field: 'spec.template.spec.containers.args' - field: 'template.spec.containers.args' - - api_field: 'spec.template.spec.containers.command' - field: 'template.spec.containers.command' - - api_field: 'spec.template.spec.containers.env.name' - field: 'template.spec.containers.env.name' - - api_field: 'spec.template.spec.containers.env.value' - field: 'template.spec.containers.env.value' - - api_field: 'spec.template.spec.containers.env.valueFrom.secretKeyRef.key' - field: 'template.spec.containers.env.value_from.secret_key_ref.key' - - api_field: 'spec.template.spec.containers.env.valueFrom.secretKeyRef.name' - field: 'template.spec.containers.env.value_from.secret_key_ref.name' - - api_field: 'spec.template.spec.containers.envFrom.configMapRef.localObjectReference.name' - field: 'template.spec.containers.env_from.config_map_ref.local_object_reference.name' - - api_field: 'spec.template.spec.containers.envFrom.configMapRef.optional' - field: 'template.spec.containers.env_from.config_map_ref.optional' - - api_field: 'spec.template.spec.containers.envFrom.prefix' - field: 'template.spec.containers.env_from.prefix' - - api_field: 'spec.template.spec.containers.envFrom.secretRef.localObjectReference.name' - field: 'template.spec.containers.env_from.secret_ref.local_object_reference.name' - - api_field: 'spec.template.spec.containers.envFrom.secretRef.optional' - field: 'template.spec.containers.env_from.secret_ref.optional' - - api_field: 'spec.template.spec.containers.image' - field: 'template.spec.containers.image' - - api_field: 'spec.template.spec.containers.livenessProbe.failureThreshold' - field: 'template.spec.containers.liveness_probe.failure_threshold' - - api_field: 'spec.template.spec.containers.livenessProbe.grpc.port' - field: 'template.spec.containers.liveness_probe.grpc.port' - - api_field: 'spec.template.spec.containers.livenessProbe.grpc.service' - field: 'template.spec.containers.liveness_probe.grpc.service' - - api_field: 'spec.template.spec.containers.livenessProbe.httpGet.httpHeaders.name' - field: 'template.spec.containers.liveness_probe.http_get.http_headers.name' - - api_field: 'spec.template.spec.containers.livenessProbe.httpGet.httpHeaders.value' - field: 'template.spec.containers.liveness_probe.http_get.http_headers.value' - - api_field: 'spec.template.spec.containers.livenessProbe.httpGet.path' - field: 'template.spec.containers.liveness_probe.http_get.path' - - api_field: 'spec.template.spec.containers.livenessProbe.httpGet.port' - field: 'template.spec.containers.liveness_probe.http_get.port' - - api_field: 'spec.template.spec.containers.livenessProbe.initialDelaySeconds' - field: 'template.spec.containers.liveness_probe.initial_delay_seconds' - - api_field: 'spec.template.spec.containers.livenessProbe.periodSeconds' - field: 'template.spec.containers.liveness_probe.period_seconds' - - api_field: 'spec.template.spec.containers.livenessProbe.timeoutSeconds' - field: 'template.spec.containers.liveness_probe.timeout_seconds' - - api_field: 'spec.template.spec.containers.name' - field: 'template.spec.containers.name' - - api_field: 'spec.template.spec.containers.ports.containerPort' - field: 'template.spec.containers.ports.container_port' - - api_field: 'spec.template.spec.containers.ports.name' - field: 'template.spec.containers.ports.name' - - api_field: 'spec.template.spec.containers.ports.protocol' - field: 'template.spec.containers.ports.protocol' - - api_field: 'spec.template.spec.containers.readinessProbe.failureThreshold' - field: 'template.spec.containers.readiness_probe.failure_threshold' - - api_field: 'spec.template.spec.containers.readinessProbe.grpc.port' - field: 'template.spec.containers.readiness_probe.grpc.port' - - api_field: 'spec.template.spec.containers.readinessProbe.grpc.service' - field: 'template.spec.containers.readiness_probe.grpc.service' - - api_field: 'spec.template.spec.containers.readinessProbe.httpGet.path' - field: 'template.spec.containers.readiness_probe.http_get.path' - - api_field: 'spec.template.spec.containers.readinessProbe.httpGet.port' - field: 'template.spec.containers.readiness_probe.http_get.port' - - api_field: 'spec.template.spec.containers.readinessProbe.periodSeconds' - field: 'template.spec.containers.readiness_probe.period_seconds' - - api_field: 'spec.template.spec.containers.readinessProbe.successThreshold' - field: 'template.spec.containers.readiness_probe.success_threshold' - - api_field: 'spec.template.spec.containers.readinessProbe.timeoutSeconds' - field: 'template.spec.containers.readiness_probe.timeout_seconds' - - api_field: 'spec.template.spec.containers.resources.limits' - field: 'template.spec.containers.resources.limits' - - api_field: 'spec.template.spec.containers.resources.requests' - field: 'template.spec.containers.resources.requests' - - api_field: 'spec.template.spec.containers.startupProbe.failureThreshold' - field: 'template.spec.containers.startup_probe.failure_threshold' - - api_field: 'spec.template.spec.containers.startupProbe.grpc.port' - field: 'template.spec.containers.startup_probe.grpc.port' - - api_field: 'spec.template.spec.containers.startupProbe.grpc.service' - field: 'template.spec.containers.startup_probe.grpc.service' - - api_field: 'spec.template.spec.containers.startupProbe.httpGet.httpHeaders.name' - field: 'template.spec.containers.startup_probe.http_get.http_headers.name' - - api_field: 'spec.template.spec.containers.startupProbe.httpGet.httpHeaders.value' - field: 'template.spec.containers.startup_probe.http_get.http_headers.value' - - api_field: 'spec.template.spec.containers.startupProbe.httpGet.path' - field: 'template.spec.containers.startup_probe.http_get.path' - - api_field: 'spec.template.spec.containers.startupProbe.httpGet.port' - field: 'template.spec.containers.startup_probe.http_get.port' - - api_field: 'spec.template.spec.containers.startupProbe.initialDelaySeconds' - field: 'template.spec.containers.startup_probe.initial_delay_seconds' - - api_field: 'spec.template.spec.containers.startupProbe.periodSeconds' - field: 'template.spec.containers.startup_probe.period_seconds' - - api_field: 'spec.template.spec.containers.startupProbe.tcpSocket.port' - field: 'template.spec.containers.startup_probe.tcp_socket.port' - - api_field: 'spec.template.spec.containers.startupProbe.timeoutSeconds' - field: 'template.spec.containers.startup_probe.timeout_seconds' - - api_field: 'spec.template.spec.containers.volumeMounts.mountPath' - field: 'template.spec.containers.volume_mounts.mount_path' - - api_field: 'spec.template.spec.containers.volumeMounts.name' - field: 'template.spec.containers.volume_mounts.name' - - api_field: 'spec.template.spec.containers.volumeMounts.subPath' - field: 'template.spec.containers.volume_mounts.sub_path' - - api_field: 'spec.template.spec.containers.workingDir' - field: 'template.spec.containers.working_dir' - - api_field: 'spec.template.spec.nodeSelector' - field: 'template.spec.node_selector' - - api_field: 'spec.template.spec.serviceAccountName' - field: 'template.spec.service_account_name' - - api_field: 'spec.template.spec.servingState' - field: 'template.spec.serving_state' - - api_field: 'spec.template.spec.timeoutSeconds' - field: 'template.spec.timeout_seconds' - - api_field: 'spec.template.spec.volumes.csi.driver' - field: 'template.spec.volumes.csi.driver' - - api_field: 'spec.template.spec.volumes.csi.readOnly' - field: 'template.spec.volumes.csi.read_only' - - api_field: 'spec.template.spec.volumes.csi.volumeAttributes' - field: 'template.spec.volumes.csi.volume_attributes' - - api_field: 'spec.template.spec.volumes.emptyDir.medium' - field: 'template.spec.volumes.empty_dir.medium' - - api_field: 'spec.template.spec.volumes.emptyDir.sizeLimit' - field: 'template.spec.volumes.empty_dir.size_limit' - - api_field: 'spec.template.spec.volumes.name' - field: 'template.spec.volumes.name' - - api_field: 'spec.template.spec.volumes.nfs.path' - field: 'template.spec.volumes.nfs.path' - - api_field: 'spec.template.spec.volumes.nfs.readOnly' - field: 'template.spec.volumes.nfs.read_only' - - api_field: 'spec.template.spec.volumes.nfs.server' - field: 'template.spec.volumes.nfs.server' - - api_field: 'spec.template.spec.volumes.secret.defaultMode' - field: 'template.spec.volumes.secret.default_mode' - - api_field: 'spec.template.spec.volumes.secret.items.key' - field: 'template.spec.volumes.secret.items.key' - - api_field: 'spec.template.spec.volumes.secret.items.mode' - field: 'template.spec.volumes.secret.items.mode' - - api_field: 'spec.template.spec.volumes.secret.items.path' - field: 'template.spec.volumes.secret.items.path' - - api_field: 'spec.template.spec.volumes.secret.secretName' - field: 'template.spec.volumes.secret.secret_name' - - api_field: 'spec.traffic.latestRevision' - field: 'traffic.latest_revision' - - api_field: 'spec.traffic.percent' - field: 'traffic.percent' - - api_field: 'spec.traffic.revisionName' - field: 'traffic.revision_name' - - api_field: 'spec.traffic.tag' - field: 'traffic.tag' - - api_field: 'spec.traffic.url' - field: 'traffic.url' + - field: autogenerate_revision_name + provider_only: true + - field: location + provider_only: true + - api_field: metadata.annotations + - field: metadata.effective_annotations + provider_only: true + - field: metadata.effective_labels + provider_only: true + - api_field: metadata.generation + - api_field: metadata.labels + - api_field: metadata.namespace + - api_field: metadata.resourceVersion + - api_field: metadata.selfLink + - field: metadata.terraform_labels + provider_only: true + - api_field: metadata.uid + - field: name + provider_only: true + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.status + - api_field: status.conditions.type + - api_field: status.latestCreatedRevisionName + - api_field: status.latestReadyRevisionName + - api_field: status.observedGeneration + - api_field: status.traffic.latestRevision + - api_field: status.traffic.percent + - api_field: status.traffic.revisionName + - api_field: status.traffic.tag + - api_field: status.traffic.url + - api_field: status.url + - api_field: spec.template.metadata.annotations + field: template.metadata.annotations + - api_field: spec.template.metadata.generation + field: template.metadata.generation + - api_field: spec.template.metadata.labels + field: template.metadata.labels + - api_field: spec.template.metadata.name + field: template.metadata.name + - api_field: spec.template.metadata.namespace + field: template.metadata.namespace + - api_field: spec.template.metadata.resourceVersion + field: template.metadata.resource_version + - api_field: spec.template.metadata.selfLink + field: template.metadata.self_link + - api_field: spec.template.metadata.uid + field: template.metadata.uid + - api_field: spec.template.spec.containerConcurrency + field: template.spec.container_concurrency + - api_field: spec.template.spec.containers.args + field: template.spec.containers.args + - api_field: spec.template.spec.containers.command + field: template.spec.containers.command + - api_field: spec.template.spec.containers.env.name + field: template.spec.containers.env.name + - api_field: spec.template.spec.containers.env.value + field: template.spec.containers.env.value + - api_field: spec.template.spec.containers.env.valueFrom.secretKeyRef.key + field: template.spec.containers.env.value_from.secret_key_ref.key + - api_field: spec.template.spec.containers.env.valueFrom.secretKeyRef.name + field: template.spec.containers.env.value_from.secret_key_ref.name + - api_field: spec.template.spec.containers.envFrom.configMapRef.localObjectReference.name + field: template.spec.containers.env_from.config_map_ref.local_object_reference.name + - api_field: spec.template.spec.containers.envFrom.configMapRef.optional + field: template.spec.containers.env_from.config_map_ref.optional + - api_field: spec.template.spec.containers.envFrom.prefix + field: template.spec.containers.env_from.prefix + - api_field: spec.template.spec.containers.envFrom.secretRef.localObjectReference.name + field: template.spec.containers.env_from.secret_ref.local_object_reference.name + - api_field: spec.template.spec.containers.envFrom.secretRef.optional + field: template.spec.containers.env_from.secret_ref.optional + - api_field: spec.template.spec.containers.image + field: template.spec.containers.image + - api_field: spec.template.spec.containers.livenessProbe.failureThreshold + field: template.spec.containers.liveness_probe.failure_threshold + - api_field: spec.template.spec.containers.livenessProbe.grpc.port + field: template.spec.containers.liveness_probe.grpc.port + - api_field: spec.template.spec.containers.livenessProbe.grpc.service + field: template.spec.containers.liveness_probe.grpc.service + - api_field: spec.template.spec.containers.livenessProbe.httpGet.httpHeaders.name + field: template.spec.containers.liveness_probe.http_get.http_headers.name + - api_field: spec.template.spec.containers.livenessProbe.httpGet.httpHeaders.value + field: template.spec.containers.liveness_probe.http_get.http_headers.value + - api_field: spec.template.spec.containers.livenessProbe.httpGet.path + field: template.spec.containers.liveness_probe.http_get.path + - api_field: spec.template.spec.containers.livenessProbe.httpGet.port + field: template.spec.containers.liveness_probe.http_get.port + - api_field: spec.template.spec.containers.livenessProbe.initialDelaySeconds + field: template.spec.containers.liveness_probe.initial_delay_seconds + - api_field: spec.template.spec.containers.livenessProbe.periodSeconds + field: template.spec.containers.liveness_probe.period_seconds + - api_field: spec.template.spec.containers.livenessProbe.timeoutSeconds + field: template.spec.containers.liveness_probe.timeout_seconds + - api_field: spec.template.spec.containers.name + field: template.spec.containers.name + - api_field: spec.template.spec.containers.ports.containerPort + field: template.spec.containers.ports.container_port + - api_field: spec.template.spec.containers.ports.name + field: template.spec.containers.ports.name + - api_field: spec.template.spec.containers.ports.protocol + field: template.spec.containers.ports.protocol + - api_field: spec.template.spec.containers.readinessProbe.failureThreshold + field: template.spec.containers.readiness_probe.failure_threshold + - api_field: spec.template.spec.containers.readinessProbe.grpc.port + field: template.spec.containers.readiness_probe.grpc.port + - api_field: spec.template.spec.containers.readinessProbe.grpc.service + field: template.spec.containers.readiness_probe.grpc.service + - api_field: spec.template.spec.containers.readinessProbe.httpGet.path + field: template.spec.containers.readiness_probe.http_get.path + - api_field: spec.template.spec.containers.readinessProbe.httpGet.port + field: template.spec.containers.readiness_probe.http_get.port + - api_field: spec.template.spec.containers.readinessProbe.periodSeconds + field: template.spec.containers.readiness_probe.period_seconds + - api_field: spec.template.spec.containers.readinessProbe.successThreshold + field: template.spec.containers.readiness_probe.success_threshold + - api_field: spec.template.spec.containers.readinessProbe.timeoutSeconds + field: template.spec.containers.readiness_probe.timeout_seconds + - api_field: spec.template.spec.containers.resources.limits + field: template.spec.containers.resources.limits + - api_field: spec.template.spec.containers.resources.requests + field: template.spec.containers.resources.requests + - api_field: spec.template.spec.containers.startupProbe.failureThreshold + field: template.spec.containers.startup_probe.failure_threshold + - api_field: spec.template.spec.containers.startupProbe.grpc.port + field: template.spec.containers.startup_probe.grpc.port + - api_field: spec.template.spec.containers.startupProbe.grpc.service + field: template.spec.containers.startup_probe.grpc.service + - api_field: spec.template.spec.containers.startupProbe.httpGet.httpHeaders.name + field: template.spec.containers.startup_probe.http_get.http_headers.name + - api_field: spec.template.spec.containers.startupProbe.httpGet.httpHeaders.value + field: template.spec.containers.startup_probe.http_get.http_headers.value + - api_field: spec.template.spec.containers.startupProbe.httpGet.path + field: template.spec.containers.startup_probe.http_get.path + - api_field: spec.template.spec.containers.startupProbe.httpGet.port + field: template.spec.containers.startup_probe.http_get.port + - api_field: spec.template.spec.containers.startupProbe.initialDelaySeconds + field: template.spec.containers.startup_probe.initial_delay_seconds + - api_field: spec.template.spec.containers.startupProbe.periodSeconds + field: template.spec.containers.startup_probe.period_seconds + - api_field: spec.template.spec.containers.startupProbe.tcpSocket.port + field: template.spec.containers.startup_probe.tcp_socket.port + - api_field: spec.template.spec.containers.startupProbe.timeoutSeconds + field: template.spec.containers.startup_probe.timeout_seconds + - api_field: spec.template.spec.containers.volumeMounts.mountPath + field: template.spec.containers.volume_mounts.mount_path + - api_field: spec.template.spec.containers.volumeMounts.name + field: template.spec.containers.volume_mounts.name + - api_field: spec.template.spec.containers.volumeMounts.subPath + field: template.spec.containers.volume_mounts.sub_path + - api_field: spec.template.spec.containers.workingDir + field: template.spec.containers.working_dir + - api_field: spec.template.spec.nodeSelector + field: template.spec.node_selector + - api_field: spec.template.spec.serviceAccountName + field: template.spec.service_account_name + - api_field: spec.template.spec.servingState + field: template.spec.serving_state + - api_field: spec.template.spec.timeoutSeconds + field: template.spec.timeout_seconds + - api_field: spec.template.spec.volumes.csi.driver + field: template.spec.volumes.csi.driver + - api_field: spec.template.spec.volumes.csi.readOnly + field: template.spec.volumes.csi.read_only + - api_field: spec.template.spec.volumes.csi.volumeAttributes + field: template.spec.volumes.csi.volume_attributes + - api_field: spec.template.spec.volumes.emptyDir.medium + field: template.spec.volumes.empty_dir.medium + - api_field: spec.template.spec.volumes.emptyDir.sizeLimit + field: template.spec.volumes.empty_dir.size_limit + - api_field: spec.template.spec.volumes.name + field: template.spec.volumes.name + - api_field: spec.template.spec.volumes.nfs.path + field: template.spec.volumes.nfs.path + - api_field: spec.template.spec.volumes.nfs.readOnly + field: template.spec.volumes.nfs.read_only + - api_field: spec.template.spec.volumes.nfs.server + field: template.spec.volumes.nfs.server + - api_field: spec.template.spec.volumes.secret.defaultMode + field: template.spec.volumes.secret.default_mode + - api_field: spec.template.spec.volumes.secret.items.key + field: template.spec.volumes.secret.items.key + - api_field: spec.template.spec.volumes.secret.items.mode + field: template.spec.volumes.secret.items.mode + - api_field: spec.template.spec.volumes.secret.items.path + field: template.spec.volumes.secret.items.path + - api_field: spec.template.spec.volumes.secret.secretName + field: template.spec.volumes.secret.secret_name + - api_field: spec.traffic.latestRevision + field: traffic.latest_revision + - api_field: spec.traffic.percent + field: traffic.percent + - api_field: spec.traffic.revisionName + field: traffic.revision_name + - api_field: spec.traffic.tag + field: traffic.tag + - api_field: spec.traffic.url + field: traffic.url diff --git a/google/services/cloudrunv2/iam_cloud_run_v2_job_generated_test.go b/google/services/cloudrunv2/iam_cloud_run_v2_job_generated_test.go index 574d65f86c2..4309d2fedbd 100644 --- a/google/services/cloudrunv2/iam_cloud_run_v2_job_generated_test.go +++ b/google/services/cloudrunv2/iam_cloud_run_v2_job_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccCloudRunV2JobIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_job_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/jobs/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-job%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2JobIAMBindingStateID("google_cloud_run_v2_job_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccCloudRunV2JobIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_job_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/jobs/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-job%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2JobIAMBindingStateID("google_cloud_run_v2_job_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccCloudRunV2JobIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_job_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/jobs/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-job%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2JobIAMMemberStateID("google_cloud_run_v2_job_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccCloudRunV2JobIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_job_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/jobs/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-job%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2JobIAMPolicyStateID("google_cloud_run_v2_job_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccCloudRunV2JobIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_job_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/jobs/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-job%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2JobIAMPolicyStateID("google_cloud_run_v2_job_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -280,3 +281,57 @@ resource "google_cloud_run_v2_job_iam_binding" "foo" { } `, context) } + +func generateCloudRunV2JobIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/jobs/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunV2JobIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/jobs/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunV2JobIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/jobs/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudrunv2/iam_cloud_run_v2_service_generated_test.go b/google/services/cloudrunv2/iam_cloud_run_v2_service_generated_test.go index 461710c947a..538c863fec2 100644 --- a/google/services/cloudrunv2/iam_cloud_run_v2_service_generated_test.go +++ b/google/services/cloudrunv2/iam_cloud_run_v2_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccCloudRunV2ServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-service%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2ServiceIAMBindingStateID("google_cloud_run_v2_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccCloudRunV2ServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-service%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2ServiceIAMBindingStateID("google_cloud_run_v2_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccCloudRunV2ServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-service%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2ServiceIAMMemberStateID("google_cloud_run_v2_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccCloudRunV2ServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-service%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2ServiceIAMPolicyStateID("google_cloud_run_v2_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccCloudRunV2ServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-service%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2ServiceIAMPolicyStateID("google_cloud_run_v2_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -295,3 +296,57 @@ resource "google_cloud_run_v2_service_iam_binding" "foo" { } `, context) } + +func generateCloudRunV2ServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunV2ServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunV2ServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudrunv2/iam_cloud_run_v2_worker_pool_generated_test.go b/google/services/cloudrunv2/iam_cloud_run_v2_worker_pool_generated_test.go index b0e3e867f06..d594eaedbc0 100644 --- a/google/services/cloudrunv2/iam_cloud_run_v2_worker_pool_generated_test.go +++ b/google/services/cloudrunv2/iam_cloud_run_v2_worker_pool_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccCloudRunV2WorkerPoolIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_worker_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/workerPools/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-worker-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2WorkerPoolIAMBindingStateID("google_cloud_run_v2_worker_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccCloudRunV2WorkerPoolIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_worker_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/workerPools/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-worker-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2WorkerPoolIAMBindingStateID("google_cloud_run_v2_worker_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccCloudRunV2WorkerPoolIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_worker_pool_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/workerPools/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-worker-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2WorkerPoolIAMMemberStateID("google_cloud_run_v2_worker_pool_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccCloudRunV2WorkerPoolIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_worker_pool_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/workerPools/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-worker-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2WorkerPoolIAMPolicyStateID("google_cloud_run_v2_worker_pool_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccCloudRunV2WorkerPoolIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_run_v2_worker_pool_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/workerPools/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloudrun-worker-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudRunV2WorkerPoolIAMPolicyStateID("google_cloud_run_v2_worker_pool_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -275,3 +276,57 @@ resource "google_cloud_run_v2_worker_pool_iam_binding" "foo" { } `, context) } + +func generateCloudRunV2WorkerPoolIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/workerPools/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunV2WorkerPoolIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/workerPools/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudRunV2WorkerPoolIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/workerPools/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudrunv2/resource_cloud_run_v2_job_generated_meta.yaml b/google/services/cloudrunv2/resource_cloud_run_v2_job_generated_meta.yaml index 2a7c8d97f98..533e8af23ba 100644 --- a/google/services/cloudrunv2/resource_cloud_run_v2_job_generated_meta.yaml +++ b/google/services/cloudrunv2/resource_cloud_run_v2_job_generated_meta.yaml @@ -1,116 +1,116 @@ -resource: 'google_cloud_run_v2_job' -generation_type: 'mmv1' -source_file: 'products/cloudrunv2/Job.yaml' -api_service_name: 'run.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Job' +resource: google_cloud_run_v2_job +generation_type: mmv1 +source_file: products/cloudrunv2/Job.yaml +api_service_name: run.googleapis.com +api_version: v2 +api_resource_type_kind: Job fields: - - api_field: 'annotations' - - api_field: 'binaryAuthorization.breakglassJustification' - - api_field: 'binaryAuthorization.policy' - - api_field: 'binaryAuthorization.useDefault' - - api_field: 'client' - - api_field: 'clientVersion' - - api_field: 'conditions.executionReason' - - api_field: 'conditions.lastTransitionTime' - - api_field: 'conditions.message' - - api_field: 'conditions.reason' - - api_field: 'conditions.revisionReason' - - api_field: 'conditions.severity' - - api_field: 'conditions.state' - - api_field: 'conditions.type' - - api_field: 'createTime' - - api_field: 'creator' - - api_field: 'deleteTime' - - field: 'deletion_protection' - provider_only: true - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'executionCount' - - api_field: 'expireTime' - - api_field: 'generation' - - api_field: 'labels' - - api_field: 'lastModifier' - - api_field: 'latestCreatedExecution.completionTime' - - api_field: 'latestCreatedExecution.createTime' - - api_field: 'latestCreatedExecution.name' - - api_field: 'launchStage' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'observedGeneration' - - api_field: 'reconciling' - - api_field: 'template.annotations' - - api_field: 'template.labels' - - api_field: 'template.parallelism' - - api_field: 'template.taskCount' - - api_field: 'template.template.containers.args' - - api_field: 'template.template.containers.command' - - api_field: 'template.template.containers.dependsOn' - - api_field: 'template.template.containers.env.name' - - api_field: 'template.template.containers.env.value' - - api_field: 'template.template.containers.env.valueSource.secretKeyRef.secret' - - api_field: 'template.template.containers.env.valueSource.secretKeyRef.version' - - api_field: 'template.template.containers.image' - - api_field: 'template.template.containers.name' - - api_field: 'template.template.containers.ports.containerPort' - - api_field: 'template.template.containers.ports.name' - - api_field: 'template.template.containers.resources.limits' - - api_field: 'template.template.containers.startupProbe.failureThreshold' - - api_field: 'template.template.containers.startupProbe.grpc.port' - - api_field: 'template.template.containers.startupProbe.grpc.service' - - api_field: 'template.template.containers.startupProbe.httpGet.httpHeaders.name' - - api_field: 'template.template.containers.startupProbe.httpGet.httpHeaders.value' - - api_field: 'template.template.containers.startupProbe.httpGet.path' - - api_field: 'template.template.containers.startupProbe.httpGet.port' - - api_field: 'template.template.containers.startupProbe.initialDelaySeconds' - - api_field: 'template.template.containers.startupProbe.periodSeconds' - - api_field: 'template.template.containers.startupProbe.tcpSocket.port' - - api_field: 'template.template.containers.startupProbe.timeoutSeconds' - - api_field: 'template.template.containers.volumeMounts.mountPath' - - api_field: 'template.template.containers.volumeMounts.name' - - api_field: 'template.template.containers.volumeMounts.subPath' - - api_field: 'template.template.containers.workingDir' - - api_field: 'template.template.encryptionKey' - - api_field: 'template.template.executionEnvironment' - - api_field: 'template.template.gpuZonalRedundancyDisabled' - - api_field: 'template.template.maxRetries' - - api_field: 'template.template.nodeSelector.accelerator' - - api_field: 'template.template.serviceAccount' - - api_field: 'template.template.timeout' - - api_field: 'template.template.volumes.cloudSqlInstance.instances' - - api_field: 'template.template.volumes.emptyDir.medium' - - api_field: 'template.template.volumes.emptyDir.sizeLimit' - - api_field: 'template.template.volumes.gcs.bucket' - - api_field: 'template.template.volumes.gcs.mountOptions' - - api_field: 'template.template.volumes.gcs.readOnly' - - api_field: 'template.template.volumes.name' - - api_field: 'template.template.volumes.nfs.path' - - api_field: 'template.template.volumes.nfs.readOnly' - - api_field: 'template.template.volumes.nfs.server' - - api_field: 'template.template.volumes.secret.defaultMode' - - api_field: 'template.template.volumes.secret.items.mode' - - api_field: 'template.template.volumes.secret.items.path' - - api_field: 'template.template.volumes.secret.items.version' - - api_field: 'template.template.volumes.secret.secret' - - api_field: 'template.template.vpcAccess.connector' - - api_field: 'template.template.vpcAccess.egress' - - api_field: 'template.template.vpcAccess.networkInterfaces.network' - - api_field: 'template.template.vpcAccess.networkInterfaces.subnetwork' - - api_field: 'template.template.vpcAccess.networkInterfaces.tags' - - api_field: 'terminalCondition.executionReason' - - api_field: 'terminalCondition.lastTransitionTime' - - api_field: 'terminalCondition.message' - - api_field: 'terminalCondition.reason' - - api_field: 'terminalCondition.revisionReason' - - api_field: 'terminalCondition.severity' - - api_field: 'terminalCondition.state' - - api_field: 'terminalCondition.type' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: binaryAuthorization.breakglassJustification + - api_field: binaryAuthorization.policy + - api_field: binaryAuthorization.useDefault + - api_field: client + - api_field: clientVersion + - api_field: conditions.executionReason + - api_field: conditions.lastTransitionTime + - api_field: conditions.message + - api_field: conditions.reason + - api_field: conditions.revisionReason + - api_field: conditions.severity + - api_field: conditions.state + - api_field: conditions.type + - api_field: createTime + - api_field: creator + - api_field: deleteTime + - field: deletion_protection + provider_only: true + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: executionCount + - api_field: expireTime + - api_field: generation + - api_field: labels + - api_field: lastModifier + - api_field: latestCreatedExecution.completionTime + - api_field: latestCreatedExecution.createTime + - api_field: latestCreatedExecution.name + - api_field: launchStage + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: observedGeneration + - api_field: reconciling + - api_field: template.annotations + - api_field: template.labels + - api_field: template.parallelism + - api_field: template.taskCount + - api_field: template.template.containers.args + - api_field: template.template.containers.command + - api_field: template.template.containers.dependsOn + - api_field: template.template.containers.env.name + - api_field: template.template.containers.env.value + - api_field: template.template.containers.env.valueSource.secretKeyRef.secret + - api_field: template.template.containers.env.valueSource.secretKeyRef.version + - api_field: template.template.containers.image + - api_field: template.template.containers.name + - api_field: template.template.containers.ports.containerPort + - api_field: template.template.containers.ports.name + - api_field: template.template.containers.resources.limits + - api_field: template.template.containers.startupProbe.failureThreshold + - api_field: template.template.containers.startupProbe.grpc.port + - api_field: template.template.containers.startupProbe.grpc.service + - api_field: template.template.containers.startupProbe.httpGet.httpHeaders.name + - api_field: template.template.containers.startupProbe.httpGet.httpHeaders.value + - api_field: template.template.containers.startupProbe.httpGet.path + - api_field: template.template.containers.startupProbe.httpGet.port + - api_field: template.template.containers.startupProbe.initialDelaySeconds + - api_field: template.template.containers.startupProbe.periodSeconds + - api_field: template.template.containers.startupProbe.tcpSocket.port + - api_field: template.template.containers.startupProbe.timeoutSeconds + - api_field: template.template.containers.volumeMounts.mountPath + - api_field: template.template.containers.volumeMounts.name + - api_field: template.template.containers.volumeMounts.subPath + - api_field: template.template.containers.workingDir + - api_field: template.template.encryptionKey + - api_field: template.template.executionEnvironment + - api_field: template.template.gpuZonalRedundancyDisabled + - api_field: template.template.maxRetries + - api_field: template.template.nodeSelector.accelerator + - api_field: template.template.serviceAccount + - api_field: template.template.timeout + - api_field: template.template.volumes.cloudSqlInstance.instances + - api_field: template.template.volumes.emptyDir.medium + - api_field: template.template.volumes.emptyDir.sizeLimit + - api_field: template.template.volumes.gcs.bucket + - api_field: template.template.volumes.gcs.mountOptions + - api_field: template.template.volumes.gcs.readOnly + - api_field: template.template.volumes.name + - api_field: template.template.volumes.nfs.path + - api_field: template.template.volumes.nfs.readOnly + - api_field: template.template.volumes.nfs.server + - api_field: template.template.volumes.secret.defaultMode + - api_field: template.template.volumes.secret.items.mode + - api_field: template.template.volumes.secret.items.path + - api_field: template.template.volumes.secret.items.version + - api_field: template.template.volumes.secret.secret + - api_field: template.template.vpcAccess.connector + - api_field: template.template.vpcAccess.egress + - api_field: template.template.vpcAccess.networkInterfaces.network + - api_field: template.template.vpcAccess.networkInterfaces.subnetwork + - api_field: template.template.vpcAccess.networkInterfaces.tags + - api_field: terminalCondition.executionReason + - api_field: terminalCondition.lastTransitionTime + - api_field: terminalCondition.message + - api_field: terminalCondition.reason + - api_field: terminalCondition.revisionReason + - api_field: terminalCondition.severity + - api_field: terminalCondition.state + - api_field: terminalCondition.type + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/cloudrunv2/resource_cloud_run_v2_service.go b/google/services/cloudrunv2/resource_cloud_run_v2_service.go index 3df4bb070f8..e7e60493b3d 100644 --- a/google/services/cloudrunv2/resource_cloud_run_v2_service.go +++ b/google/services/cloudrunv2/resource_cloud_run_v2_service.go @@ -1049,11 +1049,12 @@ For example, if ALPHA is provided as input, but only BETA and GA-level features }, }, "scaling": { - Type: schema.TypeList, - Computed: true, - Optional: true, - Description: `Scaling settings that apply to the whole service`, - MaxItems: 1, + Type: schema.TypeList, + Computed: true, + Optional: true, + DiffSuppressFunc: tpgresource.EmptyOrUnsetBlockDiffSuppress, + Description: `Scaling settings that apply to the whole service`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "manual_instance_count": { diff --git a/google/services/cloudrunv2/resource_cloud_run_v2_service_generated_meta.yaml b/google/services/cloudrunv2/resource_cloud_run_v2_service_generated_meta.yaml index edfc5ee6e5b..b59647ccc51 100644 --- a/google/services/cloudrunv2/resource_cloud_run_v2_service_generated_meta.yaml +++ b/google/services/cloudrunv2/resource_cloud_run_v2_service_generated_meta.yaml @@ -1,164 +1,164 @@ -resource: 'google_cloud_run_v2_service' -generation_type: 'mmv1' -source_file: 'products/cloudrunv2/Service.yaml' -api_service_name: 'run.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Service' +resource: google_cloud_run_v2_service +generation_type: mmv1 +source_file: products/cloudrunv2/Service.yaml +api_service_name: run.googleapis.com +api_version: v2 +api_resource_type_kind: Service fields: - - api_field: 'annotations' - - api_field: 'binaryAuthorization.breakglassJustification' - - api_field: 'binaryAuthorization.policy' - - api_field: 'binaryAuthorization.useDefault' - - api_field: 'buildConfig.baseImage' - - api_field: 'buildConfig.enableAutomaticUpdates' - - api_field: 'buildConfig.environmentVariables' - - api_field: 'buildConfig.functionTarget' - - api_field: 'buildConfig.imageUri' - - api_field: 'buildConfig.name' - - api_field: 'buildConfig.serviceAccount' - - api_field: 'buildConfig.sourceLocation' - - api_field: 'buildConfig.workerPool' - - api_field: 'client' - - api_field: 'clientVersion' - - api_field: 'conditions.executionReason' - - api_field: 'conditions.lastTransitionTime' - - api_field: 'conditions.message' - - api_field: 'conditions.reason' - - api_field: 'conditions.revisionReason' - - api_field: 'conditions.severity' - - api_field: 'conditions.state' - - api_field: 'conditions.type' - - api_field: 'createTime' - - api_field: 'creator' - - api_field: 'customAudiences' - - api_field: 'defaultUriDisabled' - - api_field: 'deleteTime' - - field: 'deletion_protection' - provider_only: true - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'expireTime' - - api_field: 'generation' - - api_field: 'ingress' - - api_field: 'invokerIamDisabled' - - api_field: 'labels' - - api_field: 'lastModifier' - - api_field: 'latestCreatedRevision' - - api_field: 'latestReadyRevision' - - api_field: 'launchStage' - - field: 'location' - provider_only: true - - api_field: 'multiRegionSettings.multiRegionId' - - api_field: 'multiRegionSettings.regions' - - field: 'name' - provider_only: true - - api_field: 'observedGeneration' - - api_field: 'reconciling' - - api_field: 'scaling.manualInstanceCount' - - api_field: 'scaling.maxInstanceCount' - - api_field: 'scaling.minInstanceCount' - - api_field: 'scaling.scalingMode' - - api_field: 'template.annotations' - - api_field: 'template.containers.args' - - api_field: 'template.containers.baseImageUri' - - api_field: 'template.containers.buildInfo.functionTarget' - - api_field: 'template.containers.buildInfo.source_location' - - api_field: 'template.containers.command' - - api_field: 'template.containers.dependsOn' - - api_field: 'template.containers.env.name' - - api_field: 'template.containers.env.value' - - api_field: 'template.containers.env.valueSource.secretKeyRef.secret' - - api_field: 'template.containers.env.valueSource.secretKeyRef.version' - - api_field: 'template.containers.image' - - api_field: 'template.containers.livenessProbe.failureThreshold' - - api_field: 'template.containers.livenessProbe.grpc.port' - - api_field: 'template.containers.livenessProbe.grpc.service' - - api_field: 'template.containers.livenessProbe.httpGet.httpHeaders.name' - - api_field: 'template.containers.livenessProbe.httpGet.httpHeaders.value' - - api_field: 'template.containers.livenessProbe.httpGet.path' - - api_field: 'template.containers.livenessProbe.httpGet.port' - - api_field: 'template.containers.livenessProbe.initialDelaySeconds' - - api_field: 'template.containers.livenessProbe.periodSeconds' - - api_field: 'template.containers.livenessProbe.tcpSocket.port' - - api_field: 'template.containers.livenessProbe.timeoutSeconds' - - api_field: 'template.containers.name' - - api_field: 'template.containers.ports.containerPort' - - api_field: 'template.containers.ports.name' - - api_field: 'template.containers.resources.cpuIdle' - - api_field: 'template.containers.resources.limits' - - api_field: 'template.containers.resources.startupCpuBoost' - - api_field: 'template.containers.startupProbe.failureThreshold' - - api_field: 'template.containers.startupProbe.grpc.port' - - api_field: 'template.containers.startupProbe.grpc.service' - - api_field: 'template.containers.startupProbe.httpGet.httpHeaders.name' - - api_field: 'template.containers.startupProbe.httpGet.httpHeaders.value' - - api_field: 'template.containers.startupProbe.httpGet.path' - - api_field: 'template.containers.startupProbe.httpGet.port' - - api_field: 'template.containers.startupProbe.initialDelaySeconds' - - api_field: 'template.containers.startupProbe.periodSeconds' - - api_field: 'template.containers.startupProbe.tcpSocket.port' - - api_field: 'template.containers.startupProbe.timeoutSeconds' - - api_field: 'template.containers.volumeMounts.mountPath' - - api_field: 'template.containers.volumeMounts.name' - - api_field: 'template.containers.volumeMounts.subPath' - - api_field: 'template.containers.workingDir' - - api_field: 'template.encryptionKey' - - api_field: 'template.executionEnvironment' - - api_field: 'template.gpuZonalRedundancyDisabled' - - api_field: 'template.healthCheckDisabled' - - api_field: 'template.labels' - - api_field: 'template.maxInstanceRequestConcurrency' - - api_field: 'template.nodeSelector.accelerator' - - api_field: 'template.revision' - - api_field: 'template.scaling.maxInstanceCount' - - api_field: 'template.scaling.minInstanceCount' - - api_field: 'template.serviceAccount' - - api_field: 'template.sessionAffinity' - - api_field: 'template.timeout' - - api_field: 'template.volumes.cloudSqlInstance.instances' - - api_field: 'template.volumes.emptyDir.medium' - - api_field: 'template.volumes.emptyDir.sizeLimit' - - api_field: 'template.volumes.gcs.bucket' - - api_field: 'template.volumes.gcs.mountOptions' - - api_field: 'template.volumes.gcs.readOnly' - - api_field: 'template.volumes.name' - - api_field: 'template.volumes.nfs.path' - - api_field: 'template.volumes.nfs.readOnly' - - api_field: 'template.volumes.nfs.server' - - api_field: 'template.volumes.secret.defaultMode' - - api_field: 'template.volumes.secret.items.mode' - - api_field: 'template.volumes.secret.items.path' - - api_field: 'template.volumes.secret.items.version' - - api_field: 'template.volumes.secret.secret' - - api_field: 'template.vpcAccess.connector' - - api_field: 'template.vpcAccess.egress' - - api_field: 'template.vpcAccess.networkInterfaces.network' - - api_field: 'template.vpcAccess.networkInterfaces.subnetwork' - - api_field: 'template.vpcAccess.networkInterfaces.tags' - - api_field: 'terminalCondition.executionReason' - - api_field: 'terminalCondition.lastTransitionTime' - - api_field: 'terminalCondition.message' - - api_field: 'terminalCondition.reason' - - api_field: 'terminalCondition.revisionReason' - - api_field: 'terminalCondition.severity' - - api_field: 'terminalCondition.state' - - api_field: 'terminalCondition.type' - - field: 'terraform_labels' - provider_only: true - - api_field: 'traffic.percent' - - api_field: 'traffic.revision' - - api_field: 'traffic.tag' - - api_field: 'traffic.type' - - api_field: 'trafficStatuses.percent' - - api_field: 'trafficStatuses.revision' - - api_field: 'trafficStatuses.tag' - - api_field: 'trafficStatuses.type' - - api_field: 'trafficStatuses.uri' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'uri' - - api_field: 'urls' + - api_field: annotations + - api_field: binaryAuthorization.breakglassJustification + - api_field: binaryAuthorization.policy + - api_field: binaryAuthorization.useDefault + - api_field: buildConfig.baseImage + - api_field: buildConfig.enableAutomaticUpdates + - api_field: buildConfig.environmentVariables + - api_field: buildConfig.functionTarget + - api_field: buildConfig.imageUri + - api_field: buildConfig.name + - api_field: buildConfig.serviceAccount + - api_field: buildConfig.sourceLocation + - api_field: buildConfig.workerPool + - api_field: client + - api_field: clientVersion + - api_field: conditions.executionReason + - api_field: conditions.lastTransitionTime + - api_field: conditions.message + - api_field: conditions.reason + - api_field: conditions.revisionReason + - api_field: conditions.severity + - api_field: conditions.state + - api_field: conditions.type + - api_field: createTime + - api_field: creator + - api_field: customAudiences + - api_field: defaultUriDisabled + - api_field: deleteTime + - field: deletion_protection + provider_only: true + - api_field: description + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: expireTime + - api_field: generation + - api_field: ingress + - api_field: invokerIamDisabled + - api_field: labels + - api_field: lastModifier + - api_field: latestCreatedRevision + - api_field: latestReadyRevision + - api_field: launchStage + - field: location + provider_only: true + - api_field: multiRegionSettings.multiRegionId + - api_field: multiRegionSettings.regions + - field: name + provider_only: true + - api_field: observedGeneration + - api_field: reconciling + - api_field: scaling.manualInstanceCount + - api_field: scaling.maxInstanceCount + - api_field: scaling.minInstanceCount + - api_field: scaling.scalingMode + - api_field: template.annotations + - api_field: template.containers.args + - api_field: template.containers.baseImageUri + - api_field: template.containers.buildInfo.functionTarget + - api_field: template.containers.buildInfo.source_location + - api_field: template.containers.command + - api_field: template.containers.dependsOn + - api_field: template.containers.env.name + - api_field: template.containers.env.value + - api_field: template.containers.env.valueSource.secretKeyRef.secret + - api_field: template.containers.env.valueSource.secretKeyRef.version + - api_field: template.containers.image + - api_field: template.containers.livenessProbe.failureThreshold + - api_field: template.containers.livenessProbe.grpc.port + - api_field: template.containers.livenessProbe.grpc.service + - api_field: template.containers.livenessProbe.httpGet.httpHeaders.name + - api_field: template.containers.livenessProbe.httpGet.httpHeaders.value + - api_field: template.containers.livenessProbe.httpGet.path + - api_field: template.containers.livenessProbe.httpGet.port + - api_field: template.containers.livenessProbe.initialDelaySeconds + - api_field: template.containers.livenessProbe.periodSeconds + - api_field: template.containers.livenessProbe.tcpSocket.port + - api_field: template.containers.livenessProbe.timeoutSeconds + - api_field: template.containers.name + - api_field: template.containers.ports.containerPort + - api_field: template.containers.ports.name + - api_field: template.containers.resources.cpuIdle + - api_field: template.containers.resources.limits + - api_field: template.containers.resources.startupCpuBoost + - api_field: template.containers.startupProbe.failureThreshold + - api_field: template.containers.startupProbe.grpc.port + - api_field: template.containers.startupProbe.grpc.service + - api_field: template.containers.startupProbe.httpGet.httpHeaders.name + - api_field: template.containers.startupProbe.httpGet.httpHeaders.value + - api_field: template.containers.startupProbe.httpGet.path + - api_field: template.containers.startupProbe.httpGet.port + - api_field: template.containers.startupProbe.initialDelaySeconds + - api_field: template.containers.startupProbe.periodSeconds + - api_field: template.containers.startupProbe.tcpSocket.port + - api_field: template.containers.startupProbe.timeoutSeconds + - api_field: template.containers.volumeMounts.mountPath + - api_field: template.containers.volumeMounts.name + - api_field: template.containers.volumeMounts.subPath + - api_field: template.containers.workingDir + - api_field: template.encryptionKey + - api_field: template.executionEnvironment + - api_field: template.gpuZonalRedundancyDisabled + - api_field: template.healthCheckDisabled + - api_field: template.labels + - api_field: template.maxInstanceRequestConcurrency + - api_field: template.nodeSelector.accelerator + - api_field: template.revision + - api_field: template.scaling.maxInstanceCount + - api_field: template.scaling.minInstanceCount + - api_field: template.serviceAccount + - api_field: template.sessionAffinity + - api_field: template.timeout + - api_field: template.volumes.cloudSqlInstance.instances + - api_field: template.volumes.emptyDir.medium + - api_field: template.volumes.emptyDir.sizeLimit + - api_field: template.volumes.gcs.bucket + - api_field: template.volumes.gcs.mountOptions + - api_field: template.volumes.gcs.readOnly + - api_field: template.volumes.name + - api_field: template.volumes.nfs.path + - api_field: template.volumes.nfs.readOnly + - api_field: template.volumes.nfs.server + - api_field: template.volumes.secret.defaultMode + - api_field: template.volumes.secret.items.mode + - api_field: template.volumes.secret.items.path + - api_field: template.volumes.secret.items.version + - api_field: template.volumes.secret.secret + - api_field: template.vpcAccess.connector + - api_field: template.vpcAccess.egress + - api_field: template.vpcAccess.networkInterfaces.network + - api_field: template.vpcAccess.networkInterfaces.subnetwork + - api_field: template.vpcAccess.networkInterfaces.tags + - api_field: terminalCondition.executionReason + - api_field: terminalCondition.lastTransitionTime + - api_field: terminalCondition.message + - api_field: terminalCondition.reason + - api_field: terminalCondition.revisionReason + - api_field: terminalCondition.severity + - api_field: terminalCondition.state + - api_field: terminalCondition.type + - field: terraform_labels + provider_only: true + - api_field: traffic.percent + - api_field: traffic.revision + - api_field: traffic.tag + - api_field: traffic.type + - api_field: trafficStatuses.percent + - api_field: trafficStatuses.revision + - api_field: trafficStatuses.tag + - api_field: trafficStatuses.type + - api_field: trafficStatuses.uri + - api_field: uid + - api_field: updateTime + - api_field: uri + - api_field: urls diff --git a/google/services/cloudrunv2/resource_cloud_run_v2_service_zip_deploy_test.go b/google/services/cloudrunv2/resource_cloud_run_v2_service_zip_deploy_test.go new file mode 100644 index 00000000000..8998372f2f1 --- /dev/null +++ b/google/services/cloudrunv2/resource_cloud_run_v2_service_zip_deploy_test.go @@ -0,0 +1,17 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/cloudrunv2/resource_cloud_run_v2_service_zip_deploy_test.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package cloudrunv2_test diff --git a/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool.go b/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool.go index 0fe35f1f5e3..956da2d1bed 100644 --- a/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool.go +++ b/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool.go @@ -798,8 +798,9 @@ Please refer to the field 'effective_annotations' for all of the annotations pre Description: `Arbitrary version identifier for the API client.`, }, "custom_audiences": { - Type: schema.TypeList, - Optional: true, + Type: schema.TypeList, + Optional: true, + Deprecated: "`custom_audiences` is deprecated since it is not applicable to WorkerPool resource and will be removed in a future major release.", Description: `One or more custom audiences that you want this worker pool to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.`, Elem: &schema.Schema{ diff --git a/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_meta.yaml b/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_meta.yaml index 05a5e2ad695..238aec22304 100644 --- a/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_meta.yaml +++ b/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_meta.yaml @@ -1,133 +1,133 @@ -resource: 'google_cloud_run_v2_worker_pool' -generation_type: 'mmv1' -source_file: 'products/cloudrunv2/WorkerPool.yaml' -api_service_name: 'run.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'WorkerPool' +resource: google_cloud_run_v2_worker_pool +generation_type: mmv1 +source_file: products/cloudrunv2/WorkerPool.yaml +api_service_name: run.googleapis.com +api_version: v2 +api_resource_type_kind: WorkerPool fields: - - api_field: 'annotations' - - api_field: 'binaryAuthorization.breakglassJustification' - - api_field: 'binaryAuthorization.policy' - - api_field: 'binaryAuthorization.useDefault' - - api_field: 'client' - - api_field: 'clientVersion' - - api_field: 'conditions.executionReason' - - api_field: 'conditions.lastTransitionTime' - - api_field: 'conditions.message' - - api_field: 'conditions.reason' - - api_field: 'conditions.revisionReason' - - api_field: 'conditions.severity' - - api_field: 'conditions.state' - - api_field: 'conditions.type' - - api_field: 'createTime' - - api_field: 'creator' - - api_field: 'customAudiences' - - api_field: 'deleteTime' - - field: 'deletion_protection' - provider_only: true - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'expireTime' - - api_field: 'generation' - - api_field: 'instanceSplitStatuses.percent' - - api_field: 'instanceSplitStatuses.revision' - - api_field: 'instanceSplitStatuses.type' - - api_field: 'instanceSplits.percent' - - api_field: 'instanceSplits.revision' - - api_field: 'instanceSplits.type' - - api_field: 'labels' - - api_field: 'lastModifier' - - api_field: 'latestCreatedRevision' - - api_field: 'latestReadyRevision' - - api_field: 'launchStage' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'observedGeneration' - - api_field: 'reconciling' - - api_field: 'scaling.manualInstanceCount' - - api_field: 'scaling.maxInstanceCount' - - api_field: 'scaling.minInstanceCount' - - api_field: 'scaling.scalingMode' - - api_field: 'template.annotations' - - api_field: 'template.containers.args' - - api_field: 'template.containers.command' - - api_field: 'template.containers.dependsOn' - - api_field: 'template.containers.env.name' - - api_field: 'template.containers.env.value' - - api_field: 'template.containers.env.valueSource.secretKeyRef.secret' - - api_field: 'template.containers.env.valueSource.secretKeyRef.version' - - api_field: 'template.containers.image' - - api_field: 'template.containers.livenessProbe.failureThreshold' - - api_field: 'template.containers.livenessProbe.grpc.port' - - api_field: 'template.containers.livenessProbe.grpc.service' - - api_field: 'template.containers.livenessProbe.httpGet.httpHeaders.port' - - api_field: 'template.containers.livenessProbe.httpGet.httpHeaders.value' - - api_field: 'template.containers.livenessProbe.httpGet.path' - - api_field: 'template.containers.livenessProbe.httpGet.port' - - api_field: 'template.containers.livenessProbe.initialDelaySeconds' - - api_field: 'template.containers.livenessProbe.periodSeconds' - - api_field: 'template.containers.livenessProbe.tcpSocket.port' - - api_field: 'template.containers.livenessProbe.timeoutSeconds' - - api_field: 'template.containers.name' - - api_field: 'template.containers.resources.limits' - - api_field: 'template.containers.startupProbe.failureThreshold' - - api_field: 'template.containers.startupProbe.grpc.port' - - api_field: 'template.containers.startupProbe.grpc.service' - - api_field: 'template.containers.startupProbe.httpGet.httpHeaders.port' - - api_field: 'template.containers.startupProbe.httpGet.httpHeaders.value' - - api_field: 'template.containers.startupProbe.httpGet.path' - - api_field: 'template.containers.startupProbe.httpGet.port' - - api_field: 'template.containers.startupProbe.initialDelaySeconds' - - api_field: 'template.containers.startupProbe.periodSeconds' - - api_field: 'template.containers.startupProbe.tcpSocket.port' - - api_field: 'template.containers.startupProbe.timeoutSeconds' - - api_field: 'template.containers.volumeMounts.mountPath' - - api_field: 'template.containers.volumeMounts.name' - - api_field: 'template.containers.volumeMounts.subPath' - - api_field: 'template.containers.workingDir' - - api_field: 'template.encryptionKey' - - api_field: 'template.encryptionKeyRevocationAction' - - api_field: 'template.encryptionKeyShutdownDuration' - - api_field: 'template.gpuZonalRedundancyDisabled' - - api_field: 'template.labels' - - api_field: 'template.nodeSelector.accelerator' - - api_field: 'template.revision' - - api_field: 'template.serviceAccount' - - api_field: 'template.volumes.cloudSqlInstance.instances' - - api_field: 'template.volumes.emptyDir.medium' - - api_field: 'template.volumes.emptyDir.sizeLimit' - - api_field: 'template.volumes.gcs.bucket' - - api_field: 'template.volumes.gcs.mountOptions' - - api_field: 'template.volumes.gcs.readOnly' - - api_field: 'template.volumes.name' - - api_field: 'template.volumes.nfs.path' - - api_field: 'template.volumes.nfs.readOnly' - - api_field: 'template.volumes.nfs.server' - - api_field: 'template.volumes.secret.defaultMode' - - api_field: 'template.volumes.secret.items.mode' - - api_field: 'template.volumes.secret.items.path' - - api_field: 'template.volumes.secret.items.version' - - api_field: 'template.volumes.secret.secret' - - api_field: 'template.vpcAccess.connector' - - api_field: 'template.vpcAccess.egress' - - api_field: 'template.vpcAccess.networkInterfaces.network' - - api_field: 'template.vpcAccess.networkInterfaces.subnetwork' - - api_field: 'template.vpcAccess.networkInterfaces.tags' - - api_field: 'terminalCondition.executionReason' - - api_field: 'terminalCondition.lastTransitionTime' - - api_field: 'terminalCondition.message' - - api_field: 'terminalCondition.reason' - - api_field: 'terminalCondition.revisionReason' - - api_field: 'terminalCondition.severity' - - api_field: 'terminalCondition.state' - - api_field: 'terminalCondition.type' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: binaryAuthorization.breakglassJustification + - api_field: binaryAuthorization.policy + - api_field: binaryAuthorization.useDefault + - api_field: client + - api_field: clientVersion + - api_field: conditions.executionReason + - api_field: conditions.lastTransitionTime + - api_field: conditions.message + - api_field: conditions.reason + - api_field: conditions.revisionReason + - api_field: conditions.severity + - api_field: conditions.state + - api_field: conditions.type + - api_field: createTime + - api_field: creator + - api_field: customAudiences + - api_field: deleteTime + - field: deletion_protection + provider_only: true + - api_field: description + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: expireTime + - api_field: generation + - api_field: instanceSplitStatuses.percent + - api_field: instanceSplitStatuses.revision + - api_field: instanceSplitStatuses.type + - api_field: instanceSplits.percent + - api_field: instanceSplits.revision + - api_field: instanceSplits.type + - api_field: labels + - api_field: lastModifier + - api_field: latestCreatedRevision + - api_field: latestReadyRevision + - api_field: launchStage + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: observedGeneration + - api_field: reconciling + - api_field: scaling.manualInstanceCount + - api_field: scaling.maxInstanceCount + - api_field: scaling.minInstanceCount + - api_field: scaling.scalingMode + - api_field: template.annotations + - api_field: template.containers.args + - api_field: template.containers.command + - api_field: template.containers.dependsOn + - api_field: template.containers.env.name + - api_field: template.containers.env.value + - api_field: template.containers.env.valueSource.secretKeyRef.secret + - api_field: template.containers.env.valueSource.secretKeyRef.version + - api_field: template.containers.image + - api_field: template.containers.livenessProbe.failureThreshold + - api_field: template.containers.livenessProbe.grpc.port + - api_field: template.containers.livenessProbe.grpc.service + - api_field: template.containers.livenessProbe.httpGet.httpHeaders.port + - api_field: template.containers.livenessProbe.httpGet.httpHeaders.value + - api_field: template.containers.livenessProbe.httpGet.path + - api_field: template.containers.livenessProbe.httpGet.port + - api_field: template.containers.livenessProbe.initialDelaySeconds + - api_field: template.containers.livenessProbe.periodSeconds + - api_field: template.containers.livenessProbe.tcpSocket.port + - api_field: template.containers.livenessProbe.timeoutSeconds + - api_field: template.containers.name + - api_field: template.containers.resources.limits + - api_field: template.containers.startupProbe.failureThreshold + - api_field: template.containers.startupProbe.grpc.port + - api_field: template.containers.startupProbe.grpc.service + - api_field: template.containers.startupProbe.httpGet.httpHeaders.port + - api_field: template.containers.startupProbe.httpGet.httpHeaders.value + - api_field: template.containers.startupProbe.httpGet.path + - api_field: template.containers.startupProbe.httpGet.port + - api_field: template.containers.startupProbe.initialDelaySeconds + - api_field: template.containers.startupProbe.periodSeconds + - api_field: template.containers.startupProbe.tcpSocket.port + - api_field: template.containers.startupProbe.timeoutSeconds + - api_field: template.containers.volumeMounts.mountPath + - api_field: template.containers.volumeMounts.name + - api_field: template.containers.volumeMounts.subPath + - api_field: template.containers.workingDir + - api_field: template.encryptionKey + - api_field: template.encryptionKeyRevocationAction + - api_field: template.encryptionKeyShutdownDuration + - api_field: template.gpuZonalRedundancyDisabled + - api_field: template.labels + - api_field: template.nodeSelector.accelerator + - api_field: template.revision + - api_field: template.serviceAccount + - api_field: template.volumes.cloudSqlInstance.instances + - api_field: template.volumes.emptyDir.medium + - api_field: template.volumes.emptyDir.sizeLimit + - api_field: template.volumes.gcs.bucket + - api_field: template.volumes.gcs.mountOptions + - api_field: template.volumes.gcs.readOnly + - api_field: template.volumes.name + - api_field: template.volumes.nfs.path + - api_field: template.volumes.nfs.readOnly + - api_field: template.volumes.nfs.server + - api_field: template.volumes.secret.defaultMode + - api_field: template.volumes.secret.items.mode + - api_field: template.volumes.secret.items.path + - api_field: template.volumes.secret.items.version + - api_field: template.volumes.secret.secret + - api_field: template.vpcAccess.connector + - api_field: template.vpcAccess.egress + - api_field: template.vpcAccess.networkInterfaces.network + - api_field: template.vpcAccess.networkInterfaces.subnetwork + - api_field: template.vpcAccess.networkInterfaces.tags + - api_field: terminalCondition.executionReason + - api_field: terminalCondition.lastTransitionTime + - api_field: terminalCondition.message + - api_field: terminalCondition.reason + - api_field: terminalCondition.revisionReason + - api_field: terminalCondition.severity + - api_field: terminalCondition.state + - api_field: terminalCondition.type + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_test.go b/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_test.go index 67a762b97b0..660af31a81b 100644 --- a/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_test.go +++ b/google/services/cloudrunv2/resource_cloud_run_v2_worker_pool_generated_test.go @@ -747,55 +747,6 @@ resource "google_filestore_instance" "default" { `, context) } -func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolCustomAudiencesExample(t *testing.T) { - t.Parallel() - - context := map[string]interface{}{ - "random_suffix": acctest.RandString(t, 10), - } - - acctest.VcrTest(t, resource.TestCase{ - PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), - CheckDestroy: testAccCheckCloudRunV2WorkerPoolDestroyProducer(t), - Steps: []resource.TestStep{ - { - Config: testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolCustomAudiencesExample(context), - }, - { - ResourceName: "google_cloud_run_v2_worker_pool.default", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"annotations", "deletion_protection", "labels", "location", "name", "terraform_labels"}, - }, - { - ResourceName: "google_cloud_run_v2_worker_pool.default", - RefreshState: true, - ExpectNonEmptyPlan: true, - ImportStateKind: resource.ImportBlockWithResourceIdentity, - }, - }, - }) -} - -func testAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolCustomAudiencesExample(context map[string]interface{}) string { - return acctest.Nprintf(` -resource "google_cloud_run_v2_worker_pool" "default" { - name = "tf-test-cloudrun-worker-pool%{random_suffix}" - location = "us-central1" - deletion_protection = false - launch_stage = "BETA" - - custom_audiences = ["aud1"] - template { - containers { - image = "us-docker.pkg.dev/cloudrun/container/worker-pool" - } - } -} -`, context) -} - func TestAccCloudRunV2WorkerPool_cloudrunv2WorkerPoolStartupLivenessProbeExample(t *testing.T) { t.Parallel() diff --git a/google/services/cloudrunv2/test-fixtures/cr-zip-nodejs-hello.tar.gz b/google/services/cloudrunv2/test-fixtures/cr-zip-nodejs-hello.tar.gz new file mode 100644 index 00000000000..4c406391738 Binary files /dev/null and b/google/services/cloudrunv2/test-fixtures/cr-zip-nodejs-hello.tar.gz differ diff --git a/google/services/cloudrunv2/test-fixtures/cr-zip-py-hello.tar.gz b/google/services/cloudrunv2/test-fixtures/cr-zip-py-hello.tar.gz new file mode 100644 index 00000000000..ea0303b3dce Binary files /dev/null and b/google/services/cloudrunv2/test-fixtures/cr-zip-py-hello.tar.gz differ diff --git a/google/services/cloudscheduler/resource_cloud_scheduler_job_generated_meta.yaml b/google/services/cloudscheduler/resource_cloud_scheduler_job_generated_meta.yaml index b6f492f124a..73204d3d95c 100644 --- a/google/services/cloudscheduler/resource_cloud_scheduler_job_generated_meta.yaml +++ b/google/services/cloudscheduler/resource_cloud_scheduler_job_generated_meta.yaml @@ -1,39 +1,39 @@ -resource: 'google_cloud_scheduler_job' -generation_type: 'mmv1' -source_file: 'products/cloudscheduler/Job.yaml' -api_service_name: 'cloudscheduler.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Job' +resource: google_cloud_scheduler_job +generation_type: mmv1 +source_file: products/cloudscheduler/Job.yaml +api_service_name: cloudscheduler.googleapis.com +api_version: v1 +api_resource_type_kind: Job fields: - - api_field: 'appEngineHttpTarget.appEngineRouting.instance' - - api_field: 'appEngineHttpTarget.appEngineRouting.service' - - api_field: 'appEngineHttpTarget.appEngineRouting.version' - - api_field: 'appEngineHttpTarget.body' - - api_field: 'appEngineHttpTarget.headers' - - api_field: 'appEngineHttpTarget.httpMethod' - - api_field: 'appEngineHttpTarget.relativeUri' - - api_field: 'attemptDeadline' - - api_field: 'description' - - api_field: 'httpTarget.body' - - api_field: 'httpTarget.headers' - - api_field: 'httpTarget.httpMethod' - - api_field: 'httpTarget.oauthToken.scope' - - api_field: 'httpTarget.oauthToken.serviceAccountEmail' - - api_field: 'httpTarget.oidcToken.audience' - - api_field: 'httpTarget.oidcToken.serviceAccountEmail' - - api_field: 'httpTarget.uri' - - api_field: 'name' - - api_field: 'paused' - - api_field: 'pubsubTarget.attributes' - - api_field: 'pubsubTarget.data' - - api_field: 'pubsubTarget.topicName' - - field: 'region' - provider_only: true - - api_field: 'retryConfig.maxBackoffDuration' - - api_field: 'retryConfig.maxDoublings' - - api_field: 'retryConfig.maxRetryDuration' - - api_field: 'retryConfig.minBackoffDuration' - - api_field: 'retryConfig.retryCount' - - api_field: 'schedule' - - api_field: 'state' - - api_field: 'timeZone' + - api_field: appEngineHttpTarget.appEngineRouting.instance + - api_field: appEngineHttpTarget.appEngineRouting.service + - api_field: appEngineHttpTarget.appEngineRouting.version + - api_field: appEngineHttpTarget.body + - api_field: appEngineHttpTarget.headers + - api_field: appEngineHttpTarget.httpMethod + - api_field: appEngineHttpTarget.relativeUri + - api_field: attemptDeadline + - api_field: description + - api_field: httpTarget.body + - api_field: httpTarget.headers + - api_field: httpTarget.httpMethod + - api_field: httpTarget.oauthToken.scope + - api_field: httpTarget.oauthToken.serviceAccountEmail + - api_field: httpTarget.oidcToken.audience + - api_field: httpTarget.oidcToken.serviceAccountEmail + - api_field: httpTarget.uri + - api_field: name + - api_field: paused + - api_field: pubsubTarget.attributes + - api_field: pubsubTarget.data + - api_field: pubsubTarget.topicName + - field: region + provider_only: true + - api_field: retryConfig.maxBackoffDuration + - api_field: retryConfig.maxDoublings + - api_field: retryConfig.maxRetryDuration + - api_field: retryConfig.minBackoffDuration + - api_field: retryConfig.retryCount + - api_field: schedule + - api_field: state + - api_field: timeZone diff --git a/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_cloud_control_generated_meta.yaml b/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_cloud_control_generated_meta.yaml index b29959a81e1..1d26675f467 100644 --- a/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_cloud_control_generated_meta.yaml +++ b/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_cloud_control_generated_meta.yaml @@ -1,87 +1,87 @@ -resource: 'google_cloud_security_compliance_cloud_control' -generation_type: 'mmv1' -source_file: 'products/cloudsecuritycompliance/CloudControl.yaml' -api_service_name: 'cloudsecuritycompliance.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CloudControl' +resource: google_cloud_security_compliance_cloud_control +generation_type: mmv1 +source_file: products/cloudsecuritycompliance/CloudControl.yaml +api_service_name: cloudsecuritycompliance.googleapis.com +api_version: v1 +api_resource_type_kind: CloudControl autogen_status: true fields: - - api_field: 'categories' - - field: 'cloud_control_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'findingCategory' - - field: 'location' - provider_only: true - - api_field: 'majorRevisionId' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'parameterSpec.defaultValue.boolValue' - - api_field: 'parameterSpec.defaultValue.numberValue' - - api_field: 'parameterSpec.defaultValue.oneofValue.name' - - api_field: 'parameterSpec.defaultValue.oneofValue.parameterValue.boolValue' - - api_field: 'parameterSpec.defaultValue.oneofValue.parameterValue.numberValue' - - api_field: 'parameterSpec.defaultValue.oneofValue.parameterValue.stringListValue.values' - - api_field: 'parameterSpec.defaultValue.oneofValue.parameterValue.stringValue' - - api_field: 'parameterSpec.defaultValue.stringListValue.values' - - api_field: 'parameterSpec.defaultValue.stringValue' - - api_field: 'parameterSpec.description' - - api_field: 'parameterSpec.displayName' - - api_field: 'parameterSpec.isRequired' - - api_field: 'parameterSpec.name' - - api_field: 'parameterSpec.subParameters.defaultValue.boolValue' - - api_field: 'parameterSpec.subParameters.defaultValue.numberValue' - - api_field: 'parameterSpec.subParameters.defaultValue.oneofValue.name' - - api_field: 'parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.boolValue' - - api_field: 'parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.numberValue' - - api_field: 'parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.stringListValue.values' - - api_field: 'parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.stringValue' - - api_field: 'parameterSpec.subParameters.defaultValue.stringListValue.values' - - api_field: 'parameterSpec.subParameters.defaultValue.stringValue' - - api_field: 'parameterSpec.subParameters.description' - - api_field: 'parameterSpec.subParameters.displayName' - - api_field: 'parameterSpec.subParameters.isRequired' - - api_field: 'parameterSpec.subParameters.name' - - api_field: 'parameterSpec.subParameters.substitutionRules.attributeSubstitutionRule.attribute' - - api_field: 'parameterSpec.subParameters.substitutionRules.placeholderSubstitutionRule.attribute' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.boolValue' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.numberValue' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.oneofValue.name' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.boolValue' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.numberValue' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.stringListValue.values' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.stringValue' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.stringListValue.values' - - api_field: 'parameterSpec.subParameters.validation.allowedValues.values.stringValue' - - api_field: 'parameterSpec.subParameters.validation.intRange.max' - - api_field: 'parameterSpec.subParameters.validation.intRange.min' - - api_field: 'parameterSpec.subParameters.validation.regexpPattern.pattern' - - api_field: 'parameterSpec.subParameters.valueType' - - api_field: 'parameterSpec.substitutionRules.attributeSubstitutionRule.attribute' - - api_field: 'parameterSpec.substitutionRules.placeholderSubstitutionRule.attribute' - - api_field: 'parameterSpec.validation.allowedValues.values.boolValue' - - api_field: 'parameterSpec.validation.allowedValues.values.numberValue' - - api_field: 'parameterSpec.validation.allowedValues.values.oneofValue.name' - - api_field: 'parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.boolValue' - - api_field: 'parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.numberValue' - - api_field: 'parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.stringListValue.values' - - api_field: 'parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.stringValue' - - api_field: 'parameterSpec.validation.allowedValues.values.stringListValue.values' - - api_field: 'parameterSpec.validation.allowedValues.values.stringValue' - - api_field: 'parameterSpec.validation.intRange.max' - - api_field: 'parameterSpec.validation.intRange.min' - - api_field: 'parameterSpec.validation.regexpPattern.pattern' - - api_field: 'parameterSpec.valueType' - - api_field: 'relatedFrameworks' - - api_field: 'remediationSteps' - - api_field: 'rules.celExpression.expression' - - api_field: 'rules.celExpression.resourceTypesValues.values' - - api_field: 'rules.description' - - api_field: 'rules.ruleActionTypes' - - api_field: 'severity' - - api_field: 'supportedCloudProviders' - - api_field: 'supportedEnforcementModes' - - api_field: 'supportedTargetResourceTypes' + - api_field: categories + - field: cloud_control_id + provider_only: true + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: findingCategory + - field: location + provider_only: true + - api_field: majorRevisionId + - api_field: name + - field: organization + provider_only: true + - api_field: parameterSpec.defaultValue.boolValue + - api_field: parameterSpec.defaultValue.numberValue + - api_field: parameterSpec.defaultValue.oneofValue.name + - api_field: parameterSpec.defaultValue.oneofValue.parameterValue.boolValue + - api_field: parameterSpec.defaultValue.oneofValue.parameterValue.numberValue + - api_field: parameterSpec.defaultValue.oneofValue.parameterValue.stringListValue.values + - api_field: parameterSpec.defaultValue.oneofValue.parameterValue.stringValue + - api_field: parameterSpec.defaultValue.stringListValue.values + - api_field: parameterSpec.defaultValue.stringValue + - api_field: parameterSpec.description + - api_field: parameterSpec.displayName + - api_field: parameterSpec.isRequired + - api_field: parameterSpec.name + - api_field: parameterSpec.subParameters.defaultValue.boolValue + - api_field: parameterSpec.subParameters.defaultValue.numberValue + - api_field: parameterSpec.subParameters.defaultValue.oneofValue.name + - api_field: parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.boolValue + - api_field: parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.numberValue + - api_field: parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.stringListValue.values + - api_field: parameterSpec.subParameters.defaultValue.oneofValue.parameterValue.stringValue + - api_field: parameterSpec.subParameters.defaultValue.stringListValue.values + - api_field: parameterSpec.subParameters.defaultValue.stringValue + - api_field: parameterSpec.subParameters.description + - api_field: parameterSpec.subParameters.displayName + - api_field: parameterSpec.subParameters.isRequired + - api_field: parameterSpec.subParameters.name + - api_field: parameterSpec.subParameters.substitutionRules.attributeSubstitutionRule.attribute + - api_field: parameterSpec.subParameters.substitutionRules.placeholderSubstitutionRule.attribute + - api_field: parameterSpec.subParameters.validation.allowedValues.values.boolValue + - api_field: parameterSpec.subParameters.validation.allowedValues.values.numberValue + - api_field: parameterSpec.subParameters.validation.allowedValues.values.oneofValue.name + - api_field: parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.boolValue + - api_field: parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.numberValue + - api_field: parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.stringListValue.values + - api_field: parameterSpec.subParameters.validation.allowedValues.values.oneofValue.parameterValue.stringValue + - api_field: parameterSpec.subParameters.validation.allowedValues.values.stringListValue.values + - api_field: parameterSpec.subParameters.validation.allowedValues.values.stringValue + - api_field: parameterSpec.subParameters.validation.intRange.max + - api_field: parameterSpec.subParameters.validation.intRange.min + - api_field: parameterSpec.subParameters.validation.regexpPattern.pattern + - api_field: parameterSpec.subParameters.valueType + - api_field: parameterSpec.substitutionRules.attributeSubstitutionRule.attribute + - api_field: parameterSpec.substitutionRules.placeholderSubstitutionRule.attribute + - api_field: parameterSpec.validation.allowedValues.values.boolValue + - api_field: parameterSpec.validation.allowedValues.values.numberValue + - api_field: parameterSpec.validation.allowedValues.values.oneofValue.name + - api_field: parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.boolValue + - api_field: parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.numberValue + - api_field: parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.stringListValue.values + - api_field: parameterSpec.validation.allowedValues.values.oneofValue.parameterValue.stringValue + - api_field: parameterSpec.validation.allowedValues.values.stringListValue.values + - api_field: parameterSpec.validation.allowedValues.values.stringValue + - api_field: parameterSpec.validation.intRange.max + - api_field: parameterSpec.validation.intRange.min + - api_field: parameterSpec.validation.regexpPattern.pattern + - api_field: parameterSpec.valueType + - api_field: relatedFrameworks + - api_field: remediationSteps + - api_field: rules.celExpression.expression + - api_field: rules.celExpression.resourceTypesValues.values + - api_field: rules.description + - api_field: rules.ruleActionTypes + - api_field: severity + - api_field: supportedCloudProviders + - api_field: supportedEnforcementModes + - api_field: supportedTargetResourceTypes diff --git a/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_deployment_generated_meta.yaml b/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_deployment_generated_meta.yaml index dff02f4af7a..8610b504046 100644 --- a/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_deployment_generated_meta.yaml +++ b/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_deployment_generated_meta.yaml @@ -1,44 +1,44 @@ -resource: 'google_cloud_security_compliance_framework_deployment' -generation_type: 'mmv1' -source_file: 'products/cloudsecuritycompliance/FrameworkDeployment.yaml' -api_service_name: 'cloudsecuritycompliance.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FrameworkDeployment' +resource: google_cloud_security_compliance_framework_deployment +generation_type: mmv1 +source_file: products/cloudsecuritycompliance/FrameworkDeployment.yaml +api_service_name: cloudsecuritycompliance.googleapis.com +api_version: v1 +api_resource_type_kind: FrameworkDeployment autogen_status: true fields: - - api_field: 'cloudControlDeploymentReferences.cloudControlDeployment' - - api_field: 'cloudControlMetadata.cloudControlDetails.majorRevisionId' - - api_field: 'cloudControlMetadata.cloudControlDetails.name' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.name' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.boolValue' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.numberValue' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.name' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.boolValue' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.numberValue' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringListValue.values' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringValue' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.stringListValue.values' - - api_field: 'cloudControlMetadata.cloudControlDetails.parameters.parameterValue.stringValue' - - api_field: 'cloudControlMetadata.enforcementMode' - - api_field: 'computedTargetResource' - - api_field: 'createTime' - - api_field: 'deploymentState' - - api_field: 'description' - - api_field: 'etag' - - api_field: 'framework.framework' - - api_field: 'framework.majorRevisionId' - - field: 'framework_deployment_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'targetResourceConfig.existingTargetResource' - - api_field: 'targetResourceConfig.targetResourceCreationConfig.folderCreationConfig.folderDisplayName' - - api_field: 'targetResourceConfig.targetResourceCreationConfig.folderCreationConfig.parent' - - api_field: 'targetResourceConfig.targetResourceCreationConfig.projectCreationConfig.billingAccountId' - - api_field: 'targetResourceConfig.targetResourceCreationConfig.projectCreationConfig.parent' - - api_field: 'targetResourceConfig.targetResourceCreationConfig.projectCreationConfig.projectDisplayName' - - api_field: 'targetResourceDisplayName' - - api_field: 'updateTime' + - api_field: cloudControlDeploymentReferences.cloudControlDeployment + - api_field: cloudControlMetadata.cloudControlDetails.majorRevisionId + - api_field: cloudControlMetadata.cloudControlDetails.name + - api_field: cloudControlMetadata.cloudControlDetails.parameters.name + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.boolValue + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.numberValue + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.name + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.boolValue + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.numberValue + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringListValue.values + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringValue + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.stringListValue.values + - api_field: cloudControlMetadata.cloudControlDetails.parameters.parameterValue.stringValue + - api_field: cloudControlMetadata.enforcementMode + - api_field: computedTargetResource + - api_field: createTime + - api_field: deploymentState + - api_field: description + - api_field: etag + - api_field: framework.framework + - api_field: framework.majorRevisionId + - field: framework_deployment_id + provider_only: true + - field: location + provider_only: true + - api_field: name + - field: organization + provider_only: true + - api_field: targetResourceConfig.existingTargetResource + - api_field: targetResourceConfig.targetResourceCreationConfig.folderCreationConfig.folderDisplayName + - api_field: targetResourceConfig.targetResourceCreationConfig.folderCreationConfig.parent + - api_field: targetResourceConfig.targetResourceCreationConfig.projectCreationConfig.billingAccountId + - api_field: targetResourceConfig.targetResourceCreationConfig.projectCreationConfig.parent + - api_field: targetResourceConfig.targetResourceCreationConfig.projectCreationConfig.projectDisplayName + - api_field: targetResourceDisplayName + - api_field: updateTime diff --git a/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_generated_meta.yaml b/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_generated_meta.yaml index 84d863d4b8e..8c213a1df42 100644 --- a/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_generated_meta.yaml +++ b/google/services/cloudsecuritycompliance/resource_cloud_security_compliance_framework_generated_meta.yaml @@ -1,35 +1,35 @@ -resource: 'google_cloud_security_compliance_framework' -generation_type: 'mmv1' -source_file: 'products/cloudsecuritycompliance/Framework.yaml' -api_service_name: 'cloudsecuritycompliance.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Framework' +resource: google_cloud_security_compliance_framework +generation_type: mmv1 +source_file: products/cloudsecuritycompliance/Framework.yaml +api_service_name: cloudsecuritycompliance.googleapis.com +api_version: v1 +api_resource_type_kind: Framework autogen_status: true fields: - - api_field: 'category' - - api_field: 'cloudControlDetails.majorRevisionId' - - api_field: 'cloudControlDetails.name' - - api_field: 'cloudControlDetails.parameters.name' - - api_field: 'cloudControlDetails.parameters.parameterValue.boolValue' - - api_field: 'cloudControlDetails.parameters.parameterValue.numberValue' - - api_field: 'cloudControlDetails.parameters.parameterValue.oneofValue.name' - - api_field: 'cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.boolValue' - - api_field: 'cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.numberValue' - - api_field: 'cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringListValue.values' - - api_field: 'cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringValue' - - api_field: 'cloudControlDetails.parameters.parameterValue.stringListValue.values' - - api_field: 'cloudControlDetails.parameters.parameterValue.stringValue' - - api_field: 'description' - - api_field: 'displayName' - - field: 'framework_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'majorRevisionId' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'supportedCloudProviders' - - api_field: 'supportedEnforcementModes' - - api_field: 'supportedTargetResourceTypes' - - api_field: 'type' + - api_field: category + - api_field: cloudControlDetails.majorRevisionId + - api_field: cloudControlDetails.name + - api_field: cloudControlDetails.parameters.name + - api_field: cloudControlDetails.parameters.parameterValue.boolValue + - api_field: cloudControlDetails.parameters.parameterValue.numberValue + - api_field: cloudControlDetails.parameters.parameterValue.oneofValue.name + - api_field: cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.boolValue + - api_field: cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.numberValue + - api_field: cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringListValue.values + - api_field: cloudControlDetails.parameters.parameterValue.oneofValue.parameterValue.stringValue + - api_field: cloudControlDetails.parameters.parameterValue.stringListValue.values + - api_field: cloudControlDetails.parameters.parameterValue.stringValue + - api_field: description + - api_field: displayName + - field: framework_id + provider_only: true + - field: location + provider_only: true + - api_field: majorRevisionId + - api_field: name + - field: organization + provider_only: true + - api_field: supportedCloudProviders + - api_field: supportedEnforcementModes + - api_field: supportedTargetResourceTypes + - api_field: type diff --git a/google/services/cloudtasks/iam_cloud_tasks_queue_generated_test.go b/google/services/cloudtasks/iam_cloud_tasks_queue_generated_test.go index 0ec6b337f38..37a30e66c2b 100644 --- a/google/services/cloudtasks/iam_cloud_tasks_queue_generated_test.go +++ b/google/services/cloudtasks/iam_cloud_tasks_queue_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccCloudTasksQueueIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_tasks_queue_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/queues/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-tasks-queue-test%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudTasksQueueIAMBindingStateID("google_cloud_tasks_queue_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccCloudTasksQueueIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_cloud_tasks_queue_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/queues/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-tasks-queue-test%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudTasksQueueIAMBindingStateID("google_cloud_tasks_queue_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccCloudTasksQueueIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_cloud_tasks_queue_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/queues/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-tasks-queue-test%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudTasksQueueIAMMemberStateID("google_cloud_tasks_queue_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccCloudTasksQueueIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_tasks_queue_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/queues/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-tasks-queue-test%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudTasksQueueIAMPolicyStateID("google_cloud_tasks_queue_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccCloudTasksQueueIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_cloud_tasks_queue_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/queues/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-tasks-queue-test%s", context["random_suffix"])), + ImportStateIdFunc: generateCloudTasksQueueIAMPolicyStateID("google_cloud_tasks_queue_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -235,3 +236,57 @@ resource "google_cloud_tasks_queue_iam_binding" "foo" { } `, context) } + +func generateCloudTasksQueueIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/queues/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateCloudTasksQueueIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/queues/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateCloudTasksQueueIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/queues/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/cloudtasks/resource_cloud_tasks_queue_generated_meta.yaml b/google/services/cloudtasks/resource_cloud_tasks_queue_generated_meta.yaml index dbcd36ae772..d1357f08da8 100644 --- a/google/services/cloudtasks/resource_cloud_tasks_queue_generated_meta.yaml +++ b/google/services/cloudtasks/resource_cloud_tasks_queue_generated_meta.yaml @@ -1,39 +1,39 @@ -resource: 'google_cloud_tasks_queue' -generation_type: 'mmv1' -source_file: 'products/cloudtasks/Queue.yaml' -api_service_name: 'cloudtasks.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Queue' +resource: google_cloud_tasks_queue +generation_type: mmv1 +source_file: products/cloudtasks/Queue.yaml +api_service_name: cloudtasks.googleapis.com +api_version: v2 +api_resource_type_kind: Queue fields: - - api_field: 'appEngineRoutingOverride.host' - - api_field: 'appEngineRoutingOverride.instance' - - api_field: 'appEngineRoutingOverride.service' - - api_field: 'appEngineRoutingOverride.version' - - field: 'desired_state' - provider_only: true - - api_field: 'httpTarget.headerOverrides.header.key' - - api_field: 'httpTarget.headerOverrides.header.value' - - api_field: 'httpTarget.httpMethod' - - api_field: 'httpTarget.oauthToken.scope' - - api_field: 'httpTarget.oauthToken.serviceAccountEmail' - - api_field: 'httpTarget.oidcToken.audience' - - api_field: 'httpTarget.oidcToken.serviceAccountEmail' - - api_field: 'httpTarget.uriOverride.host' - - api_field: 'httpTarget.uriOverride.pathOverride.path' - - api_field: 'httpTarget.uriOverride.port' - - api_field: 'httpTarget.uriOverride.queryOverride.queryParams' - - api_field: 'httpTarget.uriOverride.scheme' - - api_field: 'httpTarget.uriOverride.uriOverrideEnforceMode' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'rateLimits.maxBurstSize' - - api_field: 'rateLimits.maxConcurrentDispatches' - - api_field: 'rateLimits.maxDispatchesPerSecond' - - api_field: 'retryConfig.maxAttempts' - - api_field: 'retryConfig.maxBackoff' - - api_field: 'retryConfig.maxDoublings' - - api_field: 'retryConfig.maxRetryDuration' - - api_field: 'retryConfig.minBackoff' - - api_field: 'stackdriverLoggingConfig.samplingRatio' - - api_field: 'state' + - api_field: appEngineRoutingOverride.host + - api_field: appEngineRoutingOverride.instance + - api_field: appEngineRoutingOverride.service + - api_field: appEngineRoutingOverride.version + - field: desired_state + provider_only: true + - api_field: httpTarget.headerOverrides.header.key + - api_field: httpTarget.headerOverrides.header.value + - api_field: httpTarget.httpMethod + - api_field: httpTarget.oauthToken.scope + - api_field: httpTarget.oauthToken.serviceAccountEmail + - api_field: httpTarget.oidcToken.audience + - api_field: httpTarget.oidcToken.serviceAccountEmail + - api_field: httpTarget.uriOverride.host + - api_field: httpTarget.uriOverride.pathOverride.path + - api_field: httpTarget.uriOverride.port + - api_field: httpTarget.uriOverride.queryOverride.queryParams + - api_field: httpTarget.uriOverride.scheme + - api_field: httpTarget.uriOverride.uriOverrideEnforceMode + - field: location + provider_only: true + - api_field: name + - api_field: rateLimits.maxBurstSize + - api_field: rateLimits.maxConcurrentDispatches + - api_field: rateLimits.maxDispatchesPerSecond + - api_field: retryConfig.maxAttempts + - api_field: retryConfig.maxBackoff + - api_field: retryConfig.maxDoublings + - api_field: retryConfig.maxRetryDuration + - api_field: retryConfig.minBackoff + - api_field: stackdriverLoggingConfig.samplingRatio + - api_field: state diff --git a/google/services/colab/iam_colab_runtime_template_generated_test.go b/google/services/colab/iam_colab_runtime_template_generated_test.go index 5b112f8bdf4..c71084d54a4 100644 --- a/google/services/colab/iam_colab_runtime_template_generated_test.go +++ b/google/services/colab/iam_colab_runtime_template_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccColabRuntimeTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_colab_runtime_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-colab-runtime-template%s", context["random_suffix"])), + ImportStateIdFunc: generateColabRuntimeTemplateIAMBindingStateID("google_colab_runtime_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccColabRuntimeTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_colab_runtime_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-colab-runtime-template%s", context["random_suffix"])), + ImportStateIdFunc: generateColabRuntimeTemplateIAMBindingStateID("google_colab_runtime_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccColabRuntimeTemplateIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_colab_runtime_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-colab-runtime-template%s", context["random_suffix"])), + ImportStateIdFunc: generateColabRuntimeTemplateIAMMemberStateID("google_colab_runtime_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccColabRuntimeTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_colab_runtime_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-colab-runtime-template%s", context["random_suffix"])), + ImportStateIdFunc: generateColabRuntimeTemplateIAMPolicyStateID("google_colab_runtime_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccColabRuntimeTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_colab_runtime_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-colab-runtime-template%s", context["random_suffix"])), + ImportStateIdFunc: generateColabRuntimeTemplateIAMPolicyStateID("google_colab_runtime_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -280,3 +281,57 @@ resource "google_colab_runtime_template_iam_binding" "foo" { } `, context) } + +func generateColabRuntimeTemplateIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + runtime_template := tpgresource.GetResourceNameFromSelfLink(rawState["runtime_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s", project, location, runtime_template), "", "", rawState["condition.0.title"]), nil + } +} + +func generateColabRuntimeTemplateIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + runtime_template := tpgresource.GetResourceNameFromSelfLink(rawState["runtime_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s", project, location, runtime_template), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateColabRuntimeTemplateIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + runtime_template := tpgresource.GetResourceNameFromSelfLink(rawState["runtime_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/notebookRuntimeTemplates/%s", project, location, runtime_template), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/colab/resource_colab_notebook_execution_generated_meta.yaml b/google/services/colab/resource_colab_notebook_execution_generated_meta.yaml index 2e110f2c55c..282d447f67b 100644 --- a/google/services/colab/resource_colab_notebook_execution_generated_meta.yaml +++ b/google/services/colab/resource_colab_notebook_execution_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_colab_notebook_execution' -generation_type: 'mmv1' -source_file: 'products/colab/NotebookExecution.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NotebookExecutionJob' +resource: google_colab_notebook_execution +generation_type: mmv1 +source_file: products/colab/NotebookExecution.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: NotebookExecutionJob fields: - - api_field: 'customEnvironmentSpec.machineSpec.acceleratorCount' - - api_field: 'customEnvironmentSpec.machineSpec.acceleratorType' - - api_field: 'customEnvironmentSpec.machineSpec.machineType' - - api_field: 'customEnvironmentSpec.networkSpec.enableInternetAccess' - - api_field: 'customEnvironmentSpec.networkSpec.network' - - api_field: 'customEnvironmentSpec.networkSpec.subnetwork' - - api_field: 'customEnvironmentSpec.persistentDiskSpec.diskSizeGb' - - api_field: 'customEnvironmentSpec.persistentDiskSpec.diskType' - - api_field: 'dataformRepositorySource.commitSha' - - api_field: 'dataformRepositorySource.dataformRepositoryResourceName' - - api_field: 'directNotebookSource.content' - - api_field: 'displayName' - - api_field: 'executionTimeout' - - api_field: 'executionUser' - - api_field: 'gcsNotebookSource.generation' - - api_field: 'gcsNotebookSource.uri' - - api_field: 'gcsOutputUri' - - field: 'location' - provider_only: true - - field: 'notebook_execution_job_id' - provider_only: true - - api_field: 'notebookRuntimeTemplateResourceName' - - api_field: 'serviceAccount' + - api_field: customEnvironmentSpec.machineSpec.acceleratorCount + - api_field: customEnvironmentSpec.machineSpec.acceleratorType + - api_field: customEnvironmentSpec.machineSpec.machineType + - api_field: customEnvironmentSpec.networkSpec.enableInternetAccess + - api_field: customEnvironmentSpec.networkSpec.network + - api_field: customEnvironmentSpec.networkSpec.subnetwork + - api_field: customEnvironmentSpec.persistentDiskSpec.diskSizeGb + - api_field: customEnvironmentSpec.persistentDiskSpec.diskType + - api_field: dataformRepositorySource.commitSha + - api_field: dataformRepositorySource.dataformRepositoryResourceName + - api_field: directNotebookSource.content + - api_field: displayName + - api_field: executionTimeout + - api_field: executionUser + - api_field: gcsNotebookSource.generation + - api_field: gcsNotebookSource.uri + - api_field: gcsOutputUri + - field: location + provider_only: true + - field: notebook_execution_job_id + provider_only: true + - api_field: notebookRuntimeTemplateResourceName + - api_field: serviceAccount diff --git a/google/services/colab/resource_colab_runtime_generated_meta.yaml b/google/services/colab/resource_colab_runtime_generated_meta.yaml index 6f6a5b9fef9..90113c8d4e7 100644 --- a/google/services/colab/resource_colab_runtime_generated_meta.yaml +++ b/google/services/colab/resource_colab_runtime_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_colab_runtime' -generation_type: 'mmv1' -source_file: 'products/colab/Runtime.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NotebookRuntime' +resource: google_colab_runtime +generation_type: mmv1 +source_file: products/colab/Runtime.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: NotebookRuntime fields: - - field: 'auto_upgrade' - provider_only: true - - api_field: 'description' - - field: 'desired_state' - provider_only: true - - api_field: 'displayName' - - api_field: 'expirationTime' - - api_field: 'isUpgradable' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'notebookRuntimeTemplateRef.notebookRuntimeTemplate' - - api_field: 'notebookRuntimeType' - - api_field: 'runtimeUser' - - api_field: 'state' + - field: auto_upgrade + provider_only: true + - api_field: description + - field: desired_state + provider_only: true + - api_field: displayName + - api_field: expirationTime + - api_field: isUpgradable + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: notebookRuntimeTemplateRef.notebookRuntimeTemplate + - api_field: notebookRuntimeType + - api_field: runtimeUser + - api_field: state diff --git a/google/services/colab/resource_colab_runtime_template.go b/google/services/colab/resource_colab_runtime_template.go index d1ff47b1067..bad4ff7b22f 100644 --- a/google/services/colab/resource_colab_runtime_template.go +++ b/google/services/colab/resource_colab_runtime_template.go @@ -372,6 +372,36 @@ Please refer to the field 'effective_labels' for all of the labels present on th }, }, }, + "post_startup_script_config": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `Post startup script config.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "post_startup_script": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Post startup script to run after runtime is started.`, + }, + "post_startup_script_behavior": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: verify.ValidateEnum([]string{"RUN_ONCE", "RUN_EVERY_START", "DOWNLOAD_AND_RUN_EVERY_START", ""}), + Description: `Post startup script behavior that defines download and execution behavior. Possible values: ["RUN_ONCE", "RUN_EVERY_START", "DOWNLOAD_AND_RUN_EVERY_START"]`, + }, + "post_startup_script_url": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Post startup script url to download. Example: https://bucket/script.sh.`, + }, + }, + }, + }, }, }, }, @@ -984,6 +1014,8 @@ func flattenColabRuntimeTemplateSoftwareConfig(v interface{}, d *schema.Resource transformed := make(map[string]interface{}) transformed["env"] = flattenColabRuntimeTemplateSoftwareConfigEnv(original["env"], d, config) + transformed["post_startup_script_config"] = + flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfig(original["postStartupScriptConfig"], d, config) return []interface{}{transformed} } func flattenColabRuntimeTemplateSoftwareConfigEnv(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -1013,6 +1045,35 @@ func flattenColabRuntimeTemplateSoftwareConfigEnvValue(v interface{}, d *schema. return v } +func flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["post_startup_script"] = + flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScript(original["postStartupScript"], d, config) + transformed["post_startup_script_url"] = + flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptUrl(original["postStartupScriptUrl"], d, config) + transformed["post_startup_script_behavior"] = + flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptBehavior(original["postStartupScriptBehavior"], d, config) + return []interface{}{transformed} +} +func flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScript(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptUrl(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptBehavior(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenColabRuntimeTemplateTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v @@ -1304,6 +1365,13 @@ func expandColabRuntimeTemplateSoftwareConfig(v interface{}, d tpgresource.Terra transformed["env"] = transformedEnv } + transformedPostStartupScriptConfig, err := expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfig(original["post_startup_script_config"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPostStartupScriptConfig); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["postStartupScriptConfig"] = transformedPostStartupScriptConfig + } + return transformed, nil } @@ -1347,6 +1415,54 @@ func expandColabRuntimeTemplateSoftwareConfigEnvValue(v interface{}, d tpgresour return v, nil } +func expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedPostStartupScript, err := expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScript(original["post_startup_script"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPostStartupScript); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["postStartupScript"] = transformedPostStartupScript + } + + transformedPostStartupScriptUrl, err := expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptUrl(original["post_startup_script_url"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPostStartupScriptUrl); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["postStartupScriptUrl"] = transformedPostStartupScriptUrl + } + + transformedPostStartupScriptBehavior, err := expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptBehavior(original["post_startup_script_behavior"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPostStartupScriptBehavior); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["postStartupScriptBehavior"] = transformedPostStartupScriptBehavior + } + + return transformed, nil +} + +func expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScript(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptUrl(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigPostStartupScriptBehavior(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandColabRuntimeTemplateEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { if v == nil { return map[string]string{}, nil diff --git a/google/services/colab/resource_colab_runtime_template_generated_meta.yaml b/google/services/colab/resource_colab_runtime_template_generated_meta.yaml index aa59c3e2936..a2336eff2aa 100644 --- a/google/services/colab/resource_colab_runtime_template_generated_meta.yaml +++ b/google/services/colab/resource_colab_runtime_template_generated_meta.yaml @@ -1,32 +1,35 @@ -resource: 'google_colab_runtime_template' -generation_type: 'mmv1' -source_file: 'products/colab/RuntimeTemplate.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NotebookRuntimeTemplate' +resource: google_colab_runtime_template +generation_type: mmv1 +source_file: products/colab/RuntimeTemplate.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: NotebookRuntimeTemplate fields: - - api_field: 'dataPersistentDiskSpec.diskSizeGb' - - api_field: 'dataPersistentDiskSpec.diskType' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'eucConfig.eucDisabled' - - api_field: 'idleShutdownConfig.idleTimeout' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'machineSpec.acceleratorCount' - - api_field: 'machineSpec.acceleratorType' - - api_field: 'machineSpec.machineType' - - api_field: 'name' - - api_field: 'networkSpec.enableInternetAccess' - - api_field: 'networkSpec.network' - - api_field: 'networkSpec.subnetwork' - - api_field: 'networkTags' - - api_field: 'shieldedVmConfig.enableSecureBoot' - - api_field: 'softwareConfig.env.name' - - api_field: 'softwareConfig.env.value' - - field: 'terraform_labels' - provider_only: true + - api_field: dataPersistentDiskSpec.diskSizeGb + - api_field: dataPersistentDiskSpec.diskType + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: eucConfig.eucDisabled + - api_field: idleShutdownConfig.idleTimeout + - api_field: labels + - field: location + provider_only: true + - api_field: machineSpec.acceleratorCount + - api_field: machineSpec.acceleratorType + - api_field: machineSpec.machineType + - api_field: name + - api_field: networkSpec.enableInternetAccess + - api_field: networkSpec.network + - api_field: networkSpec.subnetwork + - api_field: networkTags + - api_field: shieldedVmConfig.enableSecureBoot + - api_field: softwareConfig.env.name + - api_field: softwareConfig.env.value + - api_field: softwareConfig.postStartupScriptConfig.postStartupScript + - api_field: softwareConfig.postStartupScriptConfig.postStartupScriptBehavior + - api_field: softwareConfig.postStartupScriptConfig.postStartupScriptUrl + - field: terraform_labels + provider_only: true diff --git a/google/services/colab/resource_colab_runtime_template_generated_test.go b/google/services/colab/resource_colab_runtime_template_generated_test.go index b8e4b6c817f..23c2074e391 100644 --- a/google/services/colab/resource_colab_runtime_template_generated_test.go +++ b/google/services/colab/resource_colab_runtime_template_generated_test.go @@ -224,6 +224,19 @@ resource "google_colab_runtime_template" "runtime-template" { encryption_spec { kms_key_name = "%{key_name}" } + + software_config { + env { + name = "TEST" + value = 1 + } + + post_startup_script_config { + post_startup_script = "echo 'hello world'" + post_startup_script_url = "gs://colab-enterprise-pss-secure/secure_pss.sh" + post_startup_script_behavior = "RUN_ONCE" + } + } } `, context) } diff --git a/google/services/colab/resource_colab_schedule_generated_meta.yaml b/google/services/colab/resource_colab_schedule_generated_meta.yaml index 4c27c601a96..0cea4945e39 100644 --- a/google/services/colab/resource_colab_schedule_generated_meta.yaml +++ b/google/services/colab/resource_colab_schedule_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_colab_schedule' -generation_type: 'mmv1' -source_file: 'products/colab/Schedule.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Schedule' +resource: google_colab_schedule +generation_type: mmv1 +source_file: products/colab/Schedule.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Schedule fields: - - api_field: 'allowQueueing' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.dataformRepositorySource.commitSha' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.dataformRepositorySource.dataformRepositoryResourceName' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.displayName' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.executionTimeout' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.executionUser' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.gcsNotebookSource.generation' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.gcsNotebookSource.uri' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.gcsOutputUri' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.notebookRuntimeTemplateResourceName' - - api_field: 'createNotebookExecutionJobRequest.notebookExecutionJob.serviceAccount' - - api_field: 'cron' - - field: 'desired_state' - provider_only: true - - api_field: 'displayName' - - api_field: 'endTime' - - field: 'location' - provider_only: true - - api_field: 'maxConcurrentRunCount' - - api_field: 'maxRunCount' - - api_field: 'name' - - api_field: 'startTime' - - api_field: 'state' + - api_field: allowQueueing + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.dataformRepositorySource.commitSha + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.dataformRepositorySource.dataformRepositoryResourceName + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.displayName + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.executionTimeout + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.executionUser + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.gcsNotebookSource.generation + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.gcsNotebookSource.uri + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.gcsOutputUri + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.notebookRuntimeTemplateResourceName + - api_field: createNotebookExecutionJobRequest.notebookExecutionJob.serviceAccount + - api_field: cron + - field: desired_state + provider_only: true + - api_field: displayName + - api_field: endTime + - field: location + provider_only: true + - api_field: maxConcurrentRunCount + - api_field: maxRunCount + - api_field: name + - api_field: startTime + - api_field: state diff --git a/google/services/composer/resource_composer_environment.go b/google/services/composer/resource_composer_environment.go index a9715378f6c..13305c315e8 100644 --- a/google/services/composer/resource_composer_environment.go +++ b/google/services/composer/resource_composer_environment.go @@ -987,7 +987,7 @@ func ResourceComposerEnvironment() *schema.Resource { Computed: true, ForceNew: false, AtLeastOneOf: composerConfigKeys, - ValidateFunc: validation.StringInSlice([]string{"ENVIRONMENT_SIZE_SMALL", "ENVIRONMENT_SIZE_MEDIUM", "ENVIRONMENT_SIZE_LARGE"}, false), + ValidateFunc: validation.StringInSlice([]string{"ENVIRONMENT_SIZE_SMALL", "ENVIRONMENT_SIZE_MEDIUM", "ENVIRONMENT_SIZE_LARGE", "ENVIRONMENT_SIZE_EXTRA_LARGE"}, false), Description: `The size of the Cloud Composer environment. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.`, }, "resilience_mode": { diff --git a/google/services/composer/resource_composer_user_workloads_config_map_generated_meta.yaml b/google/services/composer/resource_composer_user_workloads_config_map_generated_meta.yaml index bcfde73d6a1..128a4814c24 100644 --- a/google/services/composer/resource_composer_user_workloads_config_map_generated_meta.yaml +++ b/google/services/composer/resource_composer_user_workloads_config_map_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_composer_user_workloads_config_map' -generation_type: 'mmv1' -source_file: 'products/composer/UserWorkloadsConfigMap.yaml' -api_service_name: 'composer.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'UserWorkloadsConfigMap' +resource: google_composer_user_workloads_config_map +generation_type: mmv1 +source_file: products/composer/UserWorkloadsConfigMap.yaml +api_service_name: composer.googleapis.com +api_version: v1 +api_resource_type_kind: UserWorkloadsConfigMap fields: - - api_field: 'data' - - field: 'environment' - provider_only: true - - api_field: 'name' - - field: 'region' - provider_only: true + - api_field: data + - field: environment + provider_only: true + - api_field: name + - field: region + provider_only: true diff --git a/google/services/compute/data_source_google_compute_addresses.go b/google/services/compute/data_source_google_compute_addresses.go index 3581e5cbd02..4df64e76f4f 100644 --- a/google/services/compute/data_source_google_compute_addresses.go +++ b/google/services/compute/data_source_google_compute_addresses.go @@ -58,6 +58,10 @@ func DataSourceGoogleComputeAddresses() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "prefix_length": { + Type: schema.TypeInt, + Computed: true, + }, "status": { Type: schema.TypeString, Computed: true, @@ -175,13 +179,14 @@ func dataSourceGoogleComputeAddressesRead(context context.Context, d *schema.Res func generateTfAddress(address *compute.Address) map[string]interface{} { return map[string]interface{}{ - "name": address.Name, - "address": address.Address, - "address_type": address.AddressType, - "description": address.Description, - "region": regionFromUrl(address.Region), - "status": address.Status, - "self_link": address.SelfLink, + "name": address.Name, + "address": address.Address, + "address_type": address.AddressType, + "description": address.Description, + "prefix_length": address.PrefixLength, + "region": regionFromUrl(address.Region), + "status": address.Status, + "self_link": address.SelfLink, } } diff --git a/google/services/compute/data_source_google_compute_region_security_policy.go b/google/services/compute/data_source_google_compute_region_security_policy.go new file mode 100644 index 00000000000..24feec87bae --- /dev/null +++ b/google/services/compute/data_source_google_compute_region_security_policy.go @@ -0,0 +1,62 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/data_source_google_compute_region_security_policy.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package compute + +import ( + "fmt" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func DataSourceGoogleComputeRegionSecurityPolicy() *schema.Resource { + // Generate datasource schema from resource + dsSchema := tpgresource.DatasourceSchemaFromResourceSchema(ResourceComputeRegionSecurityPolicy().Schema) + + // Set 'Required' schema elements + tpgresource.AddRequiredFieldsToSchema(dsSchema, "name") + // Set 'Optional' schema elements + tpgresource.AddOptionalFieldsToSchema(dsSchema, "project", "region") + + return &schema.Resource{ + Read: dataSourceGoogleComputeRegionSecurityPolicyRead, + Schema: dsSchema, + } +} + +func dataSourceGoogleComputeRegionSecurityPolicyRead(d *schema.ResourceData, meta interface{}) error { + id, err := tpgresource.ReplaceVars(d, meta.(*transport_tpg.Config), "projects/{{project}}/regions/{{region}}/securityPolicies/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + err = resourceComputeRegionSecurityPolicyRead(d, meta) + if err != nil { + return err + } + + if err := tpgresource.SetDataSourceLabels(d); err != nil { + return err + } + + if d.Id() == "" { + return fmt.Errorf("%s not found", id) + } + return nil +} diff --git a/google/services/compute/data_source_google_compute_region_security_policy_test.go b/google/services/compute/data_source_google_compute_region_security_policy_test.go new file mode 100644 index 00000000000..e7881307dfe --- /dev/null +++ b/google/services/compute/data_source_google_compute_region_security_policy_test.go @@ -0,0 +1,61 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/data_source_google_compute_region_security_policy_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package compute_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-google/google/acctest" +) + +func TestAccComputeRegionSecurityPolicyDatasource(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccComputeRegionSecurityPolicyDatasourceConfig(context), + Check: resource.ComposeTestCheckFunc( + acctest.CheckDataSourceStateMatchesResourceState("data.google_compute_region_security_policy.default", "google_compute_region_security_policy.default"), + ), + }, + }, + }) +} + +func testAccComputeRegionSecurityPolicyDatasourceConfig(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_region_security_policy" "default" { + name = "tf-test-region-sec-policy-%{random_suffix}" + region = "us-west2" + description = "basic region security policy" + type = "CLOUD_ARMOR" +} + +data "google_compute_region_security_policy" "default" { + name = google_compute_region_security_policy.default.name + region = "us-west2" +} +`, context) +} diff --git a/google/services/compute/data_source_google_compute_storage_pool.go b/google/services/compute/data_source_google_compute_storage_pool.go new file mode 100644 index 00000000000..837b459014d --- /dev/null +++ b/google/services/compute/data_source_google_compute_storage_pool.go @@ -0,0 +1,68 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/data_source_google_compute_storage_pool.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package compute + +import ( + "fmt" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" +) + +func DataSourceGoogleComputeStoragePool() *schema.Resource { + // Generate datasource schema from resource + dsSchema := tpgresource.DatasourceSchemaFromResourceSchema(ResourceComputeStoragePool().Schema) + + // Set 'Required' schema elements + tpgresource.AddRequiredFieldsToSchema(dsSchema, "name") + tpgresource.AddRequiredFieldsToSchema(dsSchema, "zone") + + tpgresource.AddOptionalFieldsToSchema(dsSchema, "project") + + return &schema.Resource{ + Read: dataSourceGoogleComputeStoragePoolRead, + Schema: dsSchema, + } +} + +func dataSourceGoogleComputeStoragePoolRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + err := resourceComputeStoragePoolRead(d, meta) + if err != nil { + return err + } + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return err + } + zone, err := tpgresource.GetZone(d, config) + if err != nil { + return err + } + name := d.Get("name").(string) + + d.SetId(fmt.Sprintf("projects/%s/zones/%s/storagePools/%s", project, zone, name)) + + if err := d.Set("deletion_protection", false); err != nil { + return fmt.Errorf("Error setting deletion_protection: %s", err) + } + + return nil +} diff --git a/google/services/compute/data_source_google_compute_storage_pool_test.go b/google/services/compute/data_source_google_compute_storage_pool_test.go new file mode 100644 index 00000000000..e1fbf984dd9 --- /dev/null +++ b/google/services/compute/data_source_google_compute_storage_pool_test.go @@ -0,0 +1,68 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/data_source_google_compute_storage_pool_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +package compute_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-google/google/acctest" +) + +func TestAccDataSourceComputeStoragePool_basic(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckComputeStoragePoolDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccDataSourceComputeStoragePool_basic(context), + Check: resource.ComposeTestCheckFunc( + acctest.CheckDataSourceStateMatchesResourceState("data.google_compute_storage_pool.my-storage-pool-data", "google_compute_storage_pool.test-storage-pool"), + ), + }, + }, + }) +} +func testAccDataSourceComputeStoragePool_basic(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_storage_pool" "test-storage-pool" { + name = "tf-test-storage-pool-%{random_suffix}" + zone = "us-central1-a" + capacity_provisioning_type = "STANDARD" + pool_provisioned_capacity_gb = "11264" + pool_provisioned_iops = "20000" + pool_provisioned_throughput = "2048" + storage_pool_type = "hyperdisk-balanced" + deletion_protection = false + } + + +data "google_compute_storage_pool" "my-storage-pool-data" { + name = google_compute_storage_pool.test-storage-pool.name + zone = "us-central1-a" +} +`, context) +} diff --git a/google/services/compute/iam_compute_disk_generated_test.go b/google/services/compute/iam_compute_disk_generated_test.go index 8109b1f67b9..61e75e08d5c 100644 --- a/google/services/compute/iam_compute_disk_generated_test.go +++ b/google/services/compute/iam_compute_disk_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccComputeDiskIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_disk_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/disks/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-test-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeDiskIAMBindingStateID("google_compute_disk_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccComputeDiskIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_disk_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/disks/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-test-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeDiskIAMBindingStateID("google_compute_disk_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccComputeDiskIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_disk_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/disks/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-test-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeDiskIAMMemberStateID("google_compute_disk_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccComputeDiskIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_disk_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/disks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-test-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeDiskIAMPolicyStateID("google_compute_disk_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccComputeDiskIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_disk_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/disks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-test-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeDiskIAMPolicyStateID("google_compute_disk_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -265,3 +266,57 @@ resource "google_compute_disk_iam_binding" "foo" { } `, context) } + +func generateComputeDiskIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/disks/%s", project, zone, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeDiskIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/disks/%s", project, zone, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeDiskIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/disks/%s", project, zone, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/iam_compute_image_generated_test.go b/google/services/compute/iam_compute_image_generated_test.go index 4bd7b0513d5..a6c34796ca7 100644 --- a/google/services/compute/iam_compute_image_generated_test.go +++ b/google/services/compute/iam_compute_image_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccComputeImageIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_image_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMBindingStateID("google_compute_image_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccComputeImageIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_image_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMBindingStateID("google_compute_image_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccComputeImageIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_image_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMMemberStateID("google_compute_image_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccComputeImageIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_image_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMPolicyStateID("google_compute_image_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccComputeImageIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_image_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMPolicyStateID("google_compute_image_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccComputeImageIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_image_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeImageIAMBindingStateID("google_compute_image_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccComputeImageIamBindingGenerated_withAndWithoutCondition(t *testing.T }, { ResourceName: "google_compute_image_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMBindingStateID("google_compute_image_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_image_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeImageIAMBindingStateID("google_compute_image_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_image_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeImageIAMBindingStateID("google_compute_image_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccComputeImageIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_image_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeImageIAMMemberStateID("google_compute_image_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccComputeImageIamMemberGenerated_withAndWithoutCondition(t *testing.T) }, { ResourceName: "google_compute_image_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMMemberStateID("google_compute_image_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_image_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeImageIAMMemberStateID("google_compute_image_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_image_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s roles/compute.imageUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeImageIAMMemberStateID("google_compute_image_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccComputeImageIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_image_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/images/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-image%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeImageIAMPolicyStateID("google_compute_image_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -733,3 +734,53 @@ resource "google_compute_image_iam_policy" "foo" { } `, context) } +func generateComputeImageIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + image := tpgresource.GetResourceNameFromSelfLink(rawState["image"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/images/%s", project, image), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeImageIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + image := tpgresource.GetResourceNameFromSelfLink(rawState["image"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/images/%s", project, image), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeImageIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + image := tpgresource.GetResourceNameFromSelfLink(rawState["image"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/images/%s", project, image), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/iam_compute_instance_generated_test.go b/google/services/compute/iam_compute_instance_generated_test.go index a26ca3a64aa..dcbef84ac07 100644 --- a/google/services/compute/iam_compute_instance_generated_test.go +++ b/google/services/compute/iam_compute_instance_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccComputeInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMBindingStateID("google_compute_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccComputeInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMBindingStateID("google_compute_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccComputeInstanceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMMemberStateID("google_compute_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccComputeInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMPolicyStateID("google_compute_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccComputeInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMPolicyStateID("google_compute_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccComputeInstanceIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceIAMBindingStateID("google_compute_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccComputeInstanceIamBindingGenerated_withAndWithoutCondition(t *testin }, { ResourceName: "google_compute_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMBindingStateID("google_compute_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceIAMBindingStateID("google_compute_instance_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeInstanceIAMBindingStateID("google_compute_instance_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccComputeInstanceIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceIAMMemberStateID("google_compute_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccComputeInstanceIamMemberGenerated_withAndWithoutCondition(t *testing }, { ResourceName: "google_compute_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMMemberStateID("google_compute_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceIAMMemberStateID("google_compute_instance_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s roles/compute.osLogin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeInstanceIAMMemberStateID("google_compute_instance_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccComputeInstanceIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceIAMPolicyStateID("google_compute_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -718,3 +719,56 @@ resource "google_compute_instance_iam_policy" "foo" { } `, context) } +func generateComputeInstanceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + instance_name := tpgresource.GetResourceNameFromSelfLink(rawState["instance_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/instances/%s", project, zone, instance_name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeInstanceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + instance_name := tpgresource.GetResourceNameFromSelfLink(rawState["instance_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/instances/%s", project, zone, instance_name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeInstanceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + instance_name := tpgresource.GetResourceNameFromSelfLink(rawState["instance_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/instances/%s", project, zone, instance_name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/iam_compute_instance_template_generated_test.go b/google/services/compute/iam_compute_instance_template_generated_test.go index 680982cd5d7..8b7657f15cd 100644 --- a/google/services/compute/iam_compute_instance_template_generated_test.go +++ b/google/services/compute/iam_compute_instance_template_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccComputeInstanceTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMBindingStateID("google_compute_instance_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccComputeInstanceTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMBindingStateID("google_compute_instance_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccComputeInstanceTemplateIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMMemberStateID("google_compute_instance_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccComputeInstanceTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMPolicyStateID("google_compute_instance_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccComputeInstanceTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_instance_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMPolicyStateID("google_compute_instance_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccComputeInstanceTemplateIamBindingGenerated_withCondition(t *testing. }, { ResourceName: "google_compute_instance_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceTemplateIAMBindingStateID("google_compute_instance_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccComputeInstanceTemplateIamBindingGenerated_withAndWithoutCondition(t }, { ResourceName: "google_compute_instance_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMBindingStateID("google_compute_instance_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_template_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceTemplateIAMBindingStateID("google_compute_instance_template_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_template_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeInstanceTemplateIAMBindingStateID("google_compute_instance_template_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccComputeInstanceTemplateIamMemberGenerated_withCondition(t *testing.T }, { ResourceName: "google_compute_instance_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceTemplateIAMMemberStateID("google_compute_instance_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccComputeInstanceTemplateIamMemberGenerated_withAndWithoutCondition(t }, { ResourceName: "google_compute_instance_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMMemberStateID("google_compute_instance_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_template_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstanceTemplateIAMMemberStateID("google_compute_instance_template_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instance_template_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s roles/compute.instanceAdmin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeInstanceTemplateIAMMemberStateID("google_compute_instance_template_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccComputeInstanceTemplateIamPolicyGenerated_withCondition(t *testing.T }, { ResourceName: "google_compute_instance_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/instanceTemplates/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-instance-template%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstanceTemplateIAMPolicyStateID("google_compute_instance_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -673,3 +674,53 @@ resource "google_compute_instance_template_iam_policy" "foo" { } `, context) } +func generateComputeInstanceTemplateIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/instanceTemplates/%s", project, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeInstanceTemplateIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/instanceTemplates/%s", project, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeInstanceTemplateIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/instanceTemplates/%s", project, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/iam_compute_instant_snapshot_generated_test.go b/google/services/compute/iam_compute_instant_snapshot_generated_test.go index 015e57c3358..6dd2182a608 100644 --- a/google/services/compute/iam_compute_instant_snapshot_generated_test.go +++ b/google/services/compute/iam_compute_instant_snapshot_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccComputeInstantSnapshotIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_instant_snapshot_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMBindingStateID("google_compute_instant_snapshot_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccComputeInstantSnapshotIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_instant_snapshot_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMBindingStateID("google_compute_instant_snapshot_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccComputeInstantSnapshotIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_instant_snapshot_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMMemberStateID("google_compute_instant_snapshot_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccComputeInstantSnapshotIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_instant_snapshot_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMPolicyStateID("google_compute_instant_snapshot_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccComputeInstantSnapshotIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_instant_snapshot_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMPolicyStateID("google_compute_instant_snapshot_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccComputeInstantSnapshotIamBindingGenerated_withCondition(t *testing.T }, { ResourceName: "google_compute_instant_snapshot_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstantSnapshotIAMBindingStateID("google_compute_instant_snapshot_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccComputeInstantSnapshotIamBindingGenerated_withAndWithoutCondition(t }, { ResourceName: "google_compute_instant_snapshot_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMBindingStateID("google_compute_instant_snapshot_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instant_snapshot_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstantSnapshotIAMBindingStateID("google_compute_instant_snapshot_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instant_snapshot_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeInstantSnapshotIAMBindingStateID("google_compute_instant_snapshot_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccComputeInstantSnapshotIamMemberGenerated_withCondition(t *testing.T) }, { ResourceName: "google_compute_instant_snapshot_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstantSnapshotIAMMemberStateID("google_compute_instant_snapshot_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccComputeInstantSnapshotIamMemberGenerated_withAndWithoutCondition(t * }, { ResourceName: "google_compute_instant_snapshot_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMMemberStateID("google_compute_instant_snapshot_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instant_snapshot_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeInstantSnapshotIAMMemberStateID("google_compute_instant_snapshot_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_instant_snapshot_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s roles/compute.storageAdmin user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeInstantSnapshotIAMMemberStateID("google_compute_instant_snapshot_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccComputeInstantSnapshotIamPolicyGenerated_withCondition(t *testing.T) }, { ResourceName: "google_compute_instant_snapshot_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-instant-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeInstantSnapshotIAMPolicyStateID("google_compute_instant_snapshot_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -678,3 +679,56 @@ resource "google_compute_instant_snapshot_iam_policy" "foo" { } `, context) } +func generateComputeInstantSnapshotIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s", project, zone, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeInstantSnapshotIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s", project, zone, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeInstantSnapshotIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/zones/%s/instantSnapshots/%s", project, zone, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/iam_compute_region_disk_generated_test.go b/google/services/compute/iam_compute_region_disk_generated_test.go index c4801f821d8..4b9c5ab9704 100644 --- a/google/services/compute/iam_compute_region_disk_generated_test.go +++ b/google/services/compute/iam_compute_region_disk_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccComputeRegionDiskIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_region_disk_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/disks/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-region-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeRegionDiskIAMBindingStateID("google_compute_region_disk_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccComputeRegionDiskIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_region_disk_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/disks/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-region-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeRegionDiskIAMBindingStateID("google_compute_region_disk_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccComputeRegionDiskIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_region_disk_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/disks/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-region-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeRegionDiskIAMMemberStateID("google_compute_region_disk_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccComputeRegionDiskIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_region_disk_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/disks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-region-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeRegionDiskIAMPolicyStateID("google_compute_region_disk_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccComputeRegionDiskIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_region_disk_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/disks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-region-disk%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeRegionDiskIAMPolicyStateID("google_compute_region_disk_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -330,3 +331,57 @@ resource "google_compute_region_disk_iam_binding" "foo" { } `, context) } + +func generateComputeRegionDiskIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/regions/%s/disks/%s", project, region, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeRegionDiskIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/regions/%s/disks/%s", project, region, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeRegionDiskIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/regions/%s/disks/%s", project, region, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/iam_compute_snapshot_generated_test.go b/google/services/compute/iam_compute_snapshot_generated_test.go index 794466f3d71..3d020c1a46d 100644 --- a/google/services/compute/iam_compute_snapshot_generated_test.go +++ b/google/services/compute/iam_compute_snapshot_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccComputeSnapshotIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_snapshot_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/snapshots/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSnapshotIAMBindingStateID("google_compute_snapshot_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccComputeSnapshotIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_snapshot_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/snapshots/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSnapshotIAMBindingStateID("google_compute_snapshot_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccComputeSnapshotIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_snapshot_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/snapshots/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSnapshotIAMMemberStateID("google_compute_snapshot_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccComputeSnapshotIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_snapshot_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/snapshots/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSnapshotIAMPolicyStateID("google_compute_snapshot_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccComputeSnapshotIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_snapshot_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/global/snapshots/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-snapshot%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSnapshotIAMPolicyStateID("google_compute_snapshot_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -319,3 +320,54 @@ resource "google_compute_snapshot_iam_binding" "foo" { } `, context) } + +func generateComputeSnapshotIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/snapshots/%s", project, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeSnapshotIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/snapshots/%s", project, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeSnapshotIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/global/snapshots/%s", project, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/iam_compute_subnetwork_generated_test.go b/google/services/compute/iam_compute_subnetwork_generated_test.go index 71b65612f7d..82e456b33cf 100644 --- a/google/services/compute/iam_compute_subnetwork_generated_test.go +++ b/google/services/compute/iam_compute_subnetwork_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccComputeSubnetworkIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMBindingStateID("google_compute_subnetwork_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccComputeSubnetworkIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMBindingStateID("google_compute_subnetwork_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccComputeSubnetworkIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMMemberStateID("google_compute_subnetwork_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccComputeSubnetworkIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMPolicyStateID("google_compute_subnetwork_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccComputeSubnetworkIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMPolicyStateID("google_compute_subnetwork_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccComputeSubnetworkIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeSubnetworkIAMBindingStateID("google_compute_subnetwork_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccComputeSubnetworkIamBindingGenerated_withAndWithoutCondition(t *test }, { ResourceName: "google_compute_subnetwork_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMBindingStateID("google_compute_subnetwork_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_subnetwork_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeSubnetworkIAMBindingStateID("google_compute_subnetwork_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_subnetwork_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeSubnetworkIAMBindingStateID("google_compute_subnetwork_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccComputeSubnetworkIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeSubnetworkIAMMemberStateID("google_compute_subnetwork_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccComputeSubnetworkIamMemberGenerated_withAndWithoutCondition(t *testi }, { ResourceName: "google_compute_subnetwork_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMMemberStateID("google_compute_subnetwork_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_subnetwork_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateComputeSubnetworkIAMMemberStateID("google_compute_subnetwork_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_compute_subnetwork_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s roles/compute.networkUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateComputeSubnetworkIAMMemberStateID("google_compute_subnetwork_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccComputeSubnetworkIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_compute_subnetwork_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-test-subnetwork%s", context["random_suffix"])), + ImportStateIdFunc: generateComputeSubnetworkIAMPolicyStateID("google_compute_subnetwork_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -718,3 +719,56 @@ resource "google_compute_subnetwork_iam_policy" "foo" { } `, context) } +func generateComputeSubnetworkIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + subnetwork := tpgresource.GetResourceNameFromSelfLink(rawState["subnetwork"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s", project, region, subnetwork), "", "", rawState["condition.0.title"]), nil + } +} + +func generateComputeSubnetworkIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + subnetwork := tpgresource.GetResourceNameFromSelfLink(rawState["subnetwork"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s", project, region, subnetwork), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateComputeSubnetworkIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + subnetwork := tpgresource.GetResourceNameFromSelfLink(rawState["subnetwork"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/regions/%s/subnetworks/%s", project, region, subnetwork), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/compute/resource_compute_address_generated_meta.yaml b/google/services/compute/resource_compute_address_generated_meta.yaml index 68b46f7eb47..5e06818cfb1 100644 --- a/google/services/compute/resource_compute_address_generated_meta.yaml +++ b/google/services/compute/resource_compute_address_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_compute_address' -generation_type: 'mmv1' -source_file: 'products/compute/Address.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Address' +resource: google_compute_address +generation_type: mmv1 +source_file: products/compute/Address.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Address fields: - - api_field: 'address' - - api_field: 'addressType' - - api_field: 'creationTimestamp' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'ipVersion' - - api_field: 'ipv6EndpointType' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'network' - - api_field: 'networkTier' - - api_field: 'prefixLength' - - api_field: 'purpose' - - api_field: 'region' - - api_field: 'subnetwork' - - field: 'terraform_labels' - provider_only: true - - api_field: 'users' - - api_field: 'selfLink' + - api_field: address + - api_field: addressType + - api_field: creationTimestamp + - api_field: description + - field: effective_labels + provider_only: true + - api_field: ipVersion + - api_field: ipv6EndpointType + - api_field: labelFingerprint + - api_field: labels + - api_field: name + - api_field: network + - api_field: networkTier + - api_field: prefixLength + - api_field: purpose + - api_field: region + - api_field: subnetwork + - field: terraform_labels + provider_only: true + - api_field: users + - api_field: selfLink diff --git a/google/services/compute/resource_compute_autoscaler_generated_meta.yaml b/google/services/compute/resource_compute_autoscaler_generated_meta.yaml index c299402a470..470eab92540 100644 --- a/google/services/compute/resource_compute_autoscaler_generated_meta.yaml +++ b/google/services/compute/resource_compute_autoscaler_generated_meta.yaml @@ -1,46 +1,54 @@ -resource: 'google_compute_autoscaler' -generation_type: 'mmv1' -source_file: 'products/compute/Autoscaler.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Autoscaler' +resource: google_compute_autoscaler +generation_type: mmv1 +source_file: products/compute/Autoscaler.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Autoscaler api_variant_patterns: - - 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}' + - projects/{project}/zones/{zone}/autoscalers/{autoscaler} fields: - - api_field: 'autoscalingPolicy.coolDownPeriodSec' - field: 'autoscaling_policy.cooldown_period' - - api_field: 'autoscalingPolicy.cpuUtilization.predictiveMethod' - - api_field: 'autoscalingPolicy.cpuUtilization.utilizationTarget' - field: 'autoscaling_policy.cpu_utilization.target' - - api_field: 'autoscalingPolicy.loadBalancingUtilization.utilizationTarget' - field: 'autoscaling_policy.load_balancing_utilization.target' - - api_field: 'autoscalingPolicy.maxNumReplicas' - field: 'autoscaling_policy.max_replicas' - - api_field: 'autoscalingPolicy.customMetricUtilizations.filter' - field: 'autoscaling_policy.metric.filter' - - api_field: 'autoscalingPolicy.customMetricUtilizations.metric' - field: 'autoscaling_policy.metric.name' - - api_field: 'autoscalingPolicy.customMetricUtilizations.singleInstanceAssignment' - field: 'autoscaling_policy.metric.single_instance_assignment' - - api_field: 'autoscalingPolicy.customMetricUtilizations.utilizationTarget' - field: 'autoscaling_policy.metric.target' - - api_field: 'autoscalingPolicy.customMetricUtilizations.utilizationTargetType' - field: 'autoscaling_policy.metric.type' - - api_field: 'autoscalingPolicy.minNumReplicas' - field: 'autoscaling_policy.min_replicas' - - api_field: 'autoscalingPolicy.mode' - - api_field: 'autoscalingPolicy.scaleInControl.maxScaledInReplicas.fixed' - - api_field: 'autoscalingPolicy.scaleInControl.maxScaledInReplicas.percent' - - api_field: 'autoscalingPolicy.scaleInControl.timeWindowSec' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.description' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.disabled' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.durationSec' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.minRequiredReplicas' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.schedule' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.timeZone' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'name' - - api_field: 'target' - - api_field: 'zone' - - api_field: 'selfLink' + - api_field: autoscalingPolicy.coolDownPeriodSec + field: autoscaling_policy.cooldown_period + - api_field: autoscalingPolicy.cpuUtilization.predictiveMethod + - api_field: autoscalingPolicy.cpuUtilization.utilizationTarget + field: autoscaling_policy.cpu_utilization.target + - api_field: autoscalingPolicy.loadBalancingUtilization.utilizationTarget + field: autoscaling_policy.load_balancing_utilization.target + - api_field: autoscalingPolicy.maxNumReplicas + field: autoscaling_policy.max_replicas + - api_field: autoscalingPolicy.customMetricUtilizations.filter + field: autoscaling_policy.metric.filter + - api_field: autoscalingPolicy.customMetricUtilizations.metric + field: autoscaling_policy.metric.name + - api_field: autoscalingPolicy.customMetricUtilizations.singleInstanceAssignment + field: autoscaling_policy.metric.single_instance_assignment + - api_field: autoscalingPolicy.customMetricUtilizations.utilizationTarget + field: autoscaling_policy.metric.target + - api_field: autoscalingPolicy.customMetricUtilizations.utilizationTargetType + field: autoscaling_policy.metric.type + - api_field: autoscalingPolicy.minNumReplicas + field: autoscaling_policy.min_replicas + - api_field: autoscalingPolicy.mode + - api_field: autoscalingPolicy.scaleInControl.maxScaledInReplicas.fixed + - api_field: autoscalingPolicy.scaleInControl.maxScaledInReplicas.percent + - api_field: autoscalingPolicy.scaleInControl.timeWindowSec + - api_field: autoscalingPolicy.scalingSchedules.key + field: autoscaling_policy.scaling_schedules.name + - api_field: autoscalingPolicy.scalingSchedules.value.description + field: autoscaling_policy.scaling_schedules.description + - api_field: autoscalingPolicy.scalingSchedules.value.disabled + field: autoscaling_policy.scaling_schedules.disabled + - api_field: autoscalingPolicy.scalingSchedules.value.durationSec + field: autoscaling_policy.scaling_schedules.duration_sec + - api_field: autoscalingPolicy.scalingSchedules.value.minRequiredReplicas + field: autoscaling_policy.scaling_schedules.min_required_replicas + - api_field: autoscalingPolicy.scalingSchedules.value.schedule + field: autoscaling_policy.scaling_schedules.schedule + - api_field: autoscalingPolicy.scalingSchedules.value.timeZone + field: autoscaling_policy.scaling_schedules.time_zone + - api_field: creationTimestamp + - api_field: description + - api_field: name + - api_field: target + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_backend_bucket_generated_meta.yaml b/google/services/compute/resource_compute_backend_bucket_generated_meta.yaml index 5690a8c96c5..a0a6381c2ba 100644 --- a/google/services/compute/resource_compute_backend_bucket_generated_meta.yaml +++ b/google/services/compute/resource_compute_backend_bucket_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_compute_backend_bucket' -generation_type: 'mmv1' -source_file: 'products/compute/BackendBucket.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackendBucket' +resource: google_compute_backend_bucket +generation_type: mmv1 +source_file: products/compute/BackendBucket.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: BackendBucket fields: - - api_field: 'bucketName' - - api_field: 'cdnPolicy.bypassCacheOnRequestHeaders.headerName' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeHttpHeaders' - - api_field: 'cdnPolicy.cacheKeyPolicy.queryStringWhitelist' - - api_field: 'cdnPolicy.cacheMode' - - api_field: 'cdnPolicy.clientTtl' - - api_field: 'cdnPolicy.defaultTtl' - - api_field: 'cdnPolicy.maxTtl' - - api_field: 'cdnPolicy.negativeCaching' - - api_field: 'cdnPolicy.negativeCachingPolicy.code' - - api_field: 'cdnPolicy.negativeCachingPolicy.ttl' - - api_field: 'cdnPolicy.requestCoalescing' - - api_field: 'cdnPolicy.serveWhileStale' - - api_field: 'cdnPolicy.signedUrlCacheMaxAgeSec' - - api_field: 'compressionMode' - - api_field: 'creationTimestamp' - - api_field: 'customResponseHeaders' - - api_field: 'description' - - api_field: 'edgeSecurityPolicy' - - api_field: 'enableCdn' - - api_field: 'loadBalancingScheme' - - api_field: 'name' - - api_field: 'params.resourceManagerTags' - - api_field: 'selfLink' + - api_field: bucketName + - api_field: cdnPolicy.bypassCacheOnRequestHeaders.headerName + - api_field: cdnPolicy.cacheKeyPolicy.includeHttpHeaders + - api_field: cdnPolicy.cacheKeyPolicy.queryStringWhitelist + - api_field: cdnPolicy.cacheMode + - api_field: cdnPolicy.clientTtl + - api_field: cdnPolicy.defaultTtl + - api_field: cdnPolicy.maxTtl + - api_field: cdnPolicy.negativeCaching + - api_field: cdnPolicy.negativeCachingPolicy.code + - api_field: cdnPolicy.negativeCachingPolicy.ttl + - api_field: cdnPolicy.requestCoalescing + - api_field: cdnPolicy.serveWhileStale + - api_field: cdnPolicy.signedUrlCacheMaxAgeSec + - api_field: compressionMode + - api_field: creationTimestamp + - api_field: customResponseHeaders + - api_field: description + - api_field: edgeSecurityPolicy + - api_field: enableCdn + - api_field: loadBalancingScheme + - api_field: name + - api_field: params.resourceManagerTags + - api_field: selfLink diff --git a/google/services/compute/resource_compute_backend_bucket_signed_url_key_generated_meta.yaml b/google/services/compute/resource_compute_backend_bucket_signed_url_key_generated_meta.yaml index 01d0b6a9e45..158cfb59cb5 100644 --- a/google/services/compute/resource_compute_backend_bucket_signed_url_key_generated_meta.yaml +++ b/google/services/compute/resource_compute_backend_bucket_signed_url_key_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_compute_backend_bucket_signed_url_key' -generation_type: 'mmv1' -source_file: 'products/compute/BackendBucketSignedUrlKey.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackendBucket' +resource: google_compute_backend_bucket_signed_url_key +generation_type: mmv1 +source_file: products/compute/BackendBucketSignedUrlKey.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: BackendBucket fields: - - api_field: 'backendBucket' - - api_field: 'keyValue' - - api_field: 'keyName' - field: 'name' + - api_field: backendBucket + - api_field: keyValue + - api_field: keyName + field: name diff --git a/google/services/compute/resource_compute_backend_service_generated_meta.yaml b/google/services/compute/resource_compute_backend_service_generated_meta.yaml index f0ed7989404..17bb67a69d4 100644 --- a/google/services/compute/resource_compute_backend_service_generated_meta.yaml +++ b/google/services/compute/resource_compute_backend_service_generated_meta.yaml @@ -1,136 +1,136 @@ -resource: 'google_compute_backend_service' -generation_type: 'mmv1' -source_file: 'products/compute/BackendService.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackendService' +resource: google_compute_backend_service +generation_type: mmv1 +source_file: products/compute/BackendService.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: BackendService fields: - - api_field: 'affinityCookieTtlSec' - - api_field: 'backends.balancingMode' - field: 'backend.balancing_mode' - - api_field: 'backends.capacityScaler' - field: 'backend.capacity_scaler' - - api_field: 'backends.customMetrics.dryRun' - field: 'backend.custom_metrics.dry_run' - - api_field: 'backends.customMetrics.maxUtilization' - field: 'backend.custom_metrics.max_utilization' - - api_field: 'backends.customMetrics.name' - field: 'backend.custom_metrics.name' - - api_field: 'backends.description' - field: 'backend.description' - - api_field: 'backends.group' - field: 'backend.group' - - api_field: 'backends.maxConnections' - field: 'backend.max_connections' - - api_field: 'backends.maxConnectionsPerEndpoint' - field: 'backend.max_connections_per_endpoint' - - api_field: 'backends.maxConnectionsPerInstance' - field: 'backend.max_connections_per_instance' - - api_field: 'backends.maxRate' - field: 'backend.max_rate' - - api_field: 'backends.maxRatePerEndpoint' - field: 'backend.max_rate_per_endpoint' - - api_field: 'backends.maxRatePerInstance' - field: 'backend.max_rate_per_instance' - - api_field: 'backends.maxUtilization' - field: 'backend.max_utilization' - - api_field: 'backends.preference' - field: 'backend.preference' - - api_field: 'cdnPolicy.bypassCacheOnRequestHeaders.headerName' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeHost' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeHttpHeaders' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeNamedCookies' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeProtocol' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeQueryString' - - api_field: 'cdnPolicy.cacheKeyPolicy.queryStringBlacklist' - - api_field: 'cdnPolicy.cacheKeyPolicy.queryStringWhitelist' - - api_field: 'cdnPolicy.cacheMode' - - api_field: 'cdnPolicy.clientTtl' - - api_field: 'cdnPolicy.defaultTtl' - - api_field: 'cdnPolicy.maxTtl' - - api_field: 'cdnPolicy.negativeCaching' - - api_field: 'cdnPolicy.negativeCachingPolicy.code' - - api_field: 'cdnPolicy.negativeCachingPolicy.ttl' - - api_field: 'cdnPolicy.requestCoalescing' - - api_field: 'cdnPolicy.serveWhileStale' - - api_field: 'cdnPolicy.signedUrlCacheMaxAgeSec' - - api_field: 'circuitBreakers.maxConnections' - - api_field: 'circuitBreakers.maxPendingRequests' - - api_field: 'circuitBreakers.maxRequests' - - api_field: 'circuitBreakers.maxRequestsPerConnection' - - api_field: 'circuitBreakers.maxRetries' - - api_field: 'compressionMode' - - api_field: 'connectionDraining.drainingTimeoutSec' - field: 'connection_draining_timeout_sec' - - api_field: 'consistentHash.httpCookie.name' - - api_field: 'consistentHash.httpCookie.path' - - api_field: 'consistentHash.httpCookie.ttl.nanos' - - api_field: 'consistentHash.httpCookie.ttl.seconds' - - api_field: 'consistentHash.httpHeaderName' - - api_field: 'consistentHash.minimumRingSize' - - api_field: 'creationTimestamp' - - api_field: 'customMetrics.dryRun' - - api_field: 'customMetrics.name' - - api_field: 'customRequestHeaders' - - api_field: 'customResponseHeaders' - - api_field: 'description' - - api_field: 'edgeSecurityPolicy' - - api_field: 'enableCDN' - - api_field: 'externalManagedMigrationState' - - api_field: 'externalManagedMigrationTestingPercentage' - - api_field: 'fingerprint' - - api_field: 'id' - field: 'generated_id' - - api_field: 'healthChecks' - - api_field: 'iap.enabled' - - api_field: 'iap.oauth2ClientId' - - api_field: 'iap.oauth2ClientSecret' - - api_field: 'iap.oauth2ClientSecretSha256' - - api_field: 'ipAddressSelectionPolicy' - - api_field: 'loadBalancingScheme' - - api_field: 'localityLbPolicies.customPolicy.data' - - api_field: 'localityLbPolicies.customPolicy.name' - - api_field: 'localityLbPolicies.policy.name' - - api_field: 'localityLbPolicy' - - api_field: 'logConfig.enable' - - api_field: 'logConfig.optionalFields' - - api_field: 'logConfig.optionalMode' - - api_field: 'logConfig.sampleRate' - - api_field: 'maxStreamDuration.nanos' - - api_field: 'maxStreamDuration.seconds' - - api_field: 'name' - - api_field: 'outlierDetection.baseEjectionTime.nanos' - - api_field: 'outlierDetection.baseEjectionTime.seconds' - - api_field: 'outlierDetection.consecutiveErrors' - - api_field: 'outlierDetection.consecutiveGatewayFailure' - - api_field: 'outlierDetection.enforcingConsecutiveErrors' - - api_field: 'outlierDetection.enforcingConsecutiveGatewayFailure' - - api_field: 'outlierDetection.enforcingSuccessRate' - - api_field: 'outlierDetection.interval.nanos' - - api_field: 'outlierDetection.interval.seconds' - - api_field: 'outlierDetection.maxEjectionPercent' - - api_field: 'outlierDetection.successRateMinimumHosts' - - api_field: 'outlierDetection.successRateRequestVolume' - - api_field: 'outlierDetection.successRateStdevFactor' - - api_field: 'params.resourceManagerTags' - - api_field: 'portName' - - api_field: 'protocol' - - api_field: 'securityPolicy' - - api_field: 'securitySettings.awsV4Authentication.accessKey' - - api_field: 'securitySettings.awsV4Authentication.accessKeyId' - - api_field: 'securitySettings.awsV4Authentication.accessKeyVersion' - - api_field: 'securitySettings.awsV4Authentication.originRegion' - - api_field: 'securitySettings.clientTlsPolicy' - - api_field: 'securitySettings.subjectAltNames' - - api_field: 'serviceLbPolicy' - - api_field: 'sessionAffinity' - - api_field: 'strongSessionAffinityCookie.name' - - api_field: 'strongSessionAffinityCookie.path' - - api_field: 'strongSessionAffinityCookie.ttl.nanos' - - api_field: 'strongSessionAffinityCookie.ttl.seconds' - - api_field: 'timeoutSec' - - api_field: 'tlsSettings.authenticationConfig' - - api_field: 'tlsSettings.sni' - - api_field: 'tlsSettings.subjectAltNames.dnsName' - - api_field: 'tlsSettings.subjectAltNames.uniformResourceIdentifier' - - api_field: 'selfLink' + - api_field: affinityCookieTtlSec + - api_field: backends.balancingMode + field: backend.balancing_mode + - api_field: backends.capacityScaler + field: backend.capacity_scaler + - api_field: backends.customMetrics.dryRun + field: backend.custom_metrics.dry_run + - api_field: backends.customMetrics.maxUtilization + field: backend.custom_metrics.max_utilization + - api_field: backends.customMetrics.name + field: backend.custom_metrics.name + - api_field: backends.description + field: backend.description + - api_field: backends.group + field: backend.group + - api_field: backends.maxConnections + field: backend.max_connections + - api_field: backends.maxConnectionsPerEndpoint + field: backend.max_connections_per_endpoint + - api_field: backends.maxConnectionsPerInstance + field: backend.max_connections_per_instance + - api_field: backends.maxRate + field: backend.max_rate + - api_field: backends.maxRatePerEndpoint + field: backend.max_rate_per_endpoint + - api_field: backends.maxRatePerInstance + field: backend.max_rate_per_instance + - api_field: backends.maxUtilization + field: backend.max_utilization + - api_field: backends.preference + field: backend.preference + - api_field: cdnPolicy.bypassCacheOnRequestHeaders.headerName + - api_field: cdnPolicy.cacheKeyPolicy.includeHost + - api_field: cdnPolicy.cacheKeyPolicy.includeHttpHeaders + - api_field: cdnPolicy.cacheKeyPolicy.includeNamedCookies + - api_field: cdnPolicy.cacheKeyPolicy.includeProtocol + - api_field: cdnPolicy.cacheKeyPolicy.includeQueryString + - api_field: cdnPolicy.cacheKeyPolicy.queryStringBlacklist + - api_field: cdnPolicy.cacheKeyPolicy.queryStringWhitelist + - api_field: cdnPolicy.cacheMode + - api_field: cdnPolicy.clientTtl + - api_field: cdnPolicy.defaultTtl + - api_field: cdnPolicy.maxTtl + - api_field: cdnPolicy.negativeCaching + - api_field: cdnPolicy.negativeCachingPolicy.code + - api_field: cdnPolicy.negativeCachingPolicy.ttl + - api_field: cdnPolicy.requestCoalescing + - api_field: cdnPolicy.serveWhileStale + - api_field: cdnPolicy.signedUrlCacheMaxAgeSec + - api_field: circuitBreakers.maxConnections + - api_field: circuitBreakers.maxPendingRequests + - api_field: circuitBreakers.maxRequests + - api_field: circuitBreakers.maxRequestsPerConnection + - api_field: circuitBreakers.maxRetries + - api_field: compressionMode + - api_field: connectionDraining.drainingTimeoutSec + field: connection_draining_timeout_sec + - api_field: consistentHash.httpCookie.name + - api_field: consistentHash.httpCookie.path + - api_field: consistentHash.httpCookie.ttl.nanos + - api_field: consistentHash.httpCookie.ttl.seconds + - api_field: consistentHash.httpHeaderName + - api_field: consistentHash.minimumRingSize + - api_field: creationTimestamp + - api_field: customMetrics.dryRun + - api_field: customMetrics.name + - api_field: customRequestHeaders + - api_field: customResponseHeaders + - api_field: description + - api_field: edgeSecurityPolicy + - api_field: enableCDN + - api_field: externalManagedMigrationState + - api_field: externalManagedMigrationTestingPercentage + - api_field: fingerprint + - api_field: id + field: generated_id + - api_field: healthChecks + - api_field: iap.enabled + - api_field: iap.oauth2ClientId + - api_field: iap.oauth2ClientSecret + - api_field: iap.oauth2ClientSecretSha256 + - api_field: ipAddressSelectionPolicy + - api_field: loadBalancingScheme + - api_field: localityLbPolicies.customPolicy.data + - api_field: localityLbPolicies.customPolicy.name + - api_field: localityLbPolicies.policy.name + - api_field: localityLbPolicy + - api_field: logConfig.enable + - api_field: logConfig.optionalFields + - api_field: logConfig.optionalMode + - api_field: logConfig.sampleRate + - api_field: maxStreamDuration.nanos + - api_field: maxStreamDuration.seconds + - api_field: name + - api_field: outlierDetection.baseEjectionTime.nanos + - api_field: outlierDetection.baseEjectionTime.seconds + - api_field: outlierDetection.consecutiveErrors + - api_field: outlierDetection.consecutiveGatewayFailure + - api_field: outlierDetection.enforcingConsecutiveErrors + - api_field: outlierDetection.enforcingConsecutiveGatewayFailure + - api_field: outlierDetection.enforcingSuccessRate + - api_field: outlierDetection.interval.nanos + - api_field: outlierDetection.interval.seconds + - api_field: outlierDetection.maxEjectionPercent + - api_field: outlierDetection.successRateMinimumHosts + - api_field: outlierDetection.successRateRequestVolume + - api_field: outlierDetection.successRateStdevFactor + - api_field: params.resourceManagerTags + - api_field: portName + - api_field: protocol + - api_field: securityPolicy + - api_field: securitySettings.awsV4Authentication.accessKey + - api_field: securitySettings.awsV4Authentication.accessKeyId + - api_field: securitySettings.awsV4Authentication.accessKeyVersion + - api_field: securitySettings.awsV4Authentication.originRegion + - api_field: securitySettings.clientTlsPolicy + - api_field: securitySettings.subjectAltNames + - api_field: serviceLbPolicy + - api_field: sessionAffinity + - api_field: strongSessionAffinityCookie.name + - api_field: strongSessionAffinityCookie.path + - api_field: strongSessionAffinityCookie.ttl.nanos + - api_field: strongSessionAffinityCookie.ttl.seconds + - api_field: timeoutSec + - api_field: tlsSettings.authenticationConfig + - api_field: tlsSettings.sni + - api_field: tlsSettings.subjectAltNames.dnsName + - api_field: tlsSettings.subjectAltNames.uniformResourceIdentifier + - api_field: selfLink diff --git a/google/services/compute/resource_compute_backend_service_signed_url_key_generated_meta.yaml b/google/services/compute/resource_compute_backend_service_signed_url_key_generated_meta.yaml index 13d7c3f6f12..cc4c54b15ef 100644 --- a/google/services/compute/resource_compute_backend_service_signed_url_key_generated_meta.yaml +++ b/google/services/compute/resource_compute_backend_service_signed_url_key_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_compute_backend_service_signed_url_key' -generation_type: 'mmv1' -source_file: 'products/compute/BackendServiceSignedUrlKey.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackendService' +resource: google_compute_backend_service_signed_url_key +generation_type: mmv1 +source_file: products/compute/BackendServiceSignedUrlKey.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: BackendService fields: - - api_field: 'backendService' - - api_field: 'keyValue' - - api_field: 'keyName' - field: 'name' + - api_field: backendService + - api_field: keyValue + - api_field: keyName + field: name diff --git a/google/services/compute/resource_compute_backend_service_test.go b/google/services/compute/resource_compute_backend_service_test.go index b5dbe940636..169f07e8ece 100644 --- a/google/services/compute/resource_compute_backend_service_test.go +++ b/google/services/compute/resource_compute_backend_service_test.go @@ -2532,7 +2532,7 @@ data "google_compute_image" "my_image" { } resource "google_compute_backend_service" "lipsum" { - name = "test-lipsum-backend-service-%s" + name = "tf-test-lipsum-backend-service-%s" description = "Hello World 1234" protocol = "TCP" timeout_sec = %v @@ -2547,7 +2547,7 @@ resource "google_compute_backend_service" "lipsum" { } resource "google_compute_instance_group_manager" "foobar" { - name = "test-foobar-instance-group-manager-%s" + name = "tf-test-foobar-instance-group-manager-%s" version { instance_template = google_compute_instance_template.foobar.self_link name = "primary" @@ -2558,7 +2558,7 @@ resource "google_compute_instance_group_manager" "foobar" { } resource "google_compute_instance_template" "foobar" { - name = "test-foobar-instance-template-%s" + name = "tf-test-foobar-instance-template-%s" machine_type = "e2-medium" network_interface { @@ -2573,7 +2573,7 @@ resource "google_compute_instance_template" "foobar" { } resource "google_compute_health_check" "health_check" { - name = "test-health-check-%s" + name = "tf-test-health-check-%s" http_health_check { port = 80 } diff --git a/google/services/compute/resource_compute_cross_site_network.go b/google/services/compute/resource_compute_cross_site_network.go new file mode 100644 index 00000000000..207a0b2845f --- /dev/null +++ b/google/services/compute/resource_compute_cross_site_network.go @@ -0,0 +1,486 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/compute/CrossSiteNetwork.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package compute + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceComputeCrossSiteNetwork() *schema.Resource { + return &schema.Resource{ + Create: resourceComputeCrossSiteNetworkCreate, + Read: resourceComputeCrossSiteNetworkRead, + Update: resourceComputeCrossSiteNetworkUpdate, + Delete: resourceComputeCrossSiteNetworkDelete, + + Importer: &schema.ResourceImporter{ + State: resourceComputeCrossSiteNetworkImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: verify.ValidateRegexp(`^[a-z]([-a-z0-9]*[a-z0-9])?$`), + Description: `Name of the resource. Provided by the client when the resource is created. The name must be +1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters +long and match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the first +character must be a lowercase letter, and all following characters must be a dash, +lowercase letter, or digit, except the last character, which cannot be a dash.`, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource.`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceComputeCrossSiteNetworkCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + nameProp, err := expandComputeCrossSiteNetworkName(d.Get("name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("name"); !tpgresource.IsEmptyValue(reflect.ValueOf(nameProp)) && (ok || !reflect.DeepEqual(v, nameProp)) { + obj["name"] = nameProp + } + descriptionProp, err := expandComputeCrossSiteNetworkDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new CrossSiteNetwork: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for CrossSiteNetwork: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating CrossSiteNetwork: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/global/crossSiteNetworks/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + err = ComputeOperationWaitTime( + config, res, project, "Creating CrossSiteNetwork", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create CrossSiteNetwork: %s", err) + } + + log.Printf("[DEBUG] Finished creating CrossSiteNetwork %q: %#v", d.Id(), res) + + return resourceComputeCrossSiteNetworkRead(d, meta) +} + +func resourceComputeCrossSiteNetworkRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for CrossSiteNetwork: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("ComputeCrossSiteNetwork %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading CrossSiteNetwork: %s", err) + } + + if err := d.Set("name", flattenComputeCrossSiteNetworkName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading CrossSiteNetwork: %s", err) + } + if err := d.Set("description", flattenComputeCrossSiteNetworkDescription(res["description"], d, config)); err != nil { + return fmt.Errorf("Error reading CrossSiteNetwork: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("name"); !ok && v == "" { + err = identity.Set("name", d.Get("name").(string)) + if err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceComputeCrossSiteNetworkUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for CrossSiteNetwork: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + descriptionProp, err := expandComputeCrossSiteNetworkDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating CrossSiteNetwork %q: %#v", d.Id(), obj) + headers := make(http.Header) + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating CrossSiteNetwork %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating CrossSiteNetwork %q: %#v", d.Id(), res) + } + + err = ComputeOperationWaitTime( + config, res, project, "Updating CrossSiteNetwork", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + + return resourceComputeCrossSiteNetworkRead(d, meta) +} + +func resourceComputeCrossSiteNetworkDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for CrossSiteNetwork: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting CrossSiteNetwork %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "CrossSiteNetwork") + } + + err = ComputeOperationWaitTime( + config, res, project, "Deleting CrossSiteNetwork", userAgent, + d.Timeout(schema.TimeoutDelete)) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Finished deleting CrossSiteNetwork %q: %#v", d.Id(), res) + return nil +} + +func resourceComputeCrossSiteNetworkImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/global/crossSiteNetworks/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/global/crossSiteNetworks/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenComputeCrossSiteNetworkName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeCrossSiteNetworkDescription(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandComputeCrossSiteNetworkName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeCrossSiteNetworkDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} diff --git a/google/services/compute/resource_compute_cross_site_network_generated_meta.yaml b/google/services/compute/resource_compute_cross_site_network_generated_meta.yaml new file mode 100644 index 00000000000..79468d0a298 --- /dev/null +++ b/google/services/compute/resource_compute_cross_site_network_generated_meta.yaml @@ -0,0 +1,9 @@ +resource: google_compute_cross_site_network +generation_type: mmv1 +source_file: products/compute/CrossSiteNetwork.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: CrossSiteNetwork +fields: + - api_field: description + - api_field: name diff --git a/google/services/compute/resource_compute_cross_site_network_generated_test.go b/google/services/compute/resource_compute_cross_site_network_generated_test.go new file mode 100644 index 00000000000..14ddc105776 --- /dev/null +++ b/google/services/compute/resource_compute_cross_site_network_generated_test.go @@ -0,0 +1,133 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package compute_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccComputeCrossSiteNetwork_computeCrossSiteNetworkBasicExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckComputeCrossSiteNetworkDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccComputeCrossSiteNetwork_computeCrossSiteNetworkBasicExample(context), + }, + { + ResourceName: "google_compute_cross_site_network.example-cross-site-network", + ImportState: true, + ImportStateVerify: true, + }, + { + ResourceName: "google_compute_cross_site_network.example-cross-site-network", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccComputeCrossSiteNetwork_computeCrossSiteNetworkBasicExample(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" { +} + +resource "google_compute_cross_site_network" "example-cross-site-network" { + name = "tf-test-test-cross-site-network%{random_suffix}" + description = "Example cross site network%{random_suffix}" +} +`, context) +} + +func testAccCheckComputeCrossSiteNetworkDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_cross_site_network" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("ComputeCrossSiteNetwork still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/compute/resource_compute_cross_site_network_sweeper.go b/google/services/compute/resource_compute_cross_site_network_sweeper.go new file mode 100644 index 00000000000..12349b39fb6 --- /dev/null +++ b/google/services/compute/resource_compute_cross_site_network_sweeper.go @@ -0,0 +1,223 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/compute/CrossSiteNetwork.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/sweeper_file.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package compute + +import ( + "context" + "fmt" + "log" + "strings" + "testing" + + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/sweeper" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func init() { + // Initialize base sweeper object + s := &sweeper.Sweeper{ + Name: "google_compute_cross_site_network", + ListAndAction: listAndActionComputeCrossSiteNetwork, + DeleteFunction: testSweepComputeCrossSiteNetwork, + } + + // Register the sweeper + sweeper.AddTestSweepers(s) +} + +func testSweepComputeCrossSiteNetwork(_ string) error { + return listAndActionComputeCrossSiteNetwork(deleteResourceComputeCrossSiteNetwork) +} + +func listAndActionComputeCrossSiteNetwork(action sweeper.ResourceAction) error { + var lastError error + resourceName := "ComputeCrossSiteNetwork" + log.Printf("[INFO][SWEEPER_LOG] Starting sweeper for %s", resourceName) + + // Prepare configurations to iterate over + var configs []*tpgresource.ResourceDataMock + t := &testing.T{} + billingId := envvar.GetTestBillingAccountFromEnv(t) + // Default single config + intermediateValues := []map[string]string{ + { + "region": "us-central1", + }, + } + + // Create configs from intermediate values + for _, values := range intermediateValues { + mockConfig := &tpgresource.ResourceDataMock{ + FieldsInSchema: map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "billing_account": billingId, + }, + } + + // Apply all provided values + for key, value := range values { + mockConfig.FieldsInSchema[key] = value + } + + // Set fallback values for common fields + region, hasRegion := mockConfig.FieldsInSchema["region"].(string) + if !hasRegion { + region = "us-central1" + mockConfig.FieldsInSchema["region"] = region + } + + if _, hasLocation := mockConfig.FieldsInSchema["location"]; !hasLocation { + mockConfig.FieldsInSchema["location"] = region + } + + if _, hasZone := mockConfig.FieldsInSchema["zone"]; !hasZone { + mockConfig.FieldsInSchema["zone"] = region + "-a" + } + + configs = append(configs, mockConfig) + } + + // Process all configurations (either from parent resources or direct substitutions) + for _, mockConfig := range configs { + // Get region from config + region := sweeper.GetFieldOrDefault(mockConfig, "region", "us-central1") + + // Create shared config for this region + config, err := sweeper.SharedConfigForRegion(region) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error getting shared config for region: %s", err) + lastError = err + continue + } + + err = config.LoadAndValidate(context.Background()) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error loading: %s", err) + lastError = err + continue + } + + // Prepare list URL + listTemplate := strings.Split("https://compute.googleapis.com/compute/v1/projects/{{project}}/global/crossSiteNetworks", "?")[0] + listUrl, err := tpgresource.ReplaceVars(mockConfig, config, listTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) + lastError = err + continue + } + + // Log additional info for parent-based resources + log.Printf("[INFO][SWEEPER_LOG] Listing %s resources at %s", resourceName, listUrl) + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: config.Project, + RawURL: listUrl, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in response from request %s: %s", listUrl, err) + lastError = err + continue + } + + // First try the expected resource key + resourceList, ok := res["crossSiteNetworks"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'crossSiteNetworks'") + } else { + // Next, try the common "items" pattern + resourceList, ok = res["items"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under standard 'items' key") + } else { + log.Printf("[INFO][SWEEPER_LOG] no resources found") + continue + } + } + rl := resourceList.([]interface{}) + + log.Printf("[INFO][SWEEPER_LOG] Found %d items in %s list response.", len(rl), resourceName) + // Keep count of items that aren't sweepable for logging. + nonPrefixCount := 0 + for _, ri := range rl { + obj, ok := ri.(map[string]interface{}) + if !ok { + log.Printf("[INFO][SWEEPER_LOG] Item was not a map: %T", ri) + continue + } + + if err := action(config, mockConfig, obj); err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in action: %s", err) + lastError = err + } else { + nonPrefixCount++ + } + } + } + + return lastError +} + +func deleteResourceComputeCrossSiteNetwork(config *transport_tpg.Config, d *tpgresource.ResourceDataMock, obj map[string]interface{}) error { + var deletionerror error + resourceName := "ComputeCrossSiteNetwork" + var name string + if obj["name"] == nil { + log.Printf("[INFO][SWEEPER_LOG] %s resource name was nil", resourceName) + return fmt.Errorf("%s resource name was nil", resourceName) + } + + name = tpgresource.GetResourceNameFromSelfLink(obj["name"].(string)) + + // Skip resources that shouldn't be sweeped + if !sweeper.IsSweepableTestResource(name) { + return nil + } + + deleteTemplate := "https://compute.googleapis.com/compute/v1/projects/{{project}}/global/crossSiteNetworks/{{name}}" + + url, err := tpgresource.ReplaceVars(d, config, deleteTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) + deletionerror = err + } + url = url + name + + // Don't wait on operations as we may have a lot to delete + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: config.Project, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error deleting for url %s : %s", url, err) + deletionerror = err + } else { + log.Printf("[INFO][SWEEPER_LOG] Sent delete request for %s resource: %s", resourceName, name) + } + + return deletionerror +} diff --git a/google/services/compute/resource_compute_cross_site_network_test.go b/google/services/compute/resource_compute_cross_site_network_test.go index 35f61c532b4..6595555cd99 100644 --- a/google/services/compute/resource_compute_cross_site_network_test.go +++ b/google/services/compute/resource_compute_cross_site_network_test.go @@ -8,10 +8,79 @@ // // This code is generated by Magic Modules using the following: // -// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/resource_compute_cross_site_network_test.go.tmpl +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/resource_compute_cross_site_network_test.go // // DO NOT EDIT this file directly. Any changes made to this file will be // overwritten during the next generation cycle. // // ---------------------------------------------------------------------------- package compute_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" +) + +func TestAccComputeCrossSiteNetwork_update(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckComputeCrossSiteNetworkDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccComputeCrossSiteNetwork_basic(context), + }, + { + ResourceName: "google_compute_cross_site_network.example-cross-site-network", + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccComputeCrossSiteNetwork_update(context), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_compute_cross_site_network.example-cross-site-network", "description", "Example cross site network updated"+context["random_suffix"].(string)), + ), + }, + { + ResourceName: "google_compute_cross_site_network.example-cross-site-network", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccComputeCrossSiteNetwork_basic(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" { +} + +resource "google_compute_cross_site_network" "example-cross-site-network" { + name = "tf-test-test-cross-site-network%{random_suffix}" + description = "Example cross site network%{random_suffix}" +} +`, context) +} + +func testAccComputeCrossSiteNetwork_update(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" { +} + +resource "google_compute_cross_site_network" "example-cross-site-network" { +name = "tf-test-test-cross-site-network%{random_suffix}" +description = "Example cross site network updated%{random_suffix}" +} +`, context) +} diff --git a/google/services/compute/resource_compute_disk.go b/google/services/compute/resource_compute_disk.go index 8045872bf25..05ab5a6ae26 100644 --- a/google/services/compute/resource_compute_disk.go +++ b/google/services/compute/resource_compute_disk.go @@ -1872,7 +1872,8 @@ func resourceComputeDiskDelete(d *schema.ResourceData, meta interface{}) error { if disks, ok := instanceRes["disks"].([]interface{}); ok { for _, diskInterface := range disks { disk := diskInterface.(map[string]interface{}) - if tpgresource.CompareSelfLinkOrResourceName("", disk["source"].(string), self, nil) { + // source is nil for scratch disks + if source := disk["source"]; source != nil && tpgresource.CompareSelfLinkOrResourceName("", source.(string), self, nil) { detachCalls = append(detachCalls, detachArgs{ project: instanceProject, zone: tpgresource.GetResourceNameFromSelfLink(instanceRes["zone"].(string)), diff --git a/google/services/compute/resource_compute_disk_generated_meta.yaml b/google/services/compute/resource_compute_disk_generated_meta.yaml index 90d16d44c93..c073a46a0bb 100644 --- a/google/services/compute/resource_compute_disk_generated_meta.yaml +++ b/google/services/compute/resource_compute_disk_generated_meta.yaml @@ -1,68 +1,68 @@ -resource: 'google_compute_disk' -generation_type: 'mmv1' -source_file: 'products/compute/Disk.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Disk' +resource: google_compute_disk +generation_type: mmv1 +source_file: products/compute/Disk.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Disk fields: - - api_field: 'accessMode' - - api_field: 'architecture' - - api_field: 'asyncPrimaryDisk.disk' - - field: 'create_snapshot_before_destroy' - provider_only: true - - field: 'create_snapshot_before_destroy_prefix' - provider_only: true - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'diskEncryptionKey.kmsKeyName' - field: 'disk_encryption_key.kms_key_self_link' - - api_field: 'diskEncryptionKey.kmsKeyServiceAccount' - - api_field: 'diskEncryptionKey.rawKey' - - api_field: 'diskEncryptionKey.rsaEncryptedKey' - - api_field: 'diskEncryptionKey.sha256' - - api_field: 'id' - field: 'disk_id' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableConfidentialCompute' - - api_field: 'guestOsFeatures.type' - - api_field: 'sourceImage' - field: 'image' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'lastAttachTimestamp' - - api_field: 'lastDetachTimestamp' - - api_field: 'licenses' - - api_field: 'name' - - api_field: 'params.resourceManagerTags' - - api_field: 'physicalBlockSizeBytes' - - api_field: 'provisionedIops' - - api_field: 'provisionedThroughput' - - api_field: 'sizeGb' - field: 'size' - - api_field: 'sourceSnapshot' - field: 'snapshot' - - api_field: 'sourceDisk' - - api_field: 'sourceDiskId' - - api_field: 'sourceImageEncryptionKey.kmsKeyName' - field: 'source_image_encryption_key.kms_key_self_link' - - api_field: 'sourceImageEncryptionKey.kmsKeyServiceAccount' - - api_field: 'sourceImageEncryptionKey.rawKey' - - api_field: 'sourceImageEncryptionKey.sha256' - - api_field: 'sourceImageId' - - api_field: 'sourceInstantSnapshot' - - api_field: 'sourceInstantSnapshotId' - - api_field: 'sourceSnapshotEncryptionKey.kmsKeyName' - field: 'source_snapshot_encryption_key.kms_key_self_link' - - api_field: 'sourceSnapshotEncryptionKey.kmsKeyServiceAccount' - - api_field: 'sourceSnapshotEncryptionKey.rawKey' - - api_field: 'sourceSnapshotEncryptionKey.sha256' - - api_field: 'sourceSnapshotId' - - api_field: 'sourceStorageObject' - - api_field: 'storagePool' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'users' - - api_field: 'zone' - - api_field: 'selfLink' + - api_field: accessMode + - api_field: architecture + - api_field: asyncPrimaryDisk.disk + - field: create_snapshot_before_destroy + provider_only: true + - field: create_snapshot_before_destroy_prefix + provider_only: true + - api_field: creationTimestamp + - api_field: description + - api_field: diskEncryptionKey.kmsKeyName + field: disk_encryption_key.kms_key_self_link + - api_field: diskEncryptionKey.kmsKeyServiceAccount + - api_field: diskEncryptionKey.rawKey + - api_field: diskEncryptionKey.rsaEncryptedKey + - api_field: diskEncryptionKey.sha256 + - api_field: id + field: disk_id + - field: effective_labels + provider_only: true + - api_field: enableConfidentialCompute + - api_field: guestOsFeatures.type + - api_field: sourceImage + field: image + - api_field: labelFingerprint + - api_field: labels + - api_field: lastAttachTimestamp + - api_field: lastDetachTimestamp + - api_field: licenses + - api_field: name + - api_field: params.resourceManagerTags + - api_field: physicalBlockSizeBytes + - api_field: provisionedIops + - api_field: provisionedThroughput + - api_field: sizeGb + field: size + - api_field: sourceSnapshot + field: snapshot + - api_field: sourceDisk + - api_field: sourceDiskId + - api_field: sourceImageEncryptionKey.kmsKeyName + field: source_image_encryption_key.kms_key_self_link + - api_field: sourceImageEncryptionKey.kmsKeyServiceAccount + - api_field: sourceImageEncryptionKey.rawKey + - api_field: sourceImageEncryptionKey.sha256 + - api_field: sourceImageId + - api_field: sourceInstantSnapshot + - api_field: sourceInstantSnapshotId + - api_field: sourceSnapshotEncryptionKey.kmsKeyName + field: source_snapshot_encryption_key.kms_key_self_link + - api_field: sourceSnapshotEncryptionKey.kmsKeyServiceAccount + - api_field: sourceSnapshotEncryptionKey.rawKey + - api_field: sourceSnapshotEncryptionKey.sha256 + - api_field: sourceSnapshotId + - api_field: sourceStorageObject + - api_field: storagePool + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: users + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_disk_resource_policy_attachment_generated_meta.yaml b/google/services/compute/resource_compute_disk_resource_policy_attachment_generated_meta.yaml index 50c17d2d4ac..87bc77853b2 100644 --- a/google/services/compute/resource_compute_disk_resource_policy_attachment_generated_meta.yaml +++ b/google/services/compute/resource_compute_disk_resource_policy_attachment_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_compute_disk_resource_policy_attachment' -generation_type: 'mmv1' -source_file: 'products/compute/DiskResourcePolicyAttachment.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Disk' +resource: google_compute_disk_resource_policy_attachment +generation_type: mmv1 +source_file: products/compute/DiskResourcePolicyAttachment.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Disk fields: - - field: 'disk' - provider_only: true - - api_field: 'name' - - field: 'zone' - provider_only: true + - field: disk + provider_only: true + - api_field: name + - field: zone + provider_only: true diff --git a/google/services/compute/resource_compute_external_vpn_gateway_generated_meta.yaml b/google/services/compute/resource_compute_external_vpn_gateway_generated_meta.yaml index 8ede7242541..fdf8d13e035 100644 --- a/google/services/compute/resource_compute_external_vpn_gateway_generated_meta.yaml +++ b/google/services/compute/resource_compute_external_vpn_gateway_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_compute_external_vpn_gateway' -generation_type: 'mmv1' -source_file: 'products/compute/ExternalVpnGateway.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ExternalVpnGateway' +resource: google_compute_external_vpn_gateway +generation_type: mmv1 +source_file: products/compute/ExternalVpnGateway.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: ExternalVpnGateway fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'interfaces.id' - field: 'interface.id' - - api_field: 'interfaces.ipAddress' - field: 'interface.ip_address' - - api_field: 'interfaces.ipv6Address' - field: 'interface.ipv6_address' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'redundancyType' - - field: 'terraform_labels' - provider_only: true - - api_field: 'selfLink' + - api_field: description + - field: effective_labels + provider_only: true + - api_field: interfaces.id + field: interface.id + - api_field: interfaces.ipAddress + field: interface.ip_address + - api_field: interfaces.ipv6Address + field: interface.ipv6_address + - api_field: labelFingerprint + - api_field: labels + - api_field: name + - api_field: redundancyType + - field: terraform_labels + provider_only: true + - api_field: selfLink diff --git a/google/services/compute/resource_compute_firewall_generated_meta.yaml b/google/services/compute/resource_compute_firewall_generated_meta.yaml index 5ce530c218c..bfe9349421e 100644 --- a/google/services/compute/resource_compute_firewall_generated_meta.yaml +++ b/google/services/compute/resource_compute_firewall_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_compute_firewall' -generation_type: 'mmv1' -source_file: 'products/compute/Firewall.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Firewall' +resource: google_compute_firewall +generation_type: mmv1 +source_file: products/compute/Firewall.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Firewall fields: - - api_field: 'allowed.ports' - field: 'allow.ports' - - api_field: 'allowed.IPProtocol' - field: 'allow.protocol' - - api_field: 'creationTimestamp' - - api_field: 'denied.ports' - field: 'deny.ports' - - api_field: 'denied.IPProtocol' - field: 'deny.protocol' - - api_field: 'description' - - api_field: 'destinationRanges' - - api_field: 'direction' - - api_field: 'disabled' - - api_field: 'logConfig.metadata' - - api_field: 'name' - - api_field: 'network' - - api_field: 'params.resourceManagerTags' - - api_field: 'priority' - - api_field: 'sourceRanges' - - api_field: 'sourceServiceAccounts' - - api_field: 'sourceTags' - - api_field: 'targetServiceAccounts' - - api_field: 'targetTags' - - api_field: 'selfLink' + - api_field: allowed.ports + field: allow.ports + - api_field: allowed.IPProtocol + field: allow.protocol + - api_field: creationTimestamp + - api_field: denied.ports + field: deny.ports + - api_field: denied.IPProtocol + field: deny.protocol + - api_field: description + - api_field: destinationRanges + - api_field: direction + - api_field: disabled + - api_field: logConfig.metadata + - api_field: name + - api_field: network + - api_field: params.resourceManagerTags + - api_field: priority + - api_field: sourceRanges + - api_field: sourceServiceAccounts + - api_field: sourceTags + - api_field: targetServiceAccounts + - api_field: targetTags + - api_field: selfLink diff --git a/google/services/compute/resource_compute_firewall_policy_association_generated_meta.yaml b/google/services/compute/resource_compute_firewall_policy_association_generated_meta.yaml index dae307a107b..2b8b6e20022 100644 --- a/google/services/compute/resource_compute_firewall_policy_association_generated_meta.yaml +++ b/google/services/compute/resource_compute_firewall_policy_association_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_firewall_policy_association' -generation_type: 'mmv1' -source_file: 'products/compute/FirewallPolicyAssociation.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_firewall_policy_association +generation_type: mmv1 +source_file: products/compute/FirewallPolicyAssociation.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'associations.attachmentTarget' - field: 'attachment_target' - - api_field: 'associations.firewallPolicy' - field: 'firewall_policy' - - api_field: 'associations.name' - field: 'name' - - api_field: 'associations.shortName' - field: 'short_name' + - api_field: associations.attachmentTarget + field: attachment_target + - api_field: associations.firewallPolicy + field: firewall_policy + - api_field: associations.name + field: name + - api_field: associations.shortName + field: short_name diff --git a/google/services/compute/resource_compute_firewall_policy_generated_meta.yaml b/google/services/compute/resource_compute_firewall_policy_generated_meta.yaml index f40a38a9a22..433e941cce2 100644 --- a/google/services/compute/resource_compute_firewall_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_firewall_policy_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_compute_firewall_policy' -generation_type: 'mmv1' -source_file: 'products/compute/FirewallPolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_firewall_policy +generation_type: mmv1 +source_file: products/compute/FirewallPolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'id' - field: 'firewall_policy_id' - - api_field: 'name' - - api_field: 'parent' - - api_field: 'ruleTupleCount' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' - - api_field: 'shortName' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: id + field: firewall_policy_id + - api_field: name + - api_field: parent + - api_field: ruleTupleCount + - api_field: selfLink + - api_field: selfLinkWithId + - api_field: shortName diff --git a/google/services/compute/resource_compute_firewall_policy_rule_generated_meta.yaml b/google/services/compute/resource_compute_firewall_policy_rule_generated_meta.yaml index 5bc6866ba32..f889558aa31 100644 --- a/google/services/compute/resource_compute_firewall_policy_rule_generated_meta.yaml +++ b/google/services/compute/resource_compute_firewall_policy_rule_generated_meta.yaml @@ -1,67 +1,67 @@ -resource: 'google_compute_firewall_policy_rule' -generation_type: 'mmv1' -source_file: 'products/compute/FirewallPolicyRule.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_firewall_policy_rule +generation_type: mmv1 +source_file: products/compute/FirewallPolicyRule.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'rules.action' - field: 'action' - - api_field: 'rules.creationTimestamp' - field: 'creation_timestamp' - - api_field: 'rules.description' - field: 'description' - - api_field: 'rules.direction' - field: 'direction' - - api_field: 'rules.disabled' - field: 'disabled' - - api_field: 'rules.enableLogging' - field: 'enable_logging' - - api_field: 'rules.firewallPolicy' - field: 'firewall_policy' - - api_field: 'rules.kind' - field: 'kind' - - api_field: 'rules.match.destAddressGroups' - field: 'match.dest_address_groups' - - api_field: 'rules.match.destFqdns' - field: 'match.dest_fqdns' - - api_field: 'rules.match.destIpRanges' - field: 'match.dest_ip_ranges' - - api_field: 'rules.match.destRegionCodes' - field: 'match.dest_region_codes' - - api_field: 'rules.match.destThreatIntelligences' - field: 'match.dest_threat_intelligences' - - api_field: 'rules.match.layer4Configs.ipProtocol' - field: 'match.layer4_configs.ip_protocol' - - api_field: 'rules.match.layer4Configs.ports' - field: 'match.layer4_configs.ports' - - api_field: 'rules.match.srcAddressGroups' - field: 'match.src_address_groups' - - api_field: 'rules.match.srcFqdns' - field: 'match.src_fqdns' - - api_field: 'rules.match.srcIpRanges' - field: 'match.src_ip_ranges' - - api_field: 'rules.match.srcRegionCodes' - field: 'match.src_region_codes' - - api_field: 'rules.match.srcSecureTags.name' - field: 'match.src_secure_tags.name' - - api_field: 'rules.match.srcSecureTags.state' - field: 'match.src_secure_tags.state' - - api_field: 'rules.match.srcThreatIntelligences' - field: 'match.src_threat_intelligences' - - api_field: 'rules.priority' - field: 'priority' - - api_field: 'rules.ruleTupleCount' - field: 'rule_tuple_count' - - api_field: 'rules.securityProfileGroup' - field: 'security_profile_group' - - api_field: 'rules.targetResources' - field: 'target_resources' - - api_field: 'rules.targetSecureTags.name' - field: 'target_secure_tags.name' - - api_field: 'rules.targetSecureTags.state' - field: 'target_secure_tags.state' - - api_field: 'rules.targetServiceAccounts' - field: 'target_service_accounts' - - api_field: 'rules.tlsInspect' - field: 'tls_inspect' + - api_field: rules.action + field: action + - api_field: rules.creationTimestamp + field: creation_timestamp + - api_field: rules.description + field: description + - api_field: rules.direction + field: direction + - api_field: rules.disabled + field: disabled + - api_field: rules.enableLogging + field: enable_logging + - api_field: rules.firewallPolicy + field: firewall_policy + - api_field: rules.kind + field: kind + - api_field: rules.match.destAddressGroups + field: match.dest_address_groups + - api_field: rules.match.destFqdns + field: match.dest_fqdns + - api_field: rules.match.destIpRanges + field: match.dest_ip_ranges + - api_field: rules.match.destRegionCodes + field: match.dest_region_codes + - api_field: rules.match.destThreatIntelligences + field: match.dest_threat_intelligences + - api_field: rules.match.layer4Configs.ipProtocol + field: match.layer4_configs.ip_protocol + - api_field: rules.match.layer4Configs.ports + field: match.layer4_configs.ports + - api_field: rules.match.srcAddressGroups + field: match.src_address_groups + - api_field: rules.match.srcFqdns + field: match.src_fqdns + - api_field: rules.match.srcIpRanges + field: match.src_ip_ranges + - api_field: rules.match.srcRegionCodes + field: match.src_region_codes + - api_field: rules.match.srcSecureTags.name + field: match.src_secure_tags.name + - api_field: rules.match.srcSecureTags.state + field: match.src_secure_tags.state + - api_field: rules.match.srcThreatIntelligences + field: match.src_threat_intelligences + - api_field: rules.priority + field: priority + - api_field: rules.ruleTupleCount + field: rule_tuple_count + - api_field: rules.securityProfileGroup + field: security_profile_group + - api_field: rules.targetResources + field: target_resources + - api_field: rules.targetSecureTags.name + field: target_secure_tags.name + - api_field: rules.targetSecureTags.state + field: target_secure_tags.state + - api_field: rules.targetServiceAccounts + field: target_service_accounts + - api_field: rules.tlsInspect + field: tls_inspect diff --git a/google/services/compute/resource_compute_firewall_policy_with_rules_generated_meta.yaml b/google/services/compute/resource_compute_firewall_policy_with_rules_generated_meta.yaml index 7c6d153a70d..b36086e19fb 100644 --- a/google/services/compute/resource_compute_firewall_policy_with_rules_generated_meta.yaml +++ b/google/services/compute/resource_compute_firewall_policy_with_rules_generated_meta.yaml @@ -1,104 +1,104 @@ -resource: 'google_compute_firewall_policy_with_rules' -generation_type: 'mmv1' -source_file: 'products/compute/FirewallPolicyWithRules.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_firewall_policy_with_rules +generation_type: mmv1 +source_file: products/compute/FirewallPolicyWithRules.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'parent' - - api_field: 'id' - field: 'policy_id' - - api_field: 'predefinedRules.action' - - api_field: 'predefinedRules.description' - - api_field: 'predefinedRules.direction' - - api_field: 'predefinedRules.disabled' - - api_field: 'predefinedRules.enableLogging' - - api_field: 'predefinedRules.match.destAddressGroups' - - api_field: 'predefinedRules.match.destFqdns' - - api_field: 'predefinedRules.match.destIpRanges' - - api_field: 'predefinedRules.match.destRegionCodes' - - api_field: 'predefinedRules.match.destThreatIntelligences' - - api_field: 'predefinedRules.match.layer4Configs.ipProtocol' - field: 'predefined_rules.match.layer4_config.ip_protocol' - - api_field: 'predefinedRules.match.layer4Configs.ports' - field: 'predefined_rules.match.layer4_config.ports' - - api_field: 'predefinedRules.match.srcAddressGroups' - - api_field: 'predefinedRules.match.srcFqdns' - - api_field: 'predefinedRules.match.srcIpRanges' - - api_field: 'predefinedRules.match.srcRegionCodes' - - api_field: 'predefinedRules.match.srcSecureTags.name' - field: 'predefined_rules.match.src_secure_tag.name' - - api_field: 'predefinedRules.match.srcSecureTags.state' - field: 'predefined_rules.match.src_secure_tag.state' - - api_field: 'predefinedRules.match.srcThreatIntelligences' - - api_field: 'predefinedRules.priority' - - api_field: 'predefinedRules.ruleName' - - api_field: 'predefinedRules.securityProfileGroup' - - api_field: 'predefinedRules.targetResources' - - api_field: 'predefinedRules.targetSecureTags.name' - field: 'predefined_rules.target_secure_tag.name' - - api_field: 'predefinedRules.targetSecureTags.state' - field: 'predefined_rules.target_secure_tag.state' - - api_field: 'predefinedRules.targetServiceAccounts' - - api_field: 'predefinedRules.tlsInspect' - - api_field: 'rules.action' - field: 'rule.action' - - api_field: 'rules.description' - field: 'rule.description' - - api_field: 'rules.direction' - field: 'rule.direction' - - api_field: 'rules.disabled' - field: 'rule.disabled' - - api_field: 'rules.enableLogging' - field: 'rule.enable_logging' - - api_field: 'rules.match.destAddressGroups' - field: 'rule.match.dest_address_groups' - - api_field: 'rules.match.destFqdns' - field: 'rule.match.dest_fqdns' - - api_field: 'rules.match.destIpRanges' - field: 'rule.match.dest_ip_ranges' - - api_field: 'rules.match.destRegionCodes' - field: 'rule.match.dest_region_codes' - - api_field: 'rules.match.destThreatIntelligences' - field: 'rule.match.dest_threat_intelligences' - - api_field: 'rules.match.layer4Configs.ipProtocol' - field: 'rule.match.layer4_config.ip_protocol' - - api_field: 'rules.match.layer4Configs.ports' - field: 'rule.match.layer4_config.ports' - - api_field: 'rules.match.srcAddressGroups' - field: 'rule.match.src_address_groups' - - api_field: 'rules.match.srcFqdns' - field: 'rule.match.src_fqdns' - - api_field: 'rules.match.srcIpRanges' - field: 'rule.match.src_ip_ranges' - - api_field: 'rules.match.srcRegionCodes' - field: 'rule.match.src_region_codes' - - api_field: 'rules.match.srcSecureTags.name' - field: 'rule.match.src_secure_tag.name' - - api_field: 'rules.match.srcSecureTags.state' - field: 'rule.match.src_secure_tag.state' - - api_field: 'rules.match.srcThreatIntelligences' - field: 'rule.match.src_threat_intelligences' - - api_field: 'rules.priority' - field: 'rule.priority' - - api_field: 'rules.ruleName' - field: 'rule.rule_name' - - api_field: 'rules.securityProfileGroup' - field: 'rule.security_profile_group' - - api_field: 'rules.targetResources' - field: 'rule.target_resources' - - api_field: 'rules.targetSecureTags.name' - field: 'rule.target_secure_tag.name' - - api_field: 'rules.targetSecureTags.state' - field: 'rule.target_secure_tag.state' - - api_field: 'rules.targetServiceAccounts' - field: 'rule.target_service_accounts' - - api_field: 'rules.tlsInspect' - field: 'rule.tls_inspect' - - api_field: 'ruleTupleCount' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' - - api_field: 'shortName' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: parent + - api_field: id + field: policy_id + - api_field: predefinedRules.action + - api_field: predefinedRules.description + - api_field: predefinedRules.direction + - api_field: predefinedRules.disabled + - api_field: predefinedRules.enableLogging + - api_field: predefinedRules.match.destAddressGroups + - api_field: predefinedRules.match.destFqdns + - api_field: predefinedRules.match.destIpRanges + - api_field: predefinedRules.match.destRegionCodes + - api_field: predefinedRules.match.destThreatIntelligences + - api_field: predefinedRules.match.layer4Configs.ipProtocol + field: predefined_rules.match.layer4_config.ip_protocol + - api_field: predefinedRules.match.layer4Configs.ports + field: predefined_rules.match.layer4_config.ports + - api_field: predefinedRules.match.srcAddressGroups + - api_field: predefinedRules.match.srcFqdns + - api_field: predefinedRules.match.srcIpRanges + - api_field: predefinedRules.match.srcRegionCodes + - api_field: predefinedRules.match.srcSecureTags.name + field: predefined_rules.match.src_secure_tag.name + - api_field: predefinedRules.match.srcSecureTags.state + field: predefined_rules.match.src_secure_tag.state + - api_field: predefinedRules.match.srcThreatIntelligences + - api_field: predefinedRules.priority + - api_field: predefinedRules.ruleName + - api_field: predefinedRules.securityProfileGroup + - api_field: predefinedRules.targetResources + - api_field: predefinedRules.targetSecureTags.name + field: predefined_rules.target_secure_tag.name + - api_field: predefinedRules.targetSecureTags.state + field: predefined_rules.target_secure_tag.state + - api_field: predefinedRules.targetServiceAccounts + - api_field: predefinedRules.tlsInspect + - api_field: rules.action + field: rule.action + - api_field: rules.description + field: rule.description + - api_field: rules.direction + field: rule.direction + - api_field: rules.disabled + field: rule.disabled + - api_field: rules.enableLogging + field: rule.enable_logging + - api_field: rules.match.destAddressGroups + field: rule.match.dest_address_groups + - api_field: rules.match.destFqdns + field: rule.match.dest_fqdns + - api_field: rules.match.destIpRanges + field: rule.match.dest_ip_ranges + - api_field: rules.match.destRegionCodes + field: rule.match.dest_region_codes + - api_field: rules.match.destThreatIntelligences + field: rule.match.dest_threat_intelligences + - api_field: rules.match.layer4Configs.ipProtocol + field: rule.match.layer4_config.ip_protocol + - api_field: rules.match.layer4Configs.ports + field: rule.match.layer4_config.ports + - api_field: rules.match.srcAddressGroups + field: rule.match.src_address_groups + - api_field: rules.match.srcFqdns + field: rule.match.src_fqdns + - api_field: rules.match.srcIpRanges + field: rule.match.src_ip_ranges + - api_field: rules.match.srcRegionCodes + field: rule.match.src_region_codes + - api_field: rules.match.srcSecureTags.name + field: rule.match.src_secure_tag.name + - api_field: rules.match.srcSecureTags.state + field: rule.match.src_secure_tag.state + - api_field: rules.match.srcThreatIntelligences + field: rule.match.src_threat_intelligences + - api_field: rules.priority + field: rule.priority + - api_field: rules.ruleName + field: rule.rule_name + - api_field: rules.securityProfileGroup + field: rule.security_profile_group + - api_field: rules.targetResources + field: rule.target_resources + - api_field: rules.targetSecureTags.name + field: rule.target_secure_tag.name + - api_field: rules.targetSecureTags.state + field: rule.target_secure_tag.state + - api_field: rules.targetServiceAccounts + field: rule.target_service_accounts + - api_field: rules.tlsInspect + field: rule.tls_inspect + - api_field: ruleTupleCount + - api_field: selfLink + - api_field: selfLinkWithId + - api_field: shortName diff --git a/google/services/compute/resource_compute_forwarding_rule_generated_meta.yaml b/google/services/compute/resource_compute_forwarding_rule_generated_meta.yaml index 9771ed7640a..0388389faee 100644 --- a/google/services/compute/resource_compute_forwarding_rule_generated_meta.yaml +++ b/google/services/compute/resource_compute_forwarding_rule_generated_meta.yaml @@ -1,49 +1,49 @@ -resource: 'google_compute_forwarding_rule' -generation_type: 'mmv1' -source_file: 'products/compute/ForwardingRule.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ForwardingRule' +resource: google_compute_forwarding_rule +generation_type: mmv1 +source_file: products/compute/ForwardingRule.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: ForwardingRule api_variant_patterns: - - 'projects/{project}/regions/{region}/forwardingRules/{forwardingRule}' + - projects/{project}/regions/{region}/forwardingRules/{forwardingRule} fields: - - api_field: 'allPorts' - - api_field: 'allowGlobalAccess' - - api_field: 'allowPscGlobalAccess' - - api_field: 'backendService' - - api_field: 'baseForwardingRule' - - api_field: 'creationTimestamp' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'id' - field: 'forwarding_rule_id' - - api_field: 'IPAddress' - - api_field: 'ipCollection' - - api_field: 'IPProtocol' - - api_field: 'ipVersion' - - api_field: 'isMirroringCollector' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'loadBalancingScheme' - - api_field: 'name' - - api_field: 'network' - - api_field: 'networkTier' - - api_field: 'noAutomateDnsZone' - - api_field: 'portRange' - - api_field: 'ports' - - api_field: 'pscConnectionId' - - api_field: 'pscConnectionStatus' - - field: 'recreate_closed_psc' - provider_only: true - - api_field: 'region' - - api_field: 'serviceDirectoryRegistrations.namespace' - - api_field: 'serviceDirectoryRegistrations.service' - - api_field: 'serviceLabel' - - api_field: 'serviceName' - - api_field: 'sourceIpRanges' - - api_field: 'subnetwork' - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'selfLink' + - api_field: allPorts + - api_field: allowGlobalAccess + - api_field: allowPscGlobalAccess + - api_field: backendService + - api_field: baseForwardingRule + - api_field: creationTimestamp + - api_field: description + - field: effective_labels + provider_only: true + - api_field: id + field: forwarding_rule_id + - api_field: IPAddress + - api_field: ipCollection + - api_field: IPProtocol + - api_field: ipVersion + - api_field: isMirroringCollector + - api_field: labelFingerprint + - api_field: labels + - api_field: loadBalancingScheme + - api_field: name + - api_field: network + - api_field: networkTier + - api_field: noAutomateDnsZone + - api_field: portRange + - api_field: ports + - api_field: pscConnectionId + - api_field: pscConnectionStatus + - field: recreate_closed_psc + provider_only: true + - api_field: region + - api_field: serviceDirectoryRegistrations.namespace + - api_field: serviceDirectoryRegistrations.service + - api_field: serviceLabel + - api_field: serviceName + - api_field: sourceIpRanges + - api_field: subnetwork + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: selfLink diff --git a/google/services/compute/resource_compute_global_address_generated_meta.yaml b/google/services/compute/resource_compute_global_address_generated_meta.yaml index 0f15e609df5..dbc3fb82caa 100644 --- a/google/services/compute/resource_compute_global_address_generated_meta.yaml +++ b/google/services/compute/resource_compute_global_address_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_compute_global_address' -generation_type: 'mmv1' -source_file: 'products/compute/GlobalAddress.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Address' +resource: google_compute_global_address +generation_type: mmv1 +source_file: products/compute/GlobalAddress.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Address fields: - - api_field: 'address' - - api_field: 'addressType' - - api_field: 'creationTimestamp' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'ipVersion' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'network' - - api_field: 'prefixLength' - - api_field: 'purpose' - - field: 'terraform_labels' - provider_only: true - - api_field: 'selfLink' + - api_field: address + - api_field: addressType + - api_field: creationTimestamp + - api_field: description + - field: effective_labels + provider_only: true + - api_field: ipVersion + - api_field: labelFingerprint + - api_field: labels + - api_field: name + - api_field: network + - api_field: prefixLength + - api_field: purpose + - field: terraform_labels + provider_only: true + - api_field: selfLink diff --git a/google/services/compute/resource_compute_global_forwarding_rule_generated_meta.yaml b/google/services/compute/resource_compute_global_forwarding_rule_generated_meta.yaml index eaf1b836962..5cc82e8e3b1 100644 --- a/google/services/compute/resource_compute_global_forwarding_rule_generated_meta.yaml +++ b/google/services/compute/resource_compute_global_forwarding_rule_generated_meta.yaml @@ -1,41 +1,41 @@ -resource: 'google_compute_global_forwarding_rule' -generation_type: 'mmv1' -source_file: 'products/compute/GlobalForwardingRule.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ForwardingRule' +resource: google_compute_global_forwarding_rule +generation_type: mmv1 +source_file: products/compute/GlobalForwardingRule.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: ForwardingRule api_variant_patterns: - - 'projects/{project}/global/forwardingRules/{forwardingRule}' + - projects/{project}/global/forwardingRules/{forwardingRule} fields: - - api_field: 'baseForwardingRule' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'externalManagedBackendBucketMigrationState' - - api_field: 'externalManagedBackendBucketMigrationTestingPercentage' - - api_field: 'id' - field: 'forwarding_rule_id' - - api_field: 'IPAddress' - - api_field: 'IPProtocol' - - api_field: 'ipVersion' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'loadBalancingScheme' - - api_field: 'metadataFilters.filterLabels.name' - - api_field: 'metadataFilters.filterLabels.value' - - api_field: 'metadataFilters.filterMatchCriteria' - - api_field: 'name' - - api_field: 'network' - - api_field: 'networkTier' - - api_field: 'noAutomateDnsZone' - - api_field: 'portRange' - - api_field: 'pscConnectionId' - - api_field: 'pscConnectionStatus' - - api_field: 'serviceDirectoryRegistrations.namespace' - - api_field: 'serviceDirectoryRegistrations.serviceDirectoryRegion' - - api_field: 'sourceIpRanges' - - api_field: 'subnetwork' - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'selfLink' + - api_field: baseForwardingRule + - api_field: description + - field: effective_labels + provider_only: true + - api_field: externalManagedBackendBucketMigrationState + - api_field: externalManagedBackendBucketMigrationTestingPercentage + - api_field: id + field: forwarding_rule_id + - api_field: IPAddress + - api_field: IPProtocol + - api_field: ipVersion + - api_field: labelFingerprint + - api_field: labels + - api_field: loadBalancingScheme + - api_field: metadataFilters.filterLabels.name + - api_field: metadataFilters.filterLabels.value + - api_field: metadataFilters.filterMatchCriteria + - api_field: name + - api_field: network + - api_field: networkTier + - api_field: noAutomateDnsZone + - api_field: portRange + - api_field: pscConnectionId + - api_field: pscConnectionStatus + - api_field: serviceDirectoryRegistrations.namespace + - api_field: serviceDirectoryRegistrations.serviceDirectoryRegion + - api_field: sourceIpRanges + - api_field: subnetwork + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: selfLink diff --git a/google/services/compute/resource_compute_global_network_endpoint_generated_meta.yaml b/google/services/compute/resource_compute_global_network_endpoint_generated_meta.yaml index 9da13acbabe..4e34829edeb 100644 --- a/google/services/compute/resource_compute_global_network_endpoint_generated_meta.yaml +++ b/google/services/compute/resource_compute_global_network_endpoint_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_compute_global_network_endpoint' -generation_type: 'mmv1' -source_file: 'products/compute/GlobalNetworkEndpoint.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkEndpointGroup' +resource: google_compute_global_network_endpoint +generation_type: mmv1 +source_file: products/compute/GlobalNetworkEndpoint.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkEndpointGroup fields: - - api_field: 'fqdn' - - field: 'global_network_endpoint_group' - provider_only: true - - api_field: 'ipAddress' - - api_field: 'port' + - api_field: fqdn + - field: global_network_endpoint_group + provider_only: true + - api_field: ipAddress + - api_field: port diff --git a/google/services/compute/resource_compute_global_network_endpoint_group_generated_meta.yaml b/google/services/compute/resource_compute_global_network_endpoint_group_generated_meta.yaml index 6a176b5b73b..efb868c4a96 100644 --- a/google/services/compute/resource_compute_global_network_endpoint_group_generated_meta.yaml +++ b/google/services/compute/resource_compute_global_network_endpoint_group_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_compute_global_network_endpoint_group' -generation_type: 'mmv1' -source_file: 'products/compute/GlobalNetworkEndpointGroup.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkEndpointGroup' +resource: google_compute_global_network_endpoint_group +generation_type: mmv1 +source_file: products/compute/GlobalNetworkEndpointGroup.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkEndpointGroup fields: - - api_field: 'defaultPort' - - api_field: 'description' - - api_field: 'name' - - api_field: 'networkEndpointType' - - api_field: 'selfLink' + - api_field: defaultPort + - api_field: description + - api_field: name + - api_field: networkEndpointType + - api_field: selfLink diff --git a/google/services/compute/resource_compute_ha_vpn_gateway_generated_meta.yaml b/google/services/compute/resource_compute_ha_vpn_gateway_generated_meta.yaml index 6bbffa7e3ce..9ec3dd285e2 100644 --- a/google/services/compute/resource_compute_ha_vpn_gateway_generated_meta.yaml +++ b/google/services/compute/resource_compute_ha_vpn_gateway_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_compute_ha_vpn_gateway' -generation_type: 'mmv1' -source_file: 'products/compute/HaVpnGateway.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VpnGateway' +resource: google_compute_ha_vpn_gateway +generation_type: mmv1 +source_file: products/compute/HaVpnGateway.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: VpnGateway fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'gatewayIpVersion' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'network' - - api_field: 'region' - - api_field: 'stackType' - - field: 'terraform_labels' - provider_only: true - - api_field: 'vpnInterfaces.id' - - api_field: 'vpnInterfaces.interconnectAttachment' - - api_field: 'vpnInterfaces.ipAddress' - - api_field: 'selfLink' + - api_field: description + - field: effective_labels + provider_only: true + - api_field: gatewayIpVersion + - api_field: labelFingerprint + - api_field: labels + - api_field: name + - api_field: network + - api_field: region + - api_field: stackType + - field: terraform_labels + provider_only: true + - api_field: vpnInterfaces.id + - api_field: vpnInterfaces.interconnectAttachment + - api_field: vpnInterfaces.ipAddress + - api_field: selfLink diff --git a/google/services/compute/resource_compute_health_check_generated_meta.yaml b/google/services/compute/resource_compute_health_check_generated_meta.yaml index ae835dde6e1..49e85f45e7c 100644 --- a/google/services/compute/resource_compute_health_check_generated_meta.yaml +++ b/google/services/compute/resource_compute_health_check_generated_meta.yaml @@ -1,60 +1,60 @@ -resource: 'google_compute_health_check' -generation_type: 'mmv1' -source_file: 'products/compute/HealthCheck.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HealthCheck' +resource: google_compute_health_check +generation_type: mmv1 +source_file: products/compute/HealthCheck.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: HealthCheck api_variant_patterns: - - 'projects/{project}/global/healthChecks/{healthCheck}' + - projects/{project}/global/healthChecks/{healthCheck} fields: - - api_field: 'checkIntervalSec' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'grpcHealthCheck.grpcServiceName' - - api_field: 'grpcHealthCheck.port' - - api_field: 'grpcHealthCheck.portName' - - api_field: 'grpcHealthCheck.portSpecification' - - api_field: 'grpcTlsHealthCheck.grpcServiceName' - - api_field: 'grpcTlsHealthCheck.port' - - api_field: 'grpcTlsHealthCheck.portSpecification' - - api_field: 'healthyThreshold' - - api_field: 'http2HealthCheck.host' - - api_field: 'http2HealthCheck.port' - - api_field: 'http2HealthCheck.portName' - - api_field: 'http2HealthCheck.portSpecification' - - api_field: 'http2HealthCheck.proxyHeader' - - api_field: 'http2HealthCheck.requestPath' - - api_field: 'http2HealthCheck.response' - - api_field: 'httpHealthCheck.host' - - api_field: 'httpHealthCheck.port' - - api_field: 'httpHealthCheck.portName' - - api_field: 'httpHealthCheck.portSpecification' - - api_field: 'httpHealthCheck.proxyHeader' - - api_field: 'httpHealthCheck.requestPath' - - api_field: 'httpHealthCheck.response' - - api_field: 'httpsHealthCheck.host' - - api_field: 'httpsHealthCheck.port' - - api_field: 'httpsHealthCheck.portName' - - api_field: 'httpsHealthCheck.portSpecification' - - api_field: 'httpsHealthCheck.proxyHeader' - - api_field: 'httpsHealthCheck.requestPath' - - api_field: 'httpsHealthCheck.response' - - api_field: 'logConfig.enable' - - api_field: 'name' - - api_field: 'sourceRegions' - - api_field: 'sslHealthCheck.port' - - api_field: 'sslHealthCheck.portName' - - api_field: 'sslHealthCheck.portSpecification' - - api_field: 'sslHealthCheck.proxyHeader' - - api_field: 'sslHealthCheck.request' - - api_field: 'sslHealthCheck.response' - - api_field: 'tcpHealthCheck.port' - - api_field: 'tcpHealthCheck.portName' - - api_field: 'tcpHealthCheck.portSpecification' - - api_field: 'tcpHealthCheck.proxyHeader' - - api_field: 'tcpHealthCheck.request' - - api_field: 'tcpHealthCheck.response' - - api_field: 'timeoutSec' - - api_field: 'type' - - api_field: 'unhealthyThreshold' - - api_field: 'selfLink' + - api_field: checkIntervalSec + - api_field: creationTimestamp + - api_field: description + - api_field: grpcHealthCheck.grpcServiceName + - api_field: grpcHealthCheck.port + - api_field: grpcHealthCheck.portName + - api_field: grpcHealthCheck.portSpecification + - api_field: grpcTlsHealthCheck.grpcServiceName + - api_field: grpcTlsHealthCheck.port + - api_field: grpcTlsHealthCheck.portSpecification + - api_field: healthyThreshold + - api_field: http2HealthCheck.host + - api_field: http2HealthCheck.port + - api_field: http2HealthCheck.portName + - api_field: http2HealthCheck.portSpecification + - api_field: http2HealthCheck.proxyHeader + - api_field: http2HealthCheck.requestPath + - api_field: http2HealthCheck.response + - api_field: httpHealthCheck.host + - api_field: httpHealthCheck.port + - api_field: httpHealthCheck.portName + - api_field: httpHealthCheck.portSpecification + - api_field: httpHealthCheck.proxyHeader + - api_field: httpHealthCheck.requestPath + - api_field: httpHealthCheck.response + - api_field: httpsHealthCheck.host + - api_field: httpsHealthCheck.port + - api_field: httpsHealthCheck.portName + - api_field: httpsHealthCheck.portSpecification + - api_field: httpsHealthCheck.proxyHeader + - api_field: httpsHealthCheck.requestPath + - api_field: httpsHealthCheck.response + - api_field: logConfig.enable + - api_field: name + - api_field: sourceRegions + - api_field: sslHealthCheck.port + - api_field: sslHealthCheck.portName + - api_field: sslHealthCheck.portSpecification + - api_field: sslHealthCheck.proxyHeader + - api_field: sslHealthCheck.request + - api_field: sslHealthCheck.response + - api_field: tcpHealthCheck.port + - api_field: tcpHealthCheck.portName + - api_field: tcpHealthCheck.portSpecification + - api_field: tcpHealthCheck.proxyHeader + - api_field: tcpHealthCheck.request + - api_field: tcpHealthCheck.response + - api_field: timeoutSec + - api_field: type + - api_field: unhealthyThreshold + - api_field: selfLink diff --git a/google/services/compute/resource_compute_http_health_check_generated_meta.yaml b/google/services/compute/resource_compute_http_health_check_generated_meta.yaml index bf882627e9b..3c58ce4069e 100644 --- a/google/services/compute/resource_compute_http_health_check_generated_meta.yaml +++ b/google/services/compute/resource_compute_http_health_check_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_compute_http_health_check' -generation_type: 'mmv1' -source_file: 'products/compute/HttpHealthCheck.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HttpHealthCheck' +resource: google_compute_http_health_check +generation_type: mmv1 +source_file: products/compute/HttpHealthCheck.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: HttpHealthCheck fields: - - api_field: 'checkIntervalSec' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'healthyThreshold' - - api_field: 'host' - - api_field: 'name' - - api_field: 'port' - - api_field: 'requestPath' - - api_field: 'timeoutSec' - - api_field: 'unhealthyThreshold' - - api_field: 'selfLink' + - api_field: checkIntervalSec + - api_field: creationTimestamp + - api_field: description + - api_field: healthyThreshold + - api_field: host + - api_field: name + - api_field: port + - api_field: requestPath + - api_field: timeoutSec + - api_field: unhealthyThreshold + - api_field: selfLink diff --git a/google/services/compute/resource_compute_https_health_check_generated_meta.yaml b/google/services/compute/resource_compute_https_health_check_generated_meta.yaml index 4dd0d21da53..d52fe502b58 100644 --- a/google/services/compute/resource_compute_https_health_check_generated_meta.yaml +++ b/google/services/compute/resource_compute_https_health_check_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_compute_https_health_check' -generation_type: 'mmv1' -source_file: 'products/compute/HttpsHealthCheck.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HttpsHealthCheck' +resource: google_compute_https_health_check +generation_type: mmv1 +source_file: products/compute/HttpsHealthCheck.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: HttpsHealthCheck fields: - - api_field: 'checkIntervalSec' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'healthyThreshold' - - api_field: 'host' - - api_field: 'name' - - api_field: 'port' - - api_field: 'requestPath' - - api_field: 'timeoutSec' - - api_field: 'unhealthyThreshold' - - api_field: 'selfLink' + - api_field: checkIntervalSec + - api_field: creationTimestamp + - api_field: description + - api_field: healthyThreshold + - api_field: host + - api_field: name + - api_field: port + - api_field: requestPath + - api_field: timeoutSec + - api_field: unhealthyThreshold + - api_field: selfLink diff --git a/google/services/compute/resource_compute_image_generated_meta.yaml b/google/services/compute/resource_compute_image_generated_meta.yaml index 7965ff8d50e..447da2fa518 100644 --- a/google/services/compute/resource_compute_image_generated_meta.yaml +++ b/google/services/compute/resource_compute_image_generated_meta.yaml @@ -1,58 +1,58 @@ -resource: 'google_compute_image' -generation_type: 'mmv1' -source_file: 'products/compute/Image.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Image' +resource: google_compute_image +generation_type: mmv1 +source_file: products/compute/Image.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Image fields: - - api_field: 'archiveSizeBytes' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'diskSizeGb' - - field: 'effective_labels' - provider_only: true - - api_field: 'family' - - api_field: 'guestOsFeatures.type' - - api_field: 'imageEncryptionKey.kmsKeyName' - field: 'image_encryption_key.kms_key_self_link' - - api_field: 'imageEncryptionKey.kmsKeyServiceAccount' - - api_field: 'imageEncryptionKey.rawKey' - - api_field: 'imageEncryptionKey.rsaEncryptedKey' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'licenses' - - api_field: 'name' - - api_field: 'rawDisk.containerType' - - api_field: 'rawDisk.sha1Checksum' - field: 'raw_disk.sha1' - - api_field: 'rawDisk.source' - - api_field: 'shieldedInstanceInitialState.dbs.content' - - api_field: 'shieldedInstanceInitialState.dbs.fileType' - - api_field: 'shieldedInstanceInitialState.dbxs.content' - - api_field: 'shieldedInstanceInitialState.dbxs.fileType' - - api_field: 'shieldedInstanceInitialState.keks.content' - - api_field: 'shieldedInstanceInitialState.keks.fileType' - - api_field: 'shieldedInstanceInitialState.pk.content' - - api_field: 'shieldedInstanceInitialState.pk.fileType' - - api_field: 'sourceDisk' - - api_field: 'sourceDiskEncryptionKey.kmsKeyName' - field: 'source_disk_encryption_key.kms_key_self_link' - - api_field: 'sourceDiskEncryptionKey.kmsKeyServiceAccount' - - api_field: 'sourceDiskEncryptionKey.rawKey' - - api_field: 'sourceDiskEncryptionKey.rsaEncryptedKey' - - api_field: 'sourceImage' - - api_field: 'sourceImageEncryptionKey.kmsKeyName' - field: 'source_image_encryption_key.kms_key_self_link' - - api_field: 'sourceImageEncryptionKey.kmsKeyServiceAccount' - - api_field: 'sourceImageEncryptionKey.rawKey' - - api_field: 'sourceImageEncryptionKey.rsaEncryptedKey' - - api_field: 'sourceSnapshot' - - api_field: 'sourceSnapshotEncryptionKey.kmsKeyName' - field: 'source_snapshot_encryption_key.kms_key_self_link' - - api_field: 'sourceSnapshotEncryptionKey.kmsKeyServiceAccount' - - api_field: 'sourceSnapshotEncryptionKey.rawKey' - - api_field: 'sourceSnapshotEncryptionKey.rsaEncryptedKey' - - api_field: 'storageLocations' - - field: 'terraform_labels' - provider_only: true - - api_field: 'selfLink' + - api_field: archiveSizeBytes + - api_field: creationTimestamp + - api_field: description + - api_field: diskSizeGb + - field: effective_labels + provider_only: true + - api_field: family + - api_field: guestOsFeatures.type + - api_field: imageEncryptionKey.kmsKeyName + field: image_encryption_key.kms_key_self_link + - api_field: imageEncryptionKey.kmsKeyServiceAccount + - api_field: imageEncryptionKey.rawKey + - api_field: imageEncryptionKey.rsaEncryptedKey + - api_field: labelFingerprint + - api_field: labels + - api_field: licenses + - api_field: name + - api_field: rawDisk.containerType + - api_field: rawDisk.sha1Checksum + field: raw_disk.sha1 + - api_field: rawDisk.source + - api_field: shieldedInstanceInitialState.dbs.content + - api_field: shieldedInstanceInitialState.dbs.fileType + - api_field: shieldedInstanceInitialState.dbxs.content + - api_field: shieldedInstanceInitialState.dbxs.fileType + - api_field: shieldedInstanceInitialState.keks.content + - api_field: shieldedInstanceInitialState.keks.fileType + - api_field: shieldedInstanceInitialState.pk.content + - api_field: shieldedInstanceInitialState.pk.fileType + - api_field: sourceDisk + - api_field: sourceDiskEncryptionKey.kmsKeyName + field: source_disk_encryption_key.kms_key_self_link + - api_field: sourceDiskEncryptionKey.kmsKeyServiceAccount + - api_field: sourceDiskEncryptionKey.rawKey + - api_field: sourceDiskEncryptionKey.rsaEncryptedKey + - api_field: sourceImage + - api_field: sourceImageEncryptionKey.kmsKeyName + field: source_image_encryption_key.kms_key_self_link + - api_field: sourceImageEncryptionKey.kmsKeyServiceAccount + - api_field: sourceImageEncryptionKey.rawKey + - api_field: sourceImageEncryptionKey.rsaEncryptedKey + - api_field: sourceSnapshot + - api_field: sourceSnapshotEncryptionKey.kmsKeyName + field: source_snapshot_encryption_key.kms_key_self_link + - api_field: sourceSnapshotEncryptionKey.kmsKeyServiceAccount + - api_field: sourceSnapshotEncryptionKey.rawKey + - api_field: sourceSnapshotEncryptionKey.rsaEncryptedKey + - api_field: storageLocations + - field: terraform_labels + provider_only: true + - api_field: selfLink diff --git a/google/services/compute/resource_compute_instance_group_manager_meta.yaml b/google/services/compute/resource_compute_instance_group_manager_meta.yaml index 440e57bf799..e4165963853 100644 --- a/google/services/compute/resource_compute_instance_group_manager_meta.yaml +++ b/google/services/compute/resource_compute_instance_group_manager_meta.yaml @@ -35,17 +35,17 @@ fields: - api_field: 'standbyPolicy.initialDelaySec' - api_field: 'standbyPolicy.mode' - field: 'stateful_disk.delete_rule' - api_field: 'statefulPolicy.preservedState.disks' + api_field: 'statefulPolicy.preservedState.disks.value.autoDelete' - field: 'stateful_disk.device_name' - api_field: 'statefulPolicy.preservedState.disks' + api_field: 'statefulPolicy.preservedState.disks.key' - field: 'stateful_external_ip.delete_rule' - api_field: 'statefulPolicy.preservedState.externalIPs' + api_field: 'statefulPolicy.preservedState.externalIPs.value.autoDelete' - field: 'stateful_external_ip.interface_name' - api_field: 'statefulPolicy.preservedState.externalIPs' + api_field: 'statefulPolicy.preservedState.externalIPs.key' - field: 'stateful_internal_ip.delete_rule' - api_field: 'statefulPolicy.preservedState.internalIPs' + api_field: 'statefulPolicy.preservedState.internalIPs.value.autoDelete' - field: 'stateful_internal_ip.interface_name' - api_field: 'statefulPolicy.preservedState.internalIPs' + api_field: 'statefulPolicy.preservedState.internalIPs.key' - api_field: 'status.allInstancesConfig.currentRevision' - api_field: 'status.allInstancesConfig.effective' - api_field: 'status.isStable' diff --git a/google/services/compute/resource_compute_instance_group_manager_test.go b/google/services/compute/resource_compute_instance_group_manager_test.go index c4b4375e1f2..9634ae403af 100644 --- a/google/services/compute/resource_compute_instance_group_manager_test.go +++ b/google/services/compute/resource_compute_instance_group_manager_test.go @@ -2100,6 +2100,11 @@ resource "google_compute_instance_template" "igm-basic" { network = "default" } + scheduling { + automatic_restart = true + on_host_maintenance = "TERMINATE" + } + service_account { scopes = ["userinfo-email", "compute-ro", "storage-ro"] } @@ -2208,6 +2213,11 @@ resource "google_compute_instance_template" "igm-basic" { can_ip_forward = false tags = ["foo", "bar"] + scheduling { + automatic_restart = true + on_host_maintenance = "TERMINATE" + } + disk { source_image = data.google_compute_image.my_image.self_link auto_delete = true @@ -2257,6 +2267,11 @@ resource "google_compute_instance_template" "igm-basic" { can_ip_forward = false tags = ["foo", "bar"] + scheduling { + automatic_restart = true + on_host_maintenance = "TERMINATE" + } + disk { source_image = data.google_compute_image.my_image.self_link auto_delete = true diff --git a/google/services/compute/resource_compute_instance_group_membership_generated_meta.yaml b/google/services/compute/resource_compute_instance_group_membership_generated_meta.yaml index e3ff683a589..2ccc832f5be 100644 --- a/google/services/compute/resource_compute_instance_group_membership_generated_meta.yaml +++ b/google/services/compute/resource_compute_instance_group_membership_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_compute_instance_group_membership' -generation_type: 'mmv1' -source_file: 'products/compute/InstanceGroupMembership.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceGroup' +resource: google_compute_instance_group_membership +generation_type: mmv1 +source_file: products/compute/InstanceGroupMembership.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceGroup api_variant_patterns: - - 'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}' + - projects/{project}/zones/{zone}/instanceGroups/{instanceGroup} fields: - - api_field: 'instance' - - field: 'instance_group' - provider_only: true - - field: 'zone' - provider_only: true + - api_field: instance + - field: instance_group + provider_only: true + - field: zone + provider_only: true diff --git a/google/services/compute/resource_compute_instance_group_membership_test.go b/google/services/compute/resource_compute_instance_group_membership_test.go index 23610f6f71e..ad6ff7474f1 100644 --- a/google/services/compute/resource_compute_instance_group_membership_test.go +++ b/google/services/compute/resource_compute_instance_group_membership_test.go @@ -38,7 +38,7 @@ func TestAccComputeInstanceGroupMembership_instanceGroupMembershipBasic(t *testi "zone": envvar.GetTestZoneFromEnv(), } - igId := fmt.Sprintf("projects/%s/zones/%s/instanceGroups/instance-group-%s", + igId := fmt.Sprintf("projects/%s/zones/%s/instanceGroups/tf-test-instance-group-%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), context["random_suffix"]) acctest.VcrTest(t, resource.TestCase{ @@ -82,8 +82,8 @@ func TestAccComputeInstanceGroupMembership_instanceGroupMembershipBasic(t *testi Check: resource.ComposeTestCheckFunc( testAccCheckComputeInstanceGroupMembershipDestroyed( t, igId, - testAccComputeInstanceGroupMembershipGetInstanceName("add1-instance", suffix), - testAccComputeInstanceGroupMembershipGetInstanceName("add2-instance", suffix), + testAccComputeInstanceGroupMembershipGetInstanceName("tf-test-add1-instance", suffix), + testAccComputeInstanceGroupMembershipGetInstanceName("tf-test-add2-instance", suffix), ), ), }, @@ -99,7 +99,7 @@ func TestAccComputeInstanceGroupMembership_instanceGroupMembershipBasic(t *testi Check: resource.ComposeTestCheckFunc( testAccCheckComputeInstanceGroupMembershipDestroyed( t, igId, - testAccComputeInstanceGroupMembershipGetInstanceName("default-instance", suffix)), + testAccComputeInstanceGroupMembershipGetInstanceName("tf-test-default-instance", suffix)), ), }, }, @@ -133,11 +133,11 @@ func testAccComputeInstanceGroupMembership_instanceGroupMembershipAdditional(con func testAccComputeInstanceGroupMembership_noInstanceGroupMembership(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_compute_network" "default-network" { - name = "default-%{random_suffix}" + name = "tf-test-default-%{random_suffix}" } resource "google_compute_instance" "default" { - name = "default-instance-%{random_suffix}" + name = "tf-test-default-instance-%{random_suffix}" machine_type = "e2-medium" boot_disk { @@ -152,7 +152,7 @@ func testAccComputeInstanceGroupMembership_noInstanceGroupMembership(context map } resource "google_compute_instance" "add1" { - name = "add1-instance-%{random_suffix}" + name = "tf-test-add1-instance-%{random_suffix}" machine_type = "e2-medium" boot_disk { @@ -167,7 +167,7 @@ func testAccComputeInstanceGroupMembership_noInstanceGroupMembership(context map } resource "google_compute_instance" "add2" { - name = "add2-instance-%{random_suffix}" + name = "tf-test-add2-instance-%{random_suffix}" machine_type = "e2-medium" boot_disk { @@ -182,7 +182,7 @@ func testAccComputeInstanceGroupMembership_noInstanceGroupMembership(context map } resource "google_compute_instance_group" "default" { - name = "instance-group-%{random_suffix}" + name = "tf-test-instance-group-%{random_suffix}" } `, context) } diff --git a/google/services/compute/resource_compute_instance_group_meta.yaml b/google/services/compute/resource_compute_instance_group_meta.yaml index 4e91b8f670d..cf56efe8a51 100644 --- a/google/services/compute/resource_compute_instance_group_meta.yaml +++ b/google/services/compute/resource_compute_instance_group_meta.yaml @@ -9,8 +9,10 @@ fields: - api_field: 'description' - field: 'instances' - api_field: 'name' - - field: 'named_port.name' - - field: 'named_port.port' + - api_field: 'namedPorts.name' + field: 'named_port.name' + - api_field: 'namedPorts.port' + field: 'named_port.port' - api_field: 'network' - field: 'project' - api_field: 'selfLink' diff --git a/google/services/compute/resource_compute_instance_group_named_port_generated_meta.yaml b/google/services/compute/resource_compute_instance_group_named_port_generated_meta.yaml index eab3cf61f66..89ede8d91b3 100644 --- a/google/services/compute/resource_compute_instance_group_named_port_generated_meta.yaml +++ b/google/services/compute/resource_compute_instance_group_named_port_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_instance_group_named_port' -generation_type: 'mmv1' -source_file: 'products/compute/InstanceGroupNamedPort.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceGroup' +resource: google_compute_instance_group_named_port +generation_type: mmv1 +source_file: products/compute/InstanceGroupNamedPort.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceGroup api_variant_patterns: - - 'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}' + - projects/{project}/zones/{zone}/instanceGroups/{instanceGroup} fields: - - field: 'group' - provider_only: true - - api_field: 'name' - - api_field: 'port' - - field: 'zone' - provider_only: true + - field: group + provider_only: true + - api_field: name + - api_field: port + - field: zone + provider_only: true diff --git a/google/services/compute/resource_compute_instance_migrate_test.go b/google/services/compute/resource_compute_instance_migrate_test.go index 0a9bed0ae87..326c0b0b870 100644 --- a/google/services/compute/resource_compute_instance_migrate_test.go +++ b/google/services/compute/resource_compute_instance_migrate_test.go @@ -106,7 +106,7 @@ func TestAccComputeInstanceMigrateState(t *testing.T) { config := getInitializedConfig(t) - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -178,7 +178,7 @@ func TestAccComputeInstanceMigrateState_bootDisk(t *testing.T) { zone := "us-central1-f" // Seed test data - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -246,7 +246,7 @@ func TestAccComputeInstanceMigrateState_v4FixBootDisk(t *testing.T) { zone := "us-central1-f" // Seed test data - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -313,7 +313,7 @@ func TestAccComputeInstanceMigrateState_attachedDiskFromSource(t *testing.T) { zone := "us-central1-f" // Seed test data - diskName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + diskName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) disk := &compute.Disk{ Name: diskName, SourceImage: "projects/debian-cloud/global/images/family/debian-11", @@ -329,7 +329,7 @@ func TestAccComputeInstanceMigrateState_attachedDiskFromSource(t *testing.T) { } defer cleanUpDisk(config, diskName, zone) - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -394,7 +394,7 @@ func TestAccComputeInstanceMigrateState_v4FixAttachedDiskFromSource(t *testing.T zone := "us-central1-f" // Seed test data - diskName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + diskName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) disk := &compute.Disk{ Name: diskName, SourceImage: "projects/debian-cloud/global/images/family/debian-11", @@ -410,7 +410,7 @@ func TestAccComputeInstanceMigrateState_v4FixAttachedDiskFromSource(t *testing.T } defer cleanUpDisk(config, diskName, zone) - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -473,7 +473,7 @@ func TestAccComputeInstanceMigrateState_attachedDiskFromEncryptionKey(t *testing config := getInitializedConfig(t) zone := "us-central1-f" - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -542,7 +542,7 @@ func TestAccComputeInstanceMigrateState_v4FixAttachedDiskFromEncryptionKey(t *te config := getInitializedConfig(t) zone := "us-central1-f" - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -610,7 +610,7 @@ func TestAccComputeInstanceMigrateState_attachedDiskFromAutoDeleteAndImage(t *te config := getInitializedConfig(t) zone := "us-central1-f" - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -683,7 +683,7 @@ func TestAccComputeInstanceMigrateState_v4FixAttachedDiskFromAutoDeleteAndImage( config := getInitializedConfig(t) zone := "us-central1-f" - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -756,7 +756,7 @@ func TestAccComputeInstanceMigrateState_scratchDisk(t *testing.T) { zone := "us-central1-f" // Seed test data - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ @@ -822,7 +822,7 @@ func TestAccComputeInstanceMigrateState_v4FixScratchDisk(t *testing.T) { zone := "us-central1-f" // Seed test data - instanceName := fmt.Sprintf("instance-test-%s", acctest.RandString(t, 10)) + instanceName := fmt.Sprintf("tf-test-instance-test-%s", acctest.RandString(t, 10)) instance := &compute.Instance{ Name: instanceName, Disks: []*compute.AttachedDisk{ diff --git a/google/services/compute/resource_compute_instance_settings_generated_meta.yaml b/google/services/compute/resource_compute_instance_settings_generated_meta.yaml index d7e1110d8e2..13e848876ee 100644 --- a/google/services/compute/resource_compute_instance_settings_generated_meta.yaml +++ b/google/services/compute/resource_compute_instance_settings_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_compute_instance_settings' -generation_type: 'mmv1' -source_file: 'products/compute/InstanceSettings.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceSettings' -cai_asset_name_format: '//compute.googleapis.com/projects/{{project}}/zones/{{zone}}/instanceSettings/InstanceSettings' +resource: google_compute_instance_settings +generation_type: mmv1 +source_file: products/compute/InstanceSettings.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceSettings +cai_asset_name_format: //compute.googleapis.com/projects/{{project}}/zones/{{zone}}/instanceSettings/InstanceSettings fields: - - api_field: 'fingerprint' - - api_field: 'metadata.items' - - api_field: 'zone' + - api_field: fingerprint + - api_field: metadata.items + - api_field: zone diff --git a/google/services/compute/resource_compute_instant_snapshot_generated_meta.yaml b/google/services/compute/resource_compute_instant_snapshot_generated_meta.yaml index e4dee84f203..cb44631640e 100644 --- a/google/services/compute/resource_compute_instant_snapshot_generated_meta.yaml +++ b/google/services/compute/resource_compute_instant_snapshot_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_compute_instant_snapshot' -generation_type: 'mmv1' -source_file: 'products/compute/InstantSnapshot.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstantSnapshot' +resource: google_compute_instant_snapshot +generation_type: mmv1 +source_file: products/compute/InstantSnapshot.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InstantSnapshot api_variant_patterns: - - 'projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}' + - projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot} fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'diskSizeGb' - - field: 'effective_labels' - provider_only: true - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'sourceDisk' - - api_field: 'sourceDiskId' - - field: 'terraform_labels' - provider_only: true - - api_field: 'zone' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: description + - api_field: diskSizeGb + - field: effective_labels + provider_only: true + - api_field: labelFingerprint + - api_field: labels + - api_field: name + - api_field: sourceDisk + - api_field: sourceDiskId + - field: terraform_labels + provider_only: true + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_interconnect.go b/google/services/compute/resource_compute_interconnect.go index 0a319dcbbab..d0449860556 100644 --- a/google/services/compute/resource_compute_interconnect.go +++ b/google/services/compute/resource_compute_interconnect.go @@ -521,6 +521,14 @@ This can be used only for ping tests.`, and default labels configured on the provider.`, Elem: &schema.Schema{Type: schema.TypeString}, }, + "wire_groups": { + Type: schema.TypeList, + Computed: true, + Description: `A list of the URLs of all CrossSiteNetwork WireGroups configured to use this Interconnect. The Interconnect cannot be deleted if this list is non-empty.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, "project": { Type: schema.TypeString, Optional: true, @@ -892,6 +900,9 @@ func resourceComputeInterconnectRead(d *schema.ResourceData, meta interface{}) e if err := d.Set("available_features", flattenComputeInterconnectAvailableFeatures(res["availableFeatures"], d, config)); err != nil { return fmt.Errorf("Error reading Interconnect: %s", err) } + if err := d.Set("wire_groups", flattenComputeInterconnectWireGroups(res["wireGroups"], d, config)); err != nil { + return fmt.Errorf("Error reading Interconnect: %s", err) + } if err := d.Set("interconnect_groups", flattenComputeInterconnectInterconnectGroups(res["interconnectGroups"], d, config)); err != nil { return fmt.Errorf("Error reading Interconnect: %s", err) } @@ -1440,6 +1451,10 @@ func flattenComputeInterconnectAvailableFeatures(v interface{}, d *schema.Resour return v } +func flattenComputeInterconnectWireGroups(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenComputeInterconnectInterconnectGroups(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v diff --git a/google/services/compute/resource_compute_interconnect_attachment.go b/google/services/compute/resource_compute_interconnect_attachment.go index cacb40632d9..0dbf255ae94 100644 --- a/google/services/compute/resource_compute_interconnect_attachment.go +++ b/google/services/compute/resource_compute_interconnect_attachment.go @@ -186,6 +186,34 @@ For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, Defaults to BPS_10G Possible values: ["BPS_50M", "BPS_100M", "BPS_200M", "BPS_300M", "BPS_400M", "BPS_500M", "BPS_1G", "BPS_2G", "BPS_5G", "BPS_10G", "BPS_20G", "BPS_50G", "BPS_100G"]`, + }, + "candidate_cloud_router_ip_address": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Single IPv4 address + prefix length to be configured on the cloud router interface for this +interconnect attachment. Example: 203.0.113.1/29`, + }, + "candidate_cloud_router_ipv6_address": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Single IPv6 address + prefix length to be configured on the cloud router interface for this +interconnect attachment. Example: 2001:db8::1/125`, + }, + "candidate_customer_router_ip_address": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Single IPv4 address + prefix length to be configured on the customer router interface for this +interconnect attachment. Example: 203.0.113.2/29`, + }, + "candidate_customer_router_ipv6_address": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Single IPv6 address + prefix length to be configured on the customer router interface for this +interconnect attachment. Example: 2001:db8::2/125`, }, "candidate_subnets": { Type: schema.TypeList, @@ -549,6 +577,30 @@ func resourceComputeInterconnectAttachmentCreate(d *schema.ResourceData, meta in } else if v, ok := d.GetOkExists("label_fingerprint"); !tpgresource.IsEmptyValue(reflect.ValueOf(labelFingerprintProp)) && (ok || !reflect.DeepEqual(v, labelFingerprintProp)) { obj["labelFingerprint"] = labelFingerprintProp } + candidateCloudRouterIpAddressProp, err := expandComputeInterconnectAttachmentCandidateCloudRouterIpAddress(d.Get("candidate_cloud_router_ip_address"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("candidate_cloud_router_ip_address"); !tpgresource.IsEmptyValue(reflect.ValueOf(candidateCloudRouterIpAddressProp)) && (ok || !reflect.DeepEqual(v, candidateCloudRouterIpAddressProp)) { + obj["candidateCloudRouterIpAddress"] = candidateCloudRouterIpAddressProp + } + candidateCustomerRouterIpAddressProp, err := expandComputeInterconnectAttachmentCandidateCustomerRouterIpAddress(d.Get("candidate_customer_router_ip_address"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("candidate_customer_router_ip_address"); !tpgresource.IsEmptyValue(reflect.ValueOf(candidateCustomerRouterIpAddressProp)) && (ok || !reflect.DeepEqual(v, candidateCustomerRouterIpAddressProp)) { + obj["candidateCustomerRouterIpAddress"] = candidateCustomerRouterIpAddressProp + } + candidateCloudRouterIpv6AddressProp, err := expandComputeInterconnectAttachmentCandidateCloudRouterIpv6Address(d.Get("candidate_cloud_router_ipv6_address"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("candidate_cloud_router_ipv6_address"); !tpgresource.IsEmptyValue(reflect.ValueOf(candidateCloudRouterIpv6AddressProp)) && (ok || !reflect.DeepEqual(v, candidateCloudRouterIpv6AddressProp)) { + obj["candidateCloudRouterIpv6Address"] = candidateCloudRouterIpv6AddressProp + } + candidateCustomerRouterIpv6AddressProp, err := expandComputeInterconnectAttachmentCandidateCustomerRouterIpv6Address(d.Get("candidate_customer_router_ipv6_address"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("candidate_customer_router_ipv6_address"); !tpgresource.IsEmptyValue(reflect.ValueOf(candidateCustomerRouterIpv6AddressProp)) && (ok || !reflect.DeepEqual(v, candidateCustomerRouterIpv6AddressProp)) { + obj["candidateCustomerRouterIpv6Address"] = candidateCustomerRouterIpv6AddressProp + } effectiveLabelsProp, err := expandComputeInterconnectAttachmentEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -820,6 +872,18 @@ func resourceComputeInterconnectAttachmentRead(d *schema.ResourceData, meta inte if err := d.Set("label_fingerprint", flattenComputeInterconnectAttachmentLabelFingerprint(res["labelFingerprint"], d, config)); err != nil { return fmt.Errorf("Error reading InterconnectAttachment: %s", err) } + if err := d.Set("candidate_cloud_router_ip_address", flattenComputeInterconnectAttachmentCandidateCloudRouterIpAddress(res["candidateCloudRouterIpAddress"], d, config)); err != nil { + return fmt.Errorf("Error reading InterconnectAttachment: %s", err) + } + if err := d.Set("candidate_customer_router_ip_address", flattenComputeInterconnectAttachmentCandidateCustomerRouterIpAddress(res["candidateCustomerRouterIpAddress"], d, config)); err != nil { + return fmt.Errorf("Error reading InterconnectAttachment: %s", err) + } + if err := d.Set("candidate_cloud_router_ipv6_address", flattenComputeInterconnectAttachmentCandidateCloudRouterIpv6Address(res["candidateCloudRouterIpv6Address"], d, config)); err != nil { + return fmt.Errorf("Error reading InterconnectAttachment: %s", err) + } + if err := d.Set("candidate_customer_router_ipv6_address", flattenComputeInterconnectAttachmentCandidateCustomerRouterIpv6Address(res["candidateCustomerRouterIpv6Address"], d, config)); err != nil { + return fmt.Errorf("Error reading InterconnectAttachment: %s", err) + } if err := d.Set("attachment_group", flattenComputeInterconnectAttachmentAttachmentGroup(res["attachmentGroup"], d, config)); err != nil { return fmt.Errorf("Error reading InterconnectAttachment: %s", err) } @@ -1277,6 +1341,22 @@ func flattenComputeInterconnectAttachmentLabelFingerprint(v interface{}, d *sche return v } +func flattenComputeInterconnectAttachmentCandidateCloudRouterIpAddress(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeInterconnectAttachmentCandidateCustomerRouterIpAddress(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeInterconnectAttachmentCandidateCloudRouterIpv6Address(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeInterconnectAttachmentCandidateCustomerRouterIpv6Address(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenComputeInterconnectAttachmentAttachmentGroup(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { return v } @@ -1387,6 +1467,22 @@ func expandComputeInterconnectAttachmentLabelFingerprint(v interface{}, d tpgres return v, nil } +func expandComputeInterconnectAttachmentCandidateCloudRouterIpAddress(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeInterconnectAttachmentCandidateCustomerRouterIpAddress(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeInterconnectAttachmentCandidateCloudRouterIpv6Address(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeInterconnectAttachmentCandidateCustomerRouterIpv6Address(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandComputeInterconnectAttachmentEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { if v == nil { return map[string]string{}, nil diff --git a/google/services/compute/resource_compute_interconnect_attachment_generated_meta.yaml b/google/services/compute/resource_compute_interconnect_attachment_generated_meta.yaml index a4f83094007..5cf531aa633 100644 --- a/google/services/compute/resource_compute_interconnect_attachment_generated_meta.yaml +++ b/google/services/compute/resource_compute_interconnect_attachment_generated_meta.yaml @@ -1,41 +1,45 @@ -resource: 'google_compute_interconnect_attachment' -generation_type: 'mmv1' -source_file: 'products/compute/InterconnectAttachment.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterconnectAttachment' +resource: google_compute_interconnect_attachment +generation_type: mmv1 +source_file: products/compute/InterconnectAttachment.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InterconnectAttachment fields: - - api_field: 'adminEnabled' - - api_field: 'attachmentGroup' - - api_field: 'bandwidth' - - api_field: 'candidateSubnets' - - api_field: 'cloudRouterIpAddress' - - api_field: 'cloudRouterIpv6Address' - - api_field: 'creationTimestamp' - - api_field: 'customerRouterIpAddress' - - api_field: 'customerRouterIpv6Address' - - api_field: 'description' - - api_field: 'edgeAvailabilityDomain' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryption' - - api_field: 'googleReferenceId' - - api_field: 'interconnect' - - api_field: 'ipsecInternalAddresses' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'mtu' - - api_field: 'name' - - api_field: 'pairingKey' - - api_field: 'partnerAsn' - - api_field: 'privateInterconnectInfo.tag8021q' - - api_field: 'region' - - api_field: 'router' - - api_field: 'stackType' - - api_field: 'state' - - api_field: 'subnetLength' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'vlanTag8021q' - - api_field: 'selfLink' + - api_field: adminEnabled + - api_field: attachmentGroup + - api_field: bandwidth + - api_field: candidateCloudRouterIpAddress + - api_field: candidateCloudRouterIpv6Address + - api_field: candidateCustomerRouterIpAddress + - api_field: candidateCustomerRouterIpv6Address + - api_field: candidateSubnets + - api_field: cloudRouterIpAddress + - api_field: cloudRouterIpv6Address + - api_field: creationTimestamp + - api_field: customerRouterIpAddress + - api_field: customerRouterIpv6Address + - api_field: description + - api_field: edgeAvailabilityDomain + - field: effective_labels + provider_only: true + - api_field: encryption + - api_field: googleReferenceId + - api_field: interconnect + - api_field: ipsecInternalAddresses + - api_field: labelFingerprint + - api_field: labels + - api_field: mtu + - api_field: name + - api_field: pairingKey + - api_field: partnerAsn + - api_field: privateInterconnectInfo.tag8021q + - api_field: region + - api_field: router + - api_field: stackType + - api_field: state + - api_field: subnetLength + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: vlanTag8021q + - api_field: selfLink diff --git a/google/services/compute/resource_compute_interconnect_attachment_generated_test.go b/google/services/compute/resource_compute_interconnect_attachment_generated_test.go index e46d4b653b0..06d2cc8d225 100644 --- a/google/services/compute/resource_compute_interconnect_attachment_generated_test.go +++ b/google/services/compute/resource_compute_interconnect_attachment_generated_test.go @@ -249,6 +249,68 @@ resource "google_compute_network" "network" { `, context) } +func TestAccComputeInterconnectAttachment_computeInterconnectAttachmentCustomRangesExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckComputeInterconnectAttachmentDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccComputeInterconnectAttachment_computeInterconnectAttachmentCustomRangesExample(context), + }, + { + ResourceName: "google_compute_interconnect_attachment.custom-ranges-interconnect-attachment", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"candidate_subnets", "labels", "region", "router", "subnet_length", "terraform_labels"}, + }, + { + ResourceName: "google_compute_interconnect_attachment.custom-ranges-interconnect-attachment", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccComputeInterconnectAttachment_computeInterconnectAttachmentCustomRangesExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_interconnect_attachment" "custom-ranges-interconnect-attachment" { + name = "tf-test-test-custom-ranges-interconnect-attachment%{random_suffix}" + edge_availability_domain = "AVAILABILITY_DOMAIN_1" + type = "PARTNER" + router = google_compute_router.foobar.id + mtu = 1500 + stack_type = "IPV4_IPV6" + labels = { mykey = "myvalue" } + candidate_cloud_router_ip_address = "192.169.0.1/29" + candidate_customer_router_ip_address = "192.169.0.2/29" + candidate_cloud_router_ipv6_address = "748d:2f23:6651:9455:828b:ca81:6fe0:fed1/125" + candidate_customer_router_ipv6_address = "748d:2f23:6651:9455:828b:ca81:6fe0:fed2/125" +} + +resource "google_compute_router" "foobar" { + name = "tf-test-test-router%{random_suffix}" + network = google_compute_network.foobar.name + bgp { + asn = 16550 + } +} + +resource "google_compute_network" "foobar" { + name = "tf-test-test-network%{random_suffix}" + auto_create_subnetworks = false +} +`, context) +} + func testAccCheckComputeInterconnectAttachmentDestroyProducer(t *testing.T) func(s *terraform.State) error { return func(s *terraform.State) error { for name, rs := range s.RootModule().Resources { diff --git a/google/services/compute/resource_compute_interconnect_attachment_group_generated_meta.yaml b/google/services/compute/resource_compute_interconnect_attachment_group_generated_meta.yaml index 9d7b135dfa6..4492b9f1440 100644 --- a/google/services/compute/resource_compute_interconnect_attachment_group_generated_meta.yaml +++ b/google/services/compute/resource_compute_interconnect_attachment_group_generated_meta.yaml @@ -1,26 +1,29 @@ -resource: 'google_compute_interconnect_attachment_group' -generation_type: 'mmv1' -source_file: 'products/compute/InterconnectAttachmentGroup.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterconnectAttachmentGroup' +resource: google_compute_interconnect_attachment_group +generation_type: mmv1 +source_file: products/compute/InterconnectAttachmentGroup.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InterconnectAttachmentGroup fields: - - api_field: 'attachments.mapObjectName.attachment' - - api_field: 'configured.availabilitySla.effectiveSla' - - api_field: 'configured.availabilitySla.intendedSlaBlockers.attachments' - - api_field: 'configured.availabilitySla.intendedSlaBlockers.blockerType' - - api_field: 'configured.availabilitySla.intendedSlaBlockers.documentationLink' - - api_field: 'configured.availabilitySla.intendedSlaBlockers.explanation' - - api_field: 'configured.availabilitySla.intendedSlaBlockers.metros' - - api_field: 'configured.availabilitySla.intendedSlaBlockers.regions' - - api_field: 'configured.availabilitySla.intendedSlaBlockers.zones' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'intent.availabilitySla' - - api_field: 'interconnectGroup' - - api_field: 'logicalStructure.regions.metros.facilities.facility' - - api_field: 'logicalStructure.regions.metros.facilities.zones.attachment' - - api_field: 'logicalStructure.regions.metros.facilities.zones.zone' - - api_field: 'logicalStructure.regions.metros.metro' - - api_field: 'logicalStructure.regions.region' - - api_field: 'name' + - api_field: attachments.key + field: attachments.name + - api_field: attachments.value.attachment + field: attachments.attachment + - api_field: configured.availabilitySla.effectiveSla + - api_field: configured.availabilitySla.intendedSlaBlockers.attachments + - api_field: configured.availabilitySla.intendedSlaBlockers.blockerType + - api_field: configured.availabilitySla.intendedSlaBlockers.documentationLink + - api_field: configured.availabilitySla.intendedSlaBlockers.explanation + - api_field: configured.availabilitySla.intendedSlaBlockers.metros + - api_field: configured.availabilitySla.intendedSlaBlockers.regions + - api_field: configured.availabilitySla.intendedSlaBlockers.zones + - api_field: creationTimestamp + - api_field: description + - api_field: intent.availabilitySla + - api_field: interconnectGroup + - api_field: logicalStructure.regions.metros.facilities.facility + - api_field: logicalStructure.regions.metros.facilities.zones.attachment + - api_field: logicalStructure.regions.metros.facilities.zones.zone + - api_field: logicalStructure.regions.metros.metro + - api_field: logicalStructure.regions.region + - api_field: name diff --git a/google/services/compute/resource_compute_interconnect_generated_meta.yaml b/google/services/compute/resource_compute_interconnect_generated_meta.yaml index 2d344b7b43e..29b46e687f2 100644 --- a/google/services/compute/resource_compute_interconnect_generated_meta.yaml +++ b/google/services/compute/resource_compute_interconnect_generated_meta.yaml @@ -1,52 +1,53 @@ -resource: 'google_compute_interconnect' -generation_type: 'mmv1' -source_file: 'products/compute/Interconnect.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Interconnect' +resource: google_compute_interconnect +generation_type: mmv1 +source_file: products/compute/Interconnect.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Interconnect fields: - - api_field: 'adminEnabled' - - api_field: 'availableFeatures' - - api_field: 'circuitInfos.customerDemarcId' - - api_field: 'circuitInfos.googleCircuitId' - - api_field: 'circuitInfos.googleDemarcId' - - api_field: 'creationTimestamp' - - api_field: 'customerName' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'expectedOutages.affectedCircuits' - - api_field: 'expectedOutages.description' - - api_field: 'expectedOutages.endTime' - - api_field: 'expectedOutages.issueType' - - api_field: 'expectedOutages.name' - - api_field: 'expectedOutages.source' - - api_field: 'expectedOutages.startTime' - - api_field: 'expectedOutages.state' - - api_field: 'googleIpAddress' - - api_field: 'googleReferenceId' - - api_field: 'interconnectAttachments' - - api_field: 'interconnectGroups' - - api_field: 'interconnectType' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'linkType' - - api_field: 'location' - - api_field: 'macsec.failOpen' - - api_field: 'macsec.preSharedKeys.failOpen' - - api_field: 'macsec.preSharedKeys.name' - - api_field: 'macsec.preSharedKeys.startTime' - - api_field: 'macsecEnabled' - - api_field: 'name' - - api_field: 'nocContactEmail' - - api_field: 'operationalStatus' - - api_field: 'params.resourceManagerTags' - - api_field: 'peerIpAddress' - - api_field: 'provisionedLinkCount' - - api_field: 'remoteLocation' - - api_field: 'requestedFeatures' - - api_field: 'requestedLinkCount' - - api_field: 'satisfiesPzs' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: adminEnabled + - api_field: availableFeatures + - api_field: circuitInfos.customerDemarcId + - api_field: circuitInfos.googleCircuitId + - api_field: circuitInfos.googleDemarcId + - api_field: creationTimestamp + - api_field: customerName + - api_field: description + - field: effective_labels + provider_only: true + - api_field: expectedOutages.affectedCircuits + - api_field: expectedOutages.description + - api_field: expectedOutages.endTime + - api_field: expectedOutages.issueType + - api_field: expectedOutages.name + - api_field: expectedOutages.source + - api_field: expectedOutages.startTime + - api_field: expectedOutages.state + - api_field: googleIpAddress + - api_field: googleReferenceId + - api_field: interconnectAttachments + - api_field: interconnectGroups + - api_field: interconnectType + - api_field: labelFingerprint + - api_field: labels + - api_field: linkType + - api_field: location + - api_field: macsec.failOpen + - api_field: macsec.preSharedKeys.failOpen + - api_field: macsec.preSharedKeys.name + - api_field: macsec.preSharedKeys.startTime + - api_field: macsecEnabled + - api_field: name + - api_field: nocContactEmail + - api_field: operationalStatus + - api_field: params.resourceManagerTags + - api_field: peerIpAddress + - api_field: provisionedLinkCount + - api_field: remoteLocation + - api_field: requestedFeatures + - api_field: requestedLinkCount + - api_field: satisfiesPzs + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: wireGroups diff --git a/google/services/compute/resource_compute_interconnect_group_generated_meta.yaml b/google/services/compute/resource_compute_interconnect_group_generated_meta.yaml index ae02a581f87..019e75182ba 100644 --- a/google/services/compute/resource_compute_interconnect_group_generated_meta.yaml +++ b/google/services/compute/resource_compute_interconnect_group_generated_meta.yaml @@ -1,24 +1,27 @@ -resource: 'google_compute_interconnect_group' -generation_type: 'mmv1' -source_file: 'products/compute/InterconnectGroup.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterconnectGroup' +resource: google_compute_interconnect_group +generation_type: mmv1 +source_file: products/compute/InterconnectGroup.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InterconnectGroup fields: - - api_field: 'configured.topologyCapability.intendedCapabilityBlockers.blockerType' - - api_field: 'configured.topologyCapability.intendedCapabilityBlockers.documentationLink' - - api_field: 'configured.topologyCapability.intendedCapabilityBlockers.explanation' - - api_field: 'configured.topologyCapability.intendedCapabilityBlockers.facilities' - - api_field: 'configured.topologyCapability.intendedCapabilityBlockers.interconnects' - - api_field: 'configured.topologyCapability.intendedCapabilityBlockers.metros' - - api_field: 'configured.topologyCapability.intendedCapabilityBlockers.zones' - - api_field: 'configured.topologyCapability.supportedSla' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'intent.topologyCapability' - - api_field: 'interconnects.mapObjectName.interconnect' - - api_field: 'name' - - api_field: 'physicalStructure.metros.facilities.facility' - - api_field: 'physicalStructure.metros.facilities.zones.interconnects' - - api_field: 'physicalStructure.metros.facilities.zones.zone' - - api_field: 'physicalStructure.metros.metro' + - api_field: configured.topologyCapability.intendedCapabilityBlockers.blockerType + - api_field: configured.topologyCapability.intendedCapabilityBlockers.documentationLink + - api_field: configured.topologyCapability.intendedCapabilityBlockers.explanation + - api_field: configured.topologyCapability.intendedCapabilityBlockers.facilities + - api_field: configured.topologyCapability.intendedCapabilityBlockers.interconnects + - api_field: configured.topologyCapability.intendedCapabilityBlockers.metros + - api_field: configured.topologyCapability.intendedCapabilityBlockers.zones + - api_field: configured.topologyCapability.supportedSla + - api_field: creationTimestamp + - api_field: description + - api_field: intent.topologyCapability + - api_field: interconnects.key + field: interconnects.name + - api_field: interconnects.value.interconnect + field: interconnects.interconnect + - api_field: name + - api_field: physicalStructure.metros.facilities.facility + - api_field: physicalStructure.metros.facilities.zones.interconnects + - api_field: physicalStructure.metros.facilities.zones.zone + - api_field: physicalStructure.metros.metro diff --git a/google/services/compute/resource_compute_interconnect_macsec_test.go b/google/services/compute/resource_compute_interconnect_macsec_test.go index ee8b0d9bed8..a06f64647aa 100644 --- a/google/services/compute/resource_compute_interconnect_macsec_test.go +++ b/google/services/compute/resource_compute_interconnect_macsec_test.go @@ -153,7 +153,7 @@ resource "google_compute_interconnect" "example-interconnect" { customer_name = "internal_customer" # Special customer only available for Google testing. interconnect_type = "DEDICATED" link_type = "LINK_TYPE_ETHERNET_100G_LR" - location = "https://www.googleapis.com/compute/v1/projects/${data.google_project.project.name}/global/interconnectLocations/z2z-us-east4-zone1-lciadl-z" # Special location only available for Google testing. + location = "https://www.googleapis.com/compute/v1/projects/${data.google_project.project.name}/global/interconnectLocations/z2z-us-west2-zone2-nclaxw-a" # Special location only available for Google testing. requested_link_count = 1 admin_enabled = true description = "example description" diff --git a/google/services/compute/resource_compute_managed_ssl_certificate_generated_meta.yaml b/google/services/compute/resource_compute_managed_ssl_certificate_generated_meta.yaml index b8bf6c6d9d4..0d4a4bd8bdd 100644 --- a/google/services/compute/resource_compute_managed_ssl_certificate_generated_meta.yaml +++ b/google/services/compute/resource_compute_managed_ssl_certificate_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_compute_managed_ssl_certificate' -generation_type: 'mmv1' -source_file: 'products/compute/ManagedSslCertificate.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SslCertificate' +resource: google_compute_managed_ssl_certificate +generation_type: mmv1 +source_file: products/compute/ManagedSslCertificate.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SslCertificate fields: - - api_field: 'id' - field: 'certificate_id' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'expireTime' - - api_field: 'managed.domains' - - api_field: 'name' - - api_field: 'subjectAlternativeNames' - - api_field: 'type' - - api_field: 'selfLink' + - api_field: id + field: certificate_id + - api_field: creationTimestamp + - api_field: description + - api_field: expireTime + - api_field: managed.domains + - api_field: name + - api_field: subjectAlternativeNames + - api_field: type + - api_field: selfLink diff --git a/google/services/compute/resource_compute_network_attachment_generated_meta.yaml b/google/services/compute/resource_compute_network_attachment_generated_meta.yaml index 2452d2c514f..589a9dd80f5 100644 --- a/google/services/compute/resource_compute_network_attachment_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_attachment_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_compute_network_attachment' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkAttachment.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkAttachment' +resource: google_compute_network_attachment +generation_type: mmv1 +source_file: products/compute/NetworkAttachment.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkAttachment fields: - - api_field: 'connectionEndpoints.ipAddress' - - api_field: 'connectionEndpoints.projectIdOrNum' - - api_field: 'connectionEndpoints.secondaryIpCidrRanges' - - api_field: 'connectionEndpoints.status' - - api_field: 'connectionEndpoints.subnetwork' - - api_field: 'connectionPreference' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'id' - - api_field: 'kind' - - api_field: 'name' - - api_field: 'network' - - api_field: 'producerAcceptLists' - - api_field: 'producerRejectLists' - - api_field: 'region' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' - - api_field: 'subnetworks' + - api_field: connectionEndpoints.ipAddress + - api_field: connectionEndpoints.projectIdOrNum + - api_field: connectionEndpoints.secondaryIpCidrRanges + - api_field: connectionEndpoints.status + - api_field: connectionEndpoints.subnetwork + - api_field: connectionPreference + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: id + - api_field: kind + - api_field: name + - api_field: network + - api_field: producerAcceptLists + - api_field: producerRejectLists + - api_field: region + - api_field: selfLink + - api_field: selfLinkWithId + - api_field: subnetworks diff --git a/google/services/compute/resource_compute_network_endpoint_generated_meta.yaml b/google/services/compute/resource_compute_network_endpoint_generated_meta.yaml index 5da6d0cfcae..0583d4bb213 100644 --- a/google/services/compute/resource_compute_network_endpoint_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_endpoint_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_compute_network_endpoint' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkEndpoint.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkEndpointGroup' +resource: google_compute_network_endpoint +generation_type: mmv1 +source_file: products/compute/NetworkEndpoint.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkEndpointGroup fields: - - api_field: 'instance' - - api_field: 'ipAddress' - - field: 'network_endpoint_group' - provider_only: true - - api_field: 'port' - - field: 'zone' - provider_only: true + - api_field: instance + - api_field: ipAddress + - field: network_endpoint_group + provider_only: true + - api_field: port + - field: zone + provider_only: true diff --git a/google/services/compute/resource_compute_network_endpoint_group_generated_meta.yaml b/google/services/compute/resource_compute_network_endpoint_group_generated_meta.yaml index 6a1ffb3c433..07f1204d185 100644 --- a/google/services/compute/resource_compute_network_endpoint_group_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_endpoint_group_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_compute_network_endpoint_group' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkEndpointGroup.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkEndpointGroup' +resource: google_compute_network_endpoint_group +generation_type: mmv1 +source_file: products/compute/NetworkEndpointGroup.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkEndpointGroup fields: - - api_field: 'defaultPort' - - api_field: 'description' - - api_field: 'id' - field: 'generated_id' - - api_field: 'name' - - api_field: 'network' - - api_field: 'networkEndpointType' - - api_field: 'size' - - api_field: 'subnetwork' - - api_field: 'zone' - - api_field: 'selfLink' + - api_field: defaultPort + - api_field: description + - api_field: id + field: generated_id + - api_field: name + - api_field: network + - api_field: networkEndpointType + - api_field: size + - api_field: subnetwork + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_network_endpoints.go b/google/services/compute/resource_compute_network_endpoints.go index 0421931e525..0c7316058ab 100644 --- a/google/services/compute/resource_compute_network_endpoints.go +++ b/google/services/compute/resource_compute_network_endpoints.go @@ -76,7 +76,9 @@ func NetworkEndpointsNetworkEndpointConvertToAny(endpoint NetworkEndpointsNetwor m := make(map[string]interface{}) m["ip_address"] = endpoint.IPAddress m["port"] = endpoint.Port - m["instance"] = endpoint.Instance + if endpoint.Instance != "" { + m["instance"] = endpoint.Instance + } return m } @@ -281,6 +283,7 @@ range).`, }, "instance": { Type: schema.TypeString, + Computed: true, Optional: true, DiffSuppressFunc: tpgresource.CompareSelfLinkOrResourceName, Description: `The name for a specific VM instance that the IP address belongs to. @@ -627,6 +630,10 @@ func resourceComputeNetworkEndpointsUpdate(d *schema.ResourceData, meta interfac return err } + if len(lastPage) == 0 { + return resourceComputeNetworkEndpointsRead(d, meta) + } + obj = map[string]interface{}{ "networkEndpoints": lastPage, } @@ -869,6 +876,10 @@ func expandComputeNetworkEndpointsNetworkEndpoints(v interface{}, d tpgresource. } func expandComputeNetworkEndpointsNetworkEndpointsInstance(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if tpgresource.IsEmptyValue(reflect.ValueOf(v.(string))) { + return nil, nil + } + return tpgresource.GetResourceNameFromSelfLink(v.(string)), nil } diff --git a/google/services/compute/resource_compute_network_endpoints_generated_meta.yaml b/google/services/compute/resource_compute_network_endpoints_generated_meta.yaml index ff9545cff41..2eec26b4db4 100644 --- a/google/services/compute/resource_compute_network_endpoints_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_endpoints_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_compute_network_endpoints' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkEndpoints.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkEndpointGroup' +resource: google_compute_network_endpoints +generation_type: mmv1 +source_file: products/compute/NetworkEndpoints.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkEndpointGroup fields: - - field: 'network_endpoint_group' - provider_only: true - - api_field: 'networkEndpoints.instance' - - api_field: 'networkEndpoints.ipAddress' - - api_field: 'networkEndpoints.port' - - field: 'zone' - provider_only: true + - field: network_endpoint_group + provider_only: true + - api_field: networkEndpoints.instance + - api_field: networkEndpoints.ipAddress + - api_field: networkEndpoints.port + - field: zone + provider_only: true diff --git a/google/services/compute/resource_compute_network_endpoints_recreate_test.go b/google/services/compute/resource_compute_network_endpoints_recreate_test.go new file mode 100644 index 00000000000..b6b3469f7f1 --- /dev/null +++ b/google/services/compute/resource_compute_network_endpoints_recreate_test.go @@ -0,0 +1,198 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/resource_compute_network_endpoints_recreate_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package compute_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func TestAccComputeNetworkEndpoints_recreateNetworkEndpointsBasic(t *testing.T) { + // Multiple fine-grained resources + acctest.SkipIfVcr(t) + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + negId := fmt.Sprintf("projects/%s/zones/%s/networkEndpointGroups/tf-test-neg-%s", + envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), context["random_suffix"]) + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + // Create one endpoint + Config: testAccComputeNetworkEndpoints_networkEndpointGroupOnly(context), + }, + { + ResourceName: "google_compute_network_endpoint_group.external_group", + ImportState: true, + ImportStateVerify: true, + }, + { + // Create single endpoint + Config: testAccComputeNetworkEndpoints_networkEndpointsSingle(context), + }, + { + ResourceName: "google_compute_network_endpoints.external_endpoints", + ImportState: true, + ImportStateVerify: true, + }, + { + // Add two new endpoints + Config: testAccComputeNetworkEndpoints_networkEndpointsMultiple(context), + }, + { + ResourceName: "google_compute_network_endpoints.external_endpoints", + ImportState: true, + ImportStateVerify: true, + }, + { + // Remove two endpoints + Config: testAccComputeNetworkEndpoints_networkEndpointsSingle(context), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeNetworkEndpointsWithPortsDestroyedCustom(t, negId, "8442"), + testAccCheckComputeNetworkEndpointsWithPortsDestroyedCustom(t, negId, "8443"), + ), + }, + { + ResourceName: "google_compute_network_endpoints.external_endpoints", + ImportState: true, + ImportStateVerify: true, + }, + { + // Delete all endpoints + Config: testAccComputeNetworkEndpoints_networkEndpointGroupOnly(context), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeNetworkEndpointsWithPortsDestroyedCustom(t, negId, "8441"), + ), + }, + }, + }) +} + +func testAccComputeNetworkEndpoints_networkEndpointsSingle(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network_endpoints" "external_endpoints" { + network_endpoint_group = google_compute_network_endpoint_group.external_group.id + zone = google_compute_network_endpoint_group.external_group.zone + + network_endpoints { + ip_address = "8.8.8.8" + port = 8441 + } +} +`, context) + testAccComputeNetworkEndpoints_networkEndpointGroupOnly(context) +} + +func testAccComputeNetworkEndpoints_networkEndpointsMultiple(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network_endpoints" "external_endpoints" { + network_endpoint_group = google_compute_network_endpoint_group.external_group.id + zone = google_compute_network_endpoint_group.external_group.zone + + network_endpoints { + ip_address = "8.8.8.8" + port = 8441 + } + + network_endpoints { + ip_address = "1.2.3.4" + port = 8442 + } + + network_endpoints { + ip_address = "5.6.7.8" + port = 8443 + } +} +`, context) + testAccComputeNetworkEndpoints_networkEndpointGroupOnly(context) +} + +func testAccComputeNetworkEndpoints_networkEndpointGroupOnly(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "default" { + name = "tf-test-neg-network-%{random_suffix}" +} + +resource "google_compute_network_endpoint_group" "external_group" { + name = "tf-test-neg-%{random_suffix}" + network = google_compute_network.default.self_link + zone = "us-central1-a" + network_endpoint_type = "NON_GCP_PRIVATE_IP_PORT" +} +`, context) +} + +// testAccCheckComputeNetworkEndpointsDestroyed makes sure the endpoint with +// given Terraform resource name and previous information (obtained from Exists) +// was destroyed properly. +func testAccCheckComputeNetworkEndpointsWithPortsDestroyedCustom(t *testing.T, negId string, ports ...string) resource.TestCheckFunc { + return func(s *terraform.State) error { + foundPorts, err := testAccComputeNetworkEndpointsListEndpointPortsCustom(t, negId) + if err != nil { + return fmt.Errorf("unable to confirm endpoints with ports %+v was destroyed: %v", ports, err) + } + for _, p := range ports { + if _, ok := foundPorts[p]; ok { + return fmt.Errorf("network endpoint with port %s still exists", p) + } + } + + return nil + } +} + +func testAccComputeNetworkEndpointsListEndpointPortsCustom(t *testing.T, negId string) (map[string]struct{}, error) { + config := acctest.GoogleProviderConfig(t) + + url := fmt.Sprintf("https://www.googleapis.com/compute/v1/%s/listNetworkEndpoints", negId) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + RawURL: url, + UserAgent: config.UserAgent, + }) + if err != nil { + return nil, err + } + + v, ok := res["items"] + if !ok || v == nil { + return nil, nil + } + items := v.([]interface{}) + ports := make(map[string]struct{}) + for _, item := range items { + endptWithHealth := item.(map[string]interface{}) + v, ok := endptWithHealth["networkEndpoint"] + if !ok || v == nil { + continue + } + endpt := v.(map[string]interface{}) + ports[fmt.Sprintf("%v", endpt["port"])] = struct{}{} + } + return ports, nil +} diff --git a/google/services/compute/resource_compute_network_firewall_policy_association_generated_meta.yaml b/google/services/compute/resource_compute_network_firewall_policy_association_generated_meta.yaml index 2ba3f06f66d..92861bcb8dd 100644 --- a/google/services/compute/resource_compute_network_firewall_policy_association_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_firewall_policy_association_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_network_firewall_policy_association' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkFirewallPolicyAssociation.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_network_firewall_policy_association +generation_type: mmv1 +source_file: products/compute/NetworkFirewallPolicyAssociation.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'associations.attachmentTarget' - field: 'attachment_target' - - field: 'firewall_policy' - provider_only: true - - api_field: 'associations.name' - field: 'name' - - api_field: 'associations.shortName' - field: 'short_name' + - api_field: associations.attachmentTarget + field: attachment_target + - field: firewall_policy + provider_only: true + - api_field: associations.name + field: name + - api_field: associations.shortName + field: short_name diff --git a/google/services/compute/resource_compute_network_firewall_policy_generated_meta.yaml b/google/services/compute/resource_compute_network_firewall_policy_generated_meta.yaml index c8f9ec4d6c3..3ddc272a941 100644 --- a/google/services/compute/resource_compute_network_firewall_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_firewall_policy_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_compute_network_firewall_policy' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkFirewallPolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_network_firewall_policy +generation_type: mmv1 +source_file: products/compute/NetworkFirewallPolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'name' - - api_field: 'id' - field: 'network_firewall_policy_id' - - api_field: 'policyType' - - api_field: 'ruleTupleCount' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: name + - api_field: id + field: network_firewall_policy_id + - api_field: policyType + - api_field: ruleTupleCount + - api_field: selfLink + - api_field: selfLinkWithId diff --git a/google/services/compute/resource_compute_network_firewall_policy_rule_generated_meta.yaml b/google/services/compute/resource_compute_network_firewall_policy_rule_generated_meta.yaml index 28a93a1b686..4c8115596ba 100644 --- a/google/services/compute/resource_compute_network_firewall_policy_rule_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_firewall_policy_rule_generated_meta.yaml @@ -1,67 +1,67 @@ -resource: 'google_compute_network_firewall_policy_rule' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkFirewallPolicyRule.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_network_firewall_policy_rule +generation_type: mmv1 +source_file: products/compute/NetworkFirewallPolicyRule.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'rules.action' - field: 'action' - - api_field: 'rules.creationTimestamp' - field: 'creation_timestamp' - - api_field: 'rules.description' - field: 'description' - - api_field: 'rules.direction' - field: 'direction' - - api_field: 'rules.disabled' - field: 'disabled' - - api_field: 'rules.enableLogging' - field: 'enable_logging' - - field: 'firewall_policy' - provider_only: true - - api_field: 'rules.kind' - field: 'kind' - - api_field: 'rules.match.destAddressGroups' - field: 'match.dest_address_groups' - - api_field: 'rules.match.destFqdns' - field: 'match.dest_fqdns' - - api_field: 'rules.match.destIpRanges' - field: 'match.dest_ip_ranges' - - api_field: 'rules.match.destRegionCodes' - field: 'match.dest_region_codes' - - api_field: 'rules.match.destThreatIntelligences' - field: 'match.dest_threat_intelligences' - - api_field: 'rules.match.layer4Configs.ipProtocol' - field: 'match.layer4_configs.ip_protocol' - - api_field: 'rules.match.layer4Configs.ports' - field: 'match.layer4_configs.ports' - - api_field: 'rules.match.srcAddressGroups' - field: 'match.src_address_groups' - - api_field: 'rules.match.srcFqdns' - field: 'match.src_fqdns' - - api_field: 'rules.match.srcIpRanges' - field: 'match.src_ip_ranges' - - api_field: 'rules.match.srcRegionCodes' - field: 'match.src_region_codes' - - api_field: 'rules.match.srcSecureTags.name' - field: 'match.src_secure_tags.name' - - api_field: 'rules.match.srcSecureTags.state' - field: 'match.src_secure_tags.state' - - api_field: 'rules.match.srcThreatIntelligences' - field: 'match.src_threat_intelligences' - - api_field: 'rules.priority' - field: 'priority' - - api_field: 'rules.ruleName' - field: 'rule_name' - - api_field: 'rules.ruleTupleCount' - field: 'rule_tuple_count' - - api_field: 'rules.securityProfileGroup' - field: 'security_profile_group' - - api_field: 'rules.targetSecureTags.name' - field: 'target_secure_tags.name' - - api_field: 'rules.targetSecureTags.state' - field: 'target_secure_tags.state' - - api_field: 'rules.targetServiceAccounts' - field: 'target_service_accounts' - - api_field: 'rules.tlsInspect' - field: 'tls_inspect' + - api_field: rules.action + field: action + - api_field: rules.creationTimestamp + field: creation_timestamp + - api_field: rules.description + field: description + - api_field: rules.direction + field: direction + - api_field: rules.disabled + field: disabled + - api_field: rules.enableLogging + field: enable_logging + - field: firewall_policy + provider_only: true + - api_field: rules.kind + field: kind + - api_field: rules.match.destAddressGroups + field: match.dest_address_groups + - api_field: rules.match.destFqdns + field: match.dest_fqdns + - api_field: rules.match.destIpRanges + field: match.dest_ip_ranges + - api_field: rules.match.destRegionCodes + field: match.dest_region_codes + - api_field: rules.match.destThreatIntelligences + field: match.dest_threat_intelligences + - api_field: rules.match.layer4Configs.ipProtocol + field: match.layer4_configs.ip_protocol + - api_field: rules.match.layer4Configs.ports + field: match.layer4_configs.ports + - api_field: rules.match.srcAddressGroups + field: match.src_address_groups + - api_field: rules.match.srcFqdns + field: match.src_fqdns + - api_field: rules.match.srcIpRanges + field: match.src_ip_ranges + - api_field: rules.match.srcRegionCodes + field: match.src_region_codes + - api_field: rules.match.srcSecureTags.name + field: match.src_secure_tags.name + - api_field: rules.match.srcSecureTags.state + field: match.src_secure_tags.state + - api_field: rules.match.srcThreatIntelligences + field: match.src_threat_intelligences + - api_field: rules.priority + field: priority + - api_field: rules.ruleName + field: rule_name + - api_field: rules.ruleTupleCount + field: rule_tuple_count + - api_field: rules.securityProfileGroup + field: security_profile_group + - api_field: rules.targetSecureTags.name + field: target_secure_tags.name + - api_field: rules.targetSecureTags.state + field: target_secure_tags.state + - api_field: rules.targetServiceAccounts + field: target_service_accounts + - api_field: rules.tlsInspect + field: tls_inspect diff --git a/google/services/compute/resource_compute_network_firewall_policy_with_rules_generated_meta.yaml b/google/services/compute/resource_compute_network_firewall_policy_with_rules_generated_meta.yaml index 14960bc1cc8..701d5e4c0b0 100644 --- a/google/services/compute/resource_compute_network_firewall_policy_with_rules_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_firewall_policy_with_rules_generated_meta.yaml @@ -1,101 +1,101 @@ -resource: 'google_compute_network_firewall_policy_with_rules' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkFirewallPolicyWithRules.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_network_firewall_policy_with_rules +generation_type: mmv1 +source_file: products/compute/NetworkFirewallPolicyWithRules.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'name' - - api_field: 'id' - field: 'network_firewall_policy_id' - - api_field: 'policyType' - - api_field: 'predefinedRules.action' - - api_field: 'predefinedRules.description' - - api_field: 'predefinedRules.direction' - - api_field: 'predefinedRules.disabled' - - api_field: 'predefinedRules.enableLogging' - - api_field: 'predefinedRules.match.destAddressGroups' - - api_field: 'predefinedRules.match.destFqdns' - - api_field: 'predefinedRules.match.destIpRanges' - - api_field: 'predefinedRules.match.destRegionCodes' - - api_field: 'predefinedRules.match.destThreatIntelligences' - - api_field: 'predefinedRules.match.layer4Configs.ipProtocol' - field: 'predefined_rules.match.layer4_config.ip_protocol' - - api_field: 'predefinedRules.match.layer4Configs.ports' - field: 'predefined_rules.match.layer4_config.ports' - - api_field: 'predefinedRules.match.srcAddressGroups' - - api_field: 'predefinedRules.match.srcFqdns' - - api_field: 'predefinedRules.match.srcIpRanges' - - api_field: 'predefinedRules.match.srcRegionCodes' - - api_field: 'predefinedRules.match.srcSecureTags.name' - field: 'predefined_rules.match.src_secure_tag.name' - - api_field: 'predefinedRules.match.srcSecureTags.state' - field: 'predefined_rules.match.src_secure_tag.state' - - api_field: 'predefinedRules.match.srcThreatIntelligences' - - api_field: 'predefinedRules.priority' - - api_field: 'predefinedRules.ruleName' - - api_field: 'predefinedRules.securityProfileGroup' - - api_field: 'predefinedRules.targetSecureTags.name' - field: 'predefined_rules.target_secure_tag.name' - - api_field: 'predefinedRules.targetSecureTags.state' - field: 'predefined_rules.target_secure_tag.state' - - api_field: 'predefinedRules.targetServiceAccounts' - - api_field: 'predefinedRules.tlsInspect' - - api_field: 'rules.action' - field: 'rule.action' - - api_field: 'rules.description' - field: 'rule.description' - - api_field: 'rules.direction' - field: 'rule.direction' - - api_field: 'rules.disabled' - field: 'rule.disabled' - - api_field: 'rules.enableLogging' - field: 'rule.enable_logging' - - api_field: 'rules.match.destAddressGroups' - field: 'rule.match.dest_address_groups' - - api_field: 'rules.match.destFqdns' - field: 'rule.match.dest_fqdns' - - api_field: 'rules.match.destIpRanges' - field: 'rule.match.dest_ip_ranges' - - api_field: 'rules.match.destRegionCodes' - field: 'rule.match.dest_region_codes' - - api_field: 'rules.match.destThreatIntelligences' - field: 'rule.match.dest_threat_intelligences' - - api_field: 'rules.match.layer4Configs.ipProtocol' - field: 'rule.match.layer4_config.ip_protocol' - - api_field: 'rules.match.layer4Configs.ports' - field: 'rule.match.layer4_config.ports' - - api_field: 'rules.match.srcAddressGroups' - field: 'rule.match.src_address_groups' - - api_field: 'rules.match.srcFqdns' - field: 'rule.match.src_fqdns' - - api_field: 'rules.match.srcIpRanges' - field: 'rule.match.src_ip_ranges' - - api_field: 'rules.match.srcRegionCodes' - field: 'rule.match.src_region_codes' - - api_field: 'rules.match.srcSecureTags.name' - field: 'rule.match.src_secure_tag.name' - - api_field: 'rules.match.srcSecureTags.state' - field: 'rule.match.src_secure_tag.state' - - api_field: 'rules.match.srcThreatIntelligences' - field: 'rule.match.src_threat_intelligences' - - api_field: 'rules.priority' - field: 'rule.priority' - - api_field: 'rules.ruleName' - field: 'rule.rule_name' - - api_field: 'rules.securityProfileGroup' - field: 'rule.security_profile_group' - - api_field: 'rules.targetSecureTags.name' - field: 'rule.target_secure_tag.name' - - api_field: 'rules.targetSecureTags.state' - field: 'rule.target_secure_tag.state' - - api_field: 'rules.targetServiceAccounts' - field: 'rule.target_service_accounts' - - api_field: 'rules.tlsInspect' - field: 'rule.tls_inspect' - - api_field: 'ruleTupleCount' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: name + - api_field: id + field: network_firewall_policy_id + - api_field: policyType + - api_field: predefinedRules.action + - api_field: predefinedRules.description + - api_field: predefinedRules.direction + - api_field: predefinedRules.disabled + - api_field: predefinedRules.enableLogging + - api_field: predefinedRules.match.destAddressGroups + - api_field: predefinedRules.match.destFqdns + - api_field: predefinedRules.match.destIpRanges + - api_field: predefinedRules.match.destRegionCodes + - api_field: predefinedRules.match.destThreatIntelligences + - api_field: predefinedRules.match.layer4Configs.ipProtocol + field: predefined_rules.match.layer4_config.ip_protocol + - api_field: predefinedRules.match.layer4Configs.ports + field: predefined_rules.match.layer4_config.ports + - api_field: predefinedRules.match.srcAddressGroups + - api_field: predefinedRules.match.srcFqdns + - api_field: predefinedRules.match.srcIpRanges + - api_field: predefinedRules.match.srcRegionCodes + - api_field: predefinedRules.match.srcSecureTags.name + field: predefined_rules.match.src_secure_tag.name + - api_field: predefinedRules.match.srcSecureTags.state + field: predefined_rules.match.src_secure_tag.state + - api_field: predefinedRules.match.srcThreatIntelligences + - api_field: predefinedRules.priority + - api_field: predefinedRules.ruleName + - api_field: predefinedRules.securityProfileGroup + - api_field: predefinedRules.targetSecureTags.name + field: predefined_rules.target_secure_tag.name + - api_field: predefinedRules.targetSecureTags.state + field: predefined_rules.target_secure_tag.state + - api_field: predefinedRules.targetServiceAccounts + - api_field: predefinedRules.tlsInspect + - api_field: rules.action + field: rule.action + - api_field: rules.description + field: rule.description + - api_field: rules.direction + field: rule.direction + - api_field: rules.disabled + field: rule.disabled + - api_field: rules.enableLogging + field: rule.enable_logging + - api_field: rules.match.destAddressGroups + field: rule.match.dest_address_groups + - api_field: rules.match.destFqdns + field: rule.match.dest_fqdns + - api_field: rules.match.destIpRanges + field: rule.match.dest_ip_ranges + - api_field: rules.match.destRegionCodes + field: rule.match.dest_region_codes + - api_field: rules.match.destThreatIntelligences + field: rule.match.dest_threat_intelligences + - api_field: rules.match.layer4Configs.ipProtocol + field: rule.match.layer4_config.ip_protocol + - api_field: rules.match.layer4Configs.ports + field: rule.match.layer4_config.ports + - api_field: rules.match.srcAddressGroups + field: rule.match.src_address_groups + - api_field: rules.match.srcFqdns + field: rule.match.src_fqdns + - api_field: rules.match.srcIpRanges + field: rule.match.src_ip_ranges + - api_field: rules.match.srcRegionCodes + field: rule.match.src_region_codes + - api_field: rules.match.srcSecureTags.name + field: rule.match.src_secure_tag.name + - api_field: rules.match.srcSecureTags.state + field: rule.match.src_secure_tag.state + - api_field: rules.match.srcThreatIntelligences + field: rule.match.src_threat_intelligences + - api_field: rules.priority + field: rule.priority + - api_field: rules.ruleName + field: rule.rule_name + - api_field: rules.securityProfileGroup + field: rule.security_profile_group + - api_field: rules.targetSecureTags.name + field: rule.target_secure_tag.name + - api_field: rules.targetSecureTags.state + field: rule.target_secure_tag.state + - api_field: rules.targetServiceAccounts + field: rule.target_service_accounts + - api_field: rules.tlsInspect + field: rule.tls_inspect + - api_field: ruleTupleCount + - api_field: selfLink + - api_field: selfLinkWithId diff --git a/google/services/compute/resource_compute_network_generated_meta.yaml b/google/services/compute/resource_compute_network_generated_meta.yaml index e854e5fd993..c749c4d3ddc 100644 --- a/google/services/compute/resource_compute_network_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_generated_meta.yaml @@ -1,34 +1,34 @@ -resource: 'google_compute_network' -generation_type: 'mmv1' -source_file: 'products/compute/Network.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Network' +resource: google_compute_network +generation_type: mmv1 +source_file: products/compute/Network.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Network fields: - - api_field: 'autoCreateSubnetworks' - - api_field: 'routingConfig.bgpAlwaysCompareMed' - field: 'bgp_always_compare_med' - - api_field: 'routingConfig.bgpBestPathSelectionMode' - field: 'bgp_best_path_selection_mode' - - api_field: 'routingConfig.bgpInterRegionCost' - field: 'bgp_inter_region_cost' - - api_field: 'routingConfig.delete_bgp_always_compare_med' - field: 'delete_bgp_always_compare_med' - - field: 'delete_default_routes_on_create' - provider_only: true - - api_field: 'description' - - api_field: 'enableUlaInternalIpv6' - - api_field: 'gatewayIPv4' - field: 'gateway_ipv4' - - api_field: 'internalIpv6Range' - - api_field: 'mtu' - - api_field: 'name' - - api_field: 'networkFirewallPolicyEnforcementOrder' - - api_field: 'id' - field: 'network_id' - - api_field: 'networkProfile' - - api_field: 'numericId' - - api_field: 'params.resourceManagerTags' - - api_field: 'routingConfig.routingMode' - field: 'routing_mode' - - api_field: 'selfLink' + - api_field: autoCreateSubnetworks + - api_field: routingConfig.bgpAlwaysCompareMed + field: bgp_always_compare_med + - api_field: routingConfig.bgpBestPathSelectionMode + field: bgp_best_path_selection_mode + - api_field: routingConfig.bgpInterRegionCost + field: bgp_inter_region_cost + - api_field: routingConfig.delete_bgp_always_compare_med + field: delete_bgp_always_compare_med + - field: delete_default_routes_on_create + provider_only: true + - api_field: description + - api_field: enableUlaInternalIpv6 + - api_field: gatewayIPv4 + field: gateway_ipv4 + - api_field: internalIpv6Range + - api_field: mtu + - api_field: name + - api_field: networkFirewallPolicyEnforcementOrder + - api_field: id + field: network_id + - api_field: networkProfile + - api_field: numericId + - api_field: params.resourceManagerTags + - api_field: routingConfig.routingMode + field: routing_mode + - api_field: selfLink diff --git a/google/services/compute/resource_compute_network_peering_routes_config_generated_meta.yaml b/google/services/compute/resource_compute_network_peering_routes_config_generated_meta.yaml index e33b7d46a49..f44ef5bf0e7 100644 --- a/google/services/compute/resource_compute_network_peering_routes_config_generated_meta.yaml +++ b/google/services/compute/resource_compute_network_peering_routes_config_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_network_peering_routes_config' -generation_type: 'mmv1' -source_file: 'products/compute/NetworkPeeringRoutesConfig.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Network' +resource: google_compute_network_peering_routes_config +generation_type: mmv1 +source_file: products/compute/NetworkPeeringRoutesConfig.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Network fields: - - api_field: 'exportCustomRoutes' - - api_field: 'exportSubnetRoutesWithPublicIp' - - api_field: 'importCustomRoutes' - - api_field: 'importSubnetRoutesWithPublicIp' - - field: 'network' - provider_only: true - - api_field: 'name' - field: 'peering' + - api_field: exportCustomRoutes + - api_field: exportSubnetRoutesWithPublicIp + - api_field: importCustomRoutes + - api_field: importSubnetRoutesWithPublicIp + - field: network + provider_only: true + - api_field: name + field: peering diff --git a/google/services/compute/resource_compute_node_group_generated_meta.yaml b/google/services/compute/resource_compute_node_group_generated_meta.yaml index a7f255529c0..39024e041d0 100644 --- a/google/services/compute/resource_compute_node_group_generated_meta.yaml +++ b/google/services/compute/resource_compute_node_group_generated_meta.yaml @@ -1,23 +1,26 @@ -resource: 'google_compute_node_group' -generation_type: 'mmv1' -source_file: 'products/compute/NodeGroup.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NodeGroup' +resource: google_compute_node_group +generation_type: mmv1 +source_file: products/compute/NodeGroup.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NodeGroup fields: - - api_field: 'autoscalingPolicy.maxNodes' - - api_field: 'autoscalingPolicy.minNodes' - - api_field: 'autoscalingPolicy.mode' - - api_field: 'creationTimestamp' - - api_field: 'description' - - field: 'initial_size' - provider_only: true - - api_field: 'maintenancePolicy' - - api_field: 'maintenanceWindow.startTime' - - api_field: 'name' - - api_field: 'nodeTemplate' - - api_field: 'shareSettings.projectMap.projectConfig.projectId' - - api_field: 'shareSettings.shareType' - - api_field: 'size' - - api_field: 'zone' - - api_field: 'selfLink' + - api_field: autoscalingPolicy.maxNodes + - api_field: autoscalingPolicy.minNodes + - api_field: autoscalingPolicy.mode + - api_field: creationTimestamp + - api_field: description + - field: initial_size + provider_only: true + - api_field: maintenancePolicy + - api_field: maintenanceWindow.startTime + - api_field: name + - api_field: nodeTemplate + - api_field: shareSettings.projectMap.key + field: share_settings.project_map.id + - api_field: shareSettings.projectMap.value.projectId + field: share_settings.project_map.project_id + - api_field: shareSettings.shareType + - api_field: size + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_node_template_generated_meta.yaml b/google/services/compute/resource_compute_node_template_generated_meta.yaml index 9573e01aa87..67dd30104b0 100644 --- a/google/services/compute/resource_compute_node_template_generated_meta.yaml +++ b/google/services/compute/resource_compute_node_template_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_compute_node_template' -generation_type: 'mmv1' -source_file: 'products/compute/NodeTemplate.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NodeTemplate' +resource: google_compute_node_template +generation_type: mmv1 +source_file: products/compute/NodeTemplate.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NodeTemplate fields: - - api_field: 'accelerators.acceleratorCount' - - api_field: 'accelerators.acceleratorType' - - api_field: 'cpuOvercommitType' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'disks.diskCount' - - api_field: 'disks.diskSizeGb' - - api_field: 'disks.diskType' - - api_field: 'name' - - api_field: 'nodeAffinityLabels' - - api_field: 'nodeType' - - api_field: 'nodeTypeFlexibility.cpus' - - api_field: 'nodeTypeFlexibility.localSsd' - - api_field: 'nodeTypeFlexibility.memory' - - api_field: 'region' - - api_field: 'serverBinding.type' - - api_field: 'selfLink' + - api_field: accelerators.acceleratorCount + - api_field: accelerators.acceleratorType + - api_field: cpuOvercommitType + - api_field: creationTimestamp + - api_field: description + - api_field: disks.diskCount + - api_field: disks.diskSizeGb + - api_field: disks.diskType + - api_field: name + - api_field: nodeAffinityLabels + - api_field: nodeType + - api_field: nodeTypeFlexibility.cpus + - api_field: nodeTypeFlexibility.localSsd + - api_field: nodeTypeFlexibility.memory + - api_field: region + - api_field: serverBinding.type + - api_field: selfLink diff --git a/google/services/compute/resource_compute_organization_security_policy_association.go b/google/services/compute/resource_compute_organization_security_policy_association.go new file mode 100644 index 00000000000..14c193732c0 --- /dev/null +++ b/google/services/compute/resource_compute_organization_security_policy_association.go @@ -0,0 +1,426 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/compute/OrganizationSecurityPolicyAssociation.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package compute + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceComputeOrganizationSecurityPolicyAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceComputeOrganizationSecurityPolicyAssociationCreate, + Read: resourceComputeOrganizationSecurityPolicyAssociationRead, + Delete: resourceComputeOrganizationSecurityPolicyAssociationDelete, + + Importer: &schema.ResourceImporter{ + State: resourceComputeOrganizationSecurityPolicyAssociationImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "policy_id": { + Type: schema.TypeString, + RequiredForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "attachment_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource that the security policy is attached to.`, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name for an association.`, + }, + "policy_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The security policy ID of the association.`, + }, + "display_name": { + Type: schema.TypeString, + Computed: true, + Description: `The display name of the security policy of the association.`, + }, + }, + UseJSONNumber: true, + } +} + +func resourceComputeOrganizationSecurityPolicyAssociationCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + nameProp, err := expandComputeOrganizationSecurityPolicyAssociationName(d.Get("name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("name"); !tpgresource.IsEmptyValue(reflect.ValueOf(nameProp)) && (ok || !reflect.DeepEqual(v, nameProp)) { + obj["name"] = nameProp + } + attachmentIdProp, err := expandComputeOrganizationSecurityPolicyAssociationAttachmentId(d.Get("attachment_id"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("attachment_id"); !tpgresource.IsEmptyValue(reflect.ValueOf(attachmentIdProp)) && (ok || !reflect.DeepEqual(v, attachmentIdProp)) { + obj["attachmentId"] = attachmentIdProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}{{policy_id}}/addAssociation") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new OrganizationSecurityPolicyAssociation: %#v", obj) + billingProject := "" + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating OrganizationSecurityPolicyAssociation: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "{{policy_id}}/association/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if policyIdValue, ok := d.GetOk("policy_id"); ok && policyIdValue.(string) != "" { + if err = identity.Set("policy_id", policyIdValue.(string)); err != nil { + return fmt.Errorf("Error setting policy_id: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + // `parent` is needed to poll the asynchronous operations but its available only on the policy. + + policyUrl := fmt.Sprintf("{{ComputeBasePath}}%s", d.Get("policy_id")) + url, err = tpgresource.ReplaceVars(d, config, policyUrl) + if err != nil { + return err + } + + policyRes, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + RawURL: url, + UserAgent: userAgent, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("ComputeOrganizationSecurityPolicy %q", d.Get("policy_id"))) + } + + parent := flattenComputeOrganizationSecurityPolicyParent(policyRes["parent"], d, config) + var opRes map[string]interface{} + err = ComputeOrgOperationWaitTimeWithResponse( + config, res, &opRes, parent.(string), "Creating OrganizationSecurityPolicyAssociation", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create OrganizationSecurityPolicyAssociation: %s", err) + } + + log.Printf("[DEBUG] Finished creating OrganizationSecurityPolicyAssociation %q: %#v", d.Id(), res) + + return resourceComputeOrganizationSecurityPolicyAssociationRead(d, meta) +} + +func resourceComputeOrganizationSecurityPolicyAssociationRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}{{policy_id}}/getAssociation?name={{name}}") + if err != nil { + return err + } + + billingProject := "" + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(transformSecurityPolicyAssociationReadError(err), d, fmt.Sprintf("ComputeOrganizationSecurityPolicyAssociation %q", d.Id())) + } + + if err := d.Set("name", flattenComputeOrganizationSecurityPolicyAssociationName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading OrganizationSecurityPolicyAssociation: %s", err) + } + if err := d.Set("attachment_id", flattenComputeOrganizationSecurityPolicyAssociationAttachmentId(res["attachmentId"], d, config)); err != nil { + return fmt.Errorf("Error reading OrganizationSecurityPolicyAssociation: %s", err) + } + if err := d.Set("display_name", flattenComputeOrganizationSecurityPolicyAssociationDisplayName(res["displayName"], d, config)); err != nil { + return fmt.Errorf("Error reading OrganizationSecurityPolicyAssociation: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("name"); !ok && v == "" { + err = identity.Set("name", d.Get("name").(string)) + if err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if v, ok := identity.GetOk("policy_id"); !ok && v == "" { + err = identity.Set("policy_id", d.Get("policy_id").(string)) + if err != nil { + return fmt.Errorf("Error setting policy_id: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceComputeOrganizationSecurityPolicyAssociationDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}{{policy_id}}/removeAssociation?name={{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting OrganizationSecurityPolicyAssociation %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "OrganizationSecurityPolicyAssociation") + } + + // `parent` is needed to poll the asynchronous operations but its available only on the policy. + + policyUrl := fmt.Sprintf("{{ComputeBasePath}}%s", d.Get("policy_id")) + url, err = tpgresource.ReplaceVars(d, config, policyUrl) + if err != nil { + return err + } + + policyRes, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + RawURL: url, + UserAgent: userAgent, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("ComputeOrganizationSecurityPolicy %q", d.Get("policy_id"))) + } + + parent := flattenComputeOrganizationSecurityPolicyParent(policyRes["parent"], d, config) + var opRes map[string]interface{} + err = ComputeOrgOperationWaitTimeWithResponse( + config, res, &opRes, parent.(string), "Creating OrganizationSecurityPolicyAssociation", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create OrganizationSecurityPolicyAssociation: %s", err) + } + + log.Printf("[DEBUG] Finished deleting OrganizationSecurityPolicyAssociation %q: %#v", d.Id(), res) + return nil +} + +func resourceComputeOrganizationSecurityPolicyAssociationImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^(?P.+)/association/(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "{{policy_id}}/association/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenComputeOrganizationSecurityPolicyAssociationName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeOrganizationSecurityPolicyAssociationAttachmentId(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeOrganizationSecurityPolicyAssociationDisplayName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandComputeOrganizationSecurityPolicyAssociationName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeOrganizationSecurityPolicyAssociationAttachmentId(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} diff --git a/google/services/compute/resource_compute_organization_security_policy_association_generated_meta.yaml b/google/services/compute/resource_compute_organization_security_policy_association_generated_meta.yaml new file mode 100644 index 00000000000..48480afb047 --- /dev/null +++ b/google/services/compute/resource_compute_organization_security_policy_association_generated_meta.yaml @@ -0,0 +1,15 @@ +resource: google_compute_organization_security_policy_association +generation_type: mmv1 +source_file: products/compute/OrganizationSecurityPolicyAssociation.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityPolicy +fields: + - api_field: associations.attachmentId + field: attachment_id + - api_field: associations.displayName + field: display_name + - api_field: associations.name + field: name + - field: policy_id + provider_only: true diff --git a/google/services/compute/resource_compute_organization_security_policy_association_generated_test.go b/google/services/compute/resource_compute_organization_security_policy_association_generated_test.go new file mode 100644 index 00000000000..b3d71e2185b --- /dev/null +++ b/google/services/compute/resource_compute_organization_security_policy_association_generated_test.go @@ -0,0 +1,122 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package compute_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccComputeOrganizationSecurityPolicyAssociation_organizationSecurityPolicyAssociationBasicExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "org_id": envvar.GetTestOrgFromEnv(t), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckComputeOrganizationSecurityPolicyAssociationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccComputeOrganizationSecurityPolicyAssociation_organizationSecurityPolicyAssociationBasicExample(context), + }, + { + ResourceName: "google_compute_organization_security_policy_association.policy", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"policy_id"}, + }, + { + ResourceName: "google_compute_organization_security_policy_association.policy", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccComputeOrganizationSecurityPolicyAssociation_organizationSecurityPolicyAssociationBasicExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_folder" "security_policy_target" { + display_name = "tf-test-secpol-%{random_suffix}" + parent = "organizations/%{org_id}" + deletion_protection = false +} + +resource "google_compute_organization_security_policy" "policy" { + short_name = "tf-test%{random_suffix}" + parent = google_folder.security_policy_target.name + type = "CLOUD_ARMOR" +} + +resource "google_compute_organization_security_policy_association" "policy" { + name = "tf-test%{random_suffix}" + attachment_id = google_compute_organization_security_policy.policy.parent + policy_id = google_compute_organization_security_policy.policy.id +} +`, context) +} + +func testAccCheckComputeOrganizationSecurityPolicyAssociationDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_compute_organization_security_policy_association" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + log.Printf("[DEBUG] Ignoring destroy during test") + } + + return nil + } +} diff --git a/google/services/compute/resource_compute_organization_security_policy_generated_meta.yaml b/google/services/compute/resource_compute_organization_security_policy_generated_meta.yaml index e6c0bdbda85..bc83752c010 100644 --- a/google/services/compute/resource_compute_organization_security_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_organization_security_policy_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_organization_security_policy' -generation_type: 'mmv1' -source_file: 'products/compute/OrganizationSecurityPolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityPolicy' +resource: google_compute_organization_security_policy +generation_type: mmv1 +source_file: products/compute/OrganizationSecurityPolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityPolicy fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'fingerprint' - - api_field: 'parent' - - api_field: 'id' - field: 'policy_id' - - api_field: 'shortName' - - api_field: 'type' + - api_field: description + - api_field: displayName + - api_field: fingerprint + - api_field: parent + - api_field: id + field: policy_id + - api_field: shortName + - api_field: type diff --git a/google/services/compute/resource_compute_packet_mirroring_generated_meta.yaml b/google/services/compute/resource_compute_packet_mirroring_generated_meta.yaml index 93e525fff68..f5dbc0b6df2 100644 --- a/google/services/compute/resource_compute_packet_mirroring_generated_meta.yaml +++ b/google/services/compute/resource_compute_packet_mirroring_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_compute_packet_mirroring' -generation_type: 'mmv1' -source_file: 'products/compute/PacketMirroring.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PacketMirroring' +resource: google_compute_packet_mirroring +generation_type: mmv1 +source_file: products/compute/PacketMirroring.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: PacketMirroring fields: - - api_field: 'collectorIlb.url' - - api_field: 'description' - - api_field: 'filter.cidrRanges' - - api_field: 'filter.direction' - - api_field: 'filter.IPProtocols' - - api_field: 'mirroredResources.instances.url' - - api_field: 'mirroredResources.subnetworks.url' - - api_field: 'mirroredResources.tags' - - api_field: 'name' - - api_field: 'network.url' - - api_field: 'priority' - - api_field: 'region' + - api_field: collectorIlb.url + - api_field: description + - api_field: filter.cidrRanges + - api_field: filter.direction + - api_field: filter.IPProtocols + - api_field: mirroredResources.instances.url + - api_field: mirroredResources.subnetworks.url + - api_field: mirroredResources.tags + - api_field: name + - api_field: network.url + - api_field: priority + - api_field: region diff --git a/google/services/compute/resource_compute_per_instance_config_generated_meta.yaml b/google/services/compute/resource_compute_per_instance_config_generated_meta.yaml index fa717ebfd3c..0abbd0e9d9c 100644 --- a/google/services/compute/resource_compute_per_instance_config_generated_meta.yaml +++ b/google/services/compute/resource_compute_per_instance_config_generated_meta.yaml @@ -1,39 +1,43 @@ -resource: 'google_compute_per_instance_config' -generation_type: 'mmv1' -source_file: 'products/compute/PerInstanceConfig.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceGroupManager' +resource: google_compute_per_instance_config +generation_type: mmv1 +source_file: products/compute/PerInstanceConfig.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceGroupManager api_variant_patterns: - - 'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' + - projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager} fields: - - field: 'instance_group_manager' - provider_only: true - - field: 'minimal_action' - provider_only: true - - field: 'most_disruptive_allowed_action' - provider_only: true - - api_field: 'name' - - api_field: 'preservedState.disks.deleteRule' - field: 'preserved_state.disk.delete_rule' - - api_field: 'preservedState.disks.deviceName' - field: 'preserved_state.disk.device_name' - - api_field: 'preservedState.disks.mode' - field: 'preserved_state.disk.mode' - - api_field: 'preservedState.disks.source' - field: 'preserved_state.disk.source' - - api_field: 'preservedState.externalIPs.externalIp.autoDelete' - field: 'preserved_state.external_ip.external_ip.auto_delete' - - api_field: 'preservedState.externalIPs.externalIp.ipAddress.address' - field: 'preserved_state.external_ip.external_ip.ip_address.address' - - api_field: 'preservedState.internalIPs.internalIp.autoDelete' - field: 'preserved_state.internal_ip.internal_ip.auto_delete' - - api_field: 'preservedState.internalIPs.internalIp.ipAddress.address' - field: 'preserved_state.internal_ip.internal_ip.ip_address.address' - - api_field: 'preservedState.metadata' - - field: 'remove_instance_on_destroy' - provider_only: true - - field: 'remove_instance_state_on_destroy' - provider_only: true - - field: 'zone' - provider_only: true + - field: instance_group_manager + provider_only: true + - field: minimal_action + provider_only: true + - field: most_disruptive_allowed_action + provider_only: true + - api_field: name + - api_field: preservedState.disks.deleteRule + field: preserved_state.disk.delete_rule + - api_field: preservedState.disks.deviceName + field: preserved_state.disk.device_name + - api_field: preservedState.disks.mode + field: preserved_state.disk.mode + - api_field: preservedState.disks.source + field: preserved_state.disk.source + - api_field: preservedState.externalIPs.key + field: preserved_state.external_ip.interface_name + - api_field: preservedState.externalIPs.value.autoDelete + field: preserved_state.external_ip.auto_delete + - api_field: preservedState.externalIPs.value.ipAddress.address + field: preserved_state.external_ip.ip_address.address + - api_field: preservedState.internalIPs.key + field: preserved_state.internal_ip.interface_name + - api_field: preservedState.internalIPs.value.autoDelete + field: preserved_state.internal_ip.auto_delete + - api_field: preservedState.internalIPs.value.ipAddress.address + field: preserved_state.internal_ip.ip_address.address + - api_field: preservedState.metadata + - field: remove_instance_on_destroy + provider_only: true + - field: remove_instance_state_on_destroy + provider_only: true + - field: zone + provider_only: true diff --git a/google/services/compute/resource_compute_preview_feature_generated_meta.yaml b/google/services/compute/resource_compute_preview_feature_generated_meta.yaml index 6be9ac9fb62..df1fb4e5f32 100644 --- a/google/services/compute/resource_compute_preview_feature_generated_meta.yaml +++ b/google/services/compute/resource_compute_preview_feature_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_compute_preview_feature' -generation_type: 'mmv1' -source_file: 'products/compute/PreviewFeature.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PreviewFeature' +resource: google_compute_preview_feature +generation_type: mmv1 +source_file: products/compute/PreviewFeature.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: PreviewFeature fields: - - api_field: 'activationStatus' - - field: 'name' - provider_only: true - - api_field: 'rolloutOperation.rolloutInput.predefinedRolloutPlan' + - api_field: activationStatus + - field: name + provider_only: true + - api_field: rolloutOperation.rolloutInput.predefinedRolloutPlan diff --git a/google/services/compute/resource_compute_project_cloud_armor_tier_generated_meta.yaml b/google/services/compute/resource_compute_project_cloud_armor_tier_generated_meta.yaml index b6146543988..2a4c4462863 100644 --- a/google/services/compute/resource_compute_project_cloud_armor_tier_generated_meta.yaml +++ b/google/services/compute/resource_compute_project_cloud_armor_tier_generated_meta.yaml @@ -1,8 +1,8 @@ -resource: 'google_compute_project_cloud_armor_tier' -generation_type: 'mmv1' -source_file: 'products/compute/ProjectCloudArmorTier.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Project' +resource: google_compute_project_cloud_armor_tier +generation_type: mmv1 +source_file: products/compute/ProjectCloudArmorTier.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Project fields: - - api_field: 'cloudArmorTier' + - api_field: cloudArmorTier diff --git a/google/services/compute/resource_compute_public_advertised_prefix_generated_meta.yaml b/google/services/compute/resource_compute_public_advertised_prefix_generated_meta.yaml index ffb832e9cde..0e30e0ce4a0 100644 --- a/google/services/compute/resource_compute_public_advertised_prefix_generated_meta.yaml +++ b/google/services/compute/resource_compute_public_advertised_prefix_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_public_advertised_prefix' -generation_type: 'mmv1' -source_file: 'products/compute/PublicAdvertisedPrefix.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PublicAdvertisedPrefix' +resource: google_compute_public_advertised_prefix +generation_type: mmv1 +source_file: products/compute/PublicAdvertisedPrefix.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: PublicAdvertisedPrefix fields: - - api_field: 'description' - - api_field: 'dnsVerificationIp' - - api_field: 'ipCidrRange' - - api_field: 'ipv6AccessType' - - api_field: 'name' - - api_field: 'pdpScope' - - api_field: 'sharedSecret' - - api_field: 'selfLink' + - api_field: description + - api_field: dnsVerificationIp + - api_field: ipCidrRange + - api_field: ipv6AccessType + - api_field: name + - api_field: pdpScope + - api_field: sharedSecret + - api_field: selfLink diff --git a/google/services/compute/resource_compute_public_delegated_prefix_generated_meta.yaml b/google/services/compute/resource_compute_public_delegated_prefix_generated_meta.yaml index e4488c1e69a..9ed336c952e 100644 --- a/google/services/compute/resource_compute_public_delegated_prefix_generated_meta.yaml +++ b/google/services/compute/resource_compute_public_delegated_prefix_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_compute_public_delegated_prefix' -generation_type: 'mmv1' -source_file: 'products/compute/PublicDelegatedPrefix.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PublicDelegatedPrefix' +resource: google_compute_public_delegated_prefix +generation_type: mmv1 +source_file: products/compute/PublicDelegatedPrefix.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: PublicDelegatedPrefix fields: - - api_field: 'allocatablePrefixLength' - - api_field: 'description' - - api_field: 'ipCidrRange' - - api_field: 'ipv6AccessType' - - api_field: 'isLiveMigration' - - api_field: 'mode' - - api_field: 'name' - - api_field: 'parentPrefix' - - api_field: 'publicDelegatedSubPrefixs.allocatablePrefixLength' - - api_field: 'publicDelegatedSubPrefixs.delegateeProject' - - api_field: 'publicDelegatedSubPrefixs.description' - - api_field: 'publicDelegatedSubPrefixs.ipCidrRange' - - api_field: 'publicDelegatedSubPrefixs.ipv6AccessType' - - api_field: 'publicDelegatedSubPrefixs.isAddress' - - api_field: 'publicDelegatedSubPrefixs.mode' - - api_field: 'publicDelegatedSubPrefixs.name' - - api_field: 'publicDelegatedSubPrefixs.region' - - api_field: 'publicDelegatedSubPrefixs.status' - - field: 'region' - provider_only: true - - api_field: 'selfLink' + - api_field: allocatablePrefixLength + - api_field: description + - api_field: ipCidrRange + - api_field: ipv6AccessType + - api_field: isLiveMigration + - api_field: mode + - api_field: name + - api_field: parentPrefix + - api_field: publicDelegatedSubPrefixs.allocatablePrefixLength + - api_field: publicDelegatedSubPrefixs.delegateeProject + - api_field: publicDelegatedSubPrefixs.description + - api_field: publicDelegatedSubPrefixs.ipCidrRange + - api_field: publicDelegatedSubPrefixs.ipv6AccessType + - api_field: publicDelegatedSubPrefixs.isAddress + - api_field: publicDelegatedSubPrefixs.mode + - api_field: publicDelegatedSubPrefixs.name + - api_field: publicDelegatedSubPrefixs.region + - api_field: publicDelegatedSubPrefixs.status + - field: region + provider_only: true + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_autoscaler_generated_meta.yaml b/google/services/compute/resource_compute_region_autoscaler_generated_meta.yaml index b5f2dffe611..191c0bcb116 100644 --- a/google/services/compute/resource_compute_region_autoscaler_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_autoscaler_generated_meta.yaml @@ -1,46 +1,54 @@ -resource: 'google_compute_region_autoscaler' -generation_type: 'mmv1' -source_file: 'products/compute/RegionAutoscaler.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Autoscaler' +resource: google_compute_region_autoscaler +generation_type: mmv1 +source_file: products/compute/RegionAutoscaler.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Autoscaler api_variant_patterns: - - 'projects/{project}/regions/{region}/autoscalers/{autoscaler}' + - projects/{project}/regions/{region}/autoscalers/{autoscaler} fields: - - api_field: 'autoscalingPolicy.coolDownPeriodSec' - field: 'autoscaling_policy.cooldown_period' - - api_field: 'autoscalingPolicy.cpuUtilization.predictiveMethod' - - api_field: 'autoscalingPolicy.cpuUtilization.utilizationTarget' - field: 'autoscaling_policy.cpu_utilization.target' - - api_field: 'autoscalingPolicy.loadBalancingUtilization.utilizationTarget' - field: 'autoscaling_policy.load_balancing_utilization.target' - - api_field: 'autoscalingPolicy.maxNumReplicas' - field: 'autoscaling_policy.max_replicas' - - api_field: 'autoscalingPolicy.customMetricUtilizations.filter' - field: 'autoscaling_policy.metric.filter' - - api_field: 'autoscalingPolicy.customMetricUtilizations.metric' - field: 'autoscaling_policy.metric.name' - - api_field: 'autoscalingPolicy.customMetricUtilizations.singleInstanceAssignment' - field: 'autoscaling_policy.metric.single_instance_assignment' - - api_field: 'autoscalingPolicy.customMetricUtilizations.utilizationTarget' - field: 'autoscaling_policy.metric.target' - - api_field: 'autoscalingPolicy.customMetricUtilizations.utilizationTargetType' - field: 'autoscaling_policy.metric.type' - - api_field: 'autoscalingPolicy.minNumReplicas' - field: 'autoscaling_policy.min_replicas' - - api_field: 'autoscalingPolicy.mode' - - api_field: 'autoscalingPolicy.scaleInControl.maxScaledInReplicas.fixed' - - api_field: 'autoscalingPolicy.scaleInControl.maxScaledInReplicas.percent' - - api_field: 'autoscalingPolicy.scaleInControl.timeWindowSec' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.description' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.disabled' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.durationSec' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.minRequiredReplicas' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.schedule' - - api_field: 'autoscalingPolicy.scalingSchedules.scalingSchedule.timeZone' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'name' - - api_field: 'region' - - api_field: 'target' - - api_field: 'selfLink' + - api_field: autoscalingPolicy.coolDownPeriodSec + field: autoscaling_policy.cooldown_period + - api_field: autoscalingPolicy.cpuUtilization.predictiveMethod + - api_field: autoscalingPolicy.cpuUtilization.utilizationTarget + field: autoscaling_policy.cpu_utilization.target + - api_field: autoscalingPolicy.loadBalancingUtilization.utilizationTarget + field: autoscaling_policy.load_balancing_utilization.target + - api_field: autoscalingPolicy.maxNumReplicas + field: autoscaling_policy.max_replicas + - api_field: autoscalingPolicy.customMetricUtilizations.filter + field: autoscaling_policy.metric.filter + - api_field: autoscalingPolicy.customMetricUtilizations.metric + field: autoscaling_policy.metric.name + - api_field: autoscalingPolicy.customMetricUtilizations.singleInstanceAssignment + field: autoscaling_policy.metric.single_instance_assignment + - api_field: autoscalingPolicy.customMetricUtilizations.utilizationTarget + field: autoscaling_policy.metric.target + - api_field: autoscalingPolicy.customMetricUtilizations.utilizationTargetType + field: autoscaling_policy.metric.type + - api_field: autoscalingPolicy.minNumReplicas + field: autoscaling_policy.min_replicas + - api_field: autoscalingPolicy.mode + - api_field: autoscalingPolicy.scaleInControl.maxScaledInReplicas.fixed + - api_field: autoscalingPolicy.scaleInControl.maxScaledInReplicas.percent + - api_field: autoscalingPolicy.scaleInControl.timeWindowSec + - api_field: autoscalingPolicy.scalingSchedules.key + field: autoscaling_policy.scaling_schedules.name + - api_field: autoscalingPolicy.scalingSchedules.value.description + field: autoscaling_policy.scaling_schedules.description + - api_field: autoscalingPolicy.scalingSchedules.value.disabled + field: autoscaling_policy.scaling_schedules.disabled + - api_field: autoscalingPolicy.scalingSchedules.value.durationSec + field: autoscaling_policy.scaling_schedules.duration_sec + - api_field: autoscalingPolicy.scalingSchedules.value.minRequiredReplicas + field: autoscaling_policy.scaling_schedules.min_required_replicas + - api_field: autoscalingPolicy.scalingSchedules.value.schedule + field: autoscaling_policy.scaling_schedules.schedule + - api_field: autoscalingPolicy.scalingSchedules.value.timeZone + field: autoscaling_policy.scaling_schedules.time_zone + - api_field: creationTimestamp + - api_field: description + - api_field: name + - api_field: region + - api_field: target + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_backend_service_generated_meta.yaml b/google/services/compute/resource_compute_region_backend_service_generated_meta.yaml index c02d59181ef..2ed3597b4d7 100644 --- a/google/services/compute/resource_compute_region_backend_service_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_backend_service_generated_meta.yaml @@ -1,122 +1,122 @@ -resource: 'google_compute_region_backend_service' -generation_type: 'mmv1' -source_file: 'products/compute/RegionBackendService.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackendService' +resource: google_compute_region_backend_service +generation_type: mmv1 +source_file: products/compute/RegionBackendService.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: BackendService fields: - - api_field: 'affinityCookieTtlSec' - - api_field: 'backends.balancingMode' - field: 'backend.balancing_mode' - - api_field: 'backends.capacityScaler' - field: 'backend.capacity_scaler' - - api_field: 'backends.customMetrics.dryRun' - field: 'backend.custom_metrics.dry_run' - - api_field: 'backends.customMetrics.maxUtilization' - field: 'backend.custom_metrics.max_utilization' - - api_field: 'backends.customMetrics.name' - field: 'backend.custom_metrics.name' - - api_field: 'backends.description' - field: 'backend.description' - - api_field: 'backends.failover' - field: 'backend.failover' - - api_field: 'backends.group' - field: 'backend.group' - - api_field: 'backends.maxConnections' - field: 'backend.max_connections' - - api_field: 'backends.maxConnectionsPerEndpoint' - field: 'backend.max_connections_per_endpoint' - - api_field: 'backends.maxConnectionsPerInstance' - field: 'backend.max_connections_per_instance' - - api_field: 'backends.maxRate' - field: 'backend.max_rate' - - api_field: 'backends.maxRatePerEndpoint' - field: 'backend.max_rate_per_endpoint' - - api_field: 'backends.maxRatePerInstance' - field: 'backend.max_rate_per_instance' - - api_field: 'backends.maxUtilization' - field: 'backend.max_utilization' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeHost' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeNamedCookies' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeProtocol' - - api_field: 'cdnPolicy.cacheKeyPolicy.includeQueryString' - - api_field: 'cdnPolicy.cacheKeyPolicy.queryStringBlacklist' - - api_field: 'cdnPolicy.cacheKeyPolicy.queryStringWhitelist' - - api_field: 'cdnPolicy.cacheMode' - - api_field: 'cdnPolicy.clientTtl' - - api_field: 'cdnPolicy.defaultTtl' - - api_field: 'cdnPolicy.maxTtl' - - api_field: 'cdnPolicy.negativeCaching' - - api_field: 'cdnPolicy.negativeCachingPolicy.code' - - api_field: 'cdnPolicy.serveWhileStale' - - api_field: 'cdnPolicy.signedUrlCacheMaxAgeSec' - - api_field: 'circuitBreakers.maxConnections' - - api_field: 'circuitBreakers.maxPendingRequests' - - api_field: 'circuitBreakers.maxRequests' - - api_field: 'circuitBreakers.maxRequestsPerConnection' - - api_field: 'circuitBreakers.maxRetries' - - api_field: 'connectionDraining.drainingTimeoutSec' - field: 'connection_draining_timeout_sec' - - api_field: 'consistentHash.httpCookie.name' - - api_field: 'consistentHash.httpCookie.path' - - api_field: 'consistentHash.httpCookie.ttl.nanos' - - api_field: 'consistentHash.httpCookie.ttl.seconds' - - api_field: 'consistentHash.httpHeaderName' - - api_field: 'consistentHash.minimumRingSize' - - api_field: 'creationTimestamp' - - api_field: 'customMetrics.dryRun' - - api_field: 'customMetrics.name' - - api_field: 'description' - - api_field: 'enableCDN' - - api_field: 'failoverPolicy.disableConnectionDrainOnFailover' - - api_field: 'failoverPolicy.dropTrafficIfUnhealthy' - - api_field: 'failoverPolicy.failoverRatio' - - api_field: 'fingerprint' - - api_field: 'id' - field: 'generated_id' - - api_field: 'haPolicy.fastIPMove' - - api_field: 'haPolicy.leader.backendGroup' - - api_field: 'haPolicy.leader.networkEndpoint.instance' - - api_field: 'healthChecks' - - api_field: 'iap.enabled' - - api_field: 'iap.oauth2ClientId' - - api_field: 'iap.oauth2ClientSecret' - - api_field: 'iap.oauth2ClientSecretSha256' - - api_field: 'ipAddressSelectionPolicy' - - api_field: 'loadBalancingScheme' - - api_field: 'localityLbPolicy' - - api_field: 'logConfig.enable' - - api_field: 'logConfig.optionalFields' - - api_field: 'logConfig.optionalMode' - - api_field: 'logConfig.sampleRate' - - api_field: 'name' - - api_field: 'network' - - api_field: 'outlierDetection.baseEjectionTime.nanos' - - api_field: 'outlierDetection.baseEjectionTime.seconds' - - api_field: 'outlierDetection.consecutiveErrors' - - api_field: 'outlierDetection.consecutiveGatewayFailure' - - api_field: 'outlierDetection.enforcingConsecutiveErrors' - - api_field: 'outlierDetection.enforcingConsecutiveGatewayFailure' - - api_field: 'outlierDetection.enforcingSuccessRate' - - api_field: 'outlierDetection.interval.nanos' - - api_field: 'outlierDetection.interval.seconds' - - api_field: 'outlierDetection.maxEjectionPercent' - - api_field: 'outlierDetection.successRateMinimumHosts' - - api_field: 'outlierDetection.successRateRequestVolume' - - api_field: 'outlierDetection.successRateStdevFactor' - - api_field: 'params.resourceManagerTags' - - api_field: 'portName' - - api_field: 'protocol' - - api_field: 'region' - - api_field: 'securityPolicy' - - api_field: 'sessionAffinity' - - api_field: 'strongSessionAffinityCookie.name' - - api_field: 'strongSessionAffinityCookie.path' - - api_field: 'strongSessionAffinityCookie.ttl.nanos' - - api_field: 'strongSessionAffinityCookie.ttl.seconds' - - api_field: 'timeoutSec' - - api_field: 'tlsSettings.authenticationConfig' - - api_field: 'tlsSettings.sni' - - api_field: 'tlsSettings.subjectAltNames.dnsName' - - api_field: 'tlsSettings.subjectAltNames.uniformResourceIdentifier' - - api_field: 'selfLink' + - api_field: affinityCookieTtlSec + - api_field: backends.balancingMode + field: backend.balancing_mode + - api_field: backends.capacityScaler + field: backend.capacity_scaler + - api_field: backends.customMetrics.dryRun + field: backend.custom_metrics.dry_run + - api_field: backends.customMetrics.maxUtilization + field: backend.custom_metrics.max_utilization + - api_field: backends.customMetrics.name + field: backend.custom_metrics.name + - api_field: backends.description + field: backend.description + - api_field: backends.failover + field: backend.failover + - api_field: backends.group + field: backend.group + - api_field: backends.maxConnections + field: backend.max_connections + - api_field: backends.maxConnectionsPerEndpoint + field: backend.max_connections_per_endpoint + - api_field: backends.maxConnectionsPerInstance + field: backend.max_connections_per_instance + - api_field: backends.maxRate + field: backend.max_rate + - api_field: backends.maxRatePerEndpoint + field: backend.max_rate_per_endpoint + - api_field: backends.maxRatePerInstance + field: backend.max_rate_per_instance + - api_field: backends.maxUtilization + field: backend.max_utilization + - api_field: cdnPolicy.cacheKeyPolicy.includeHost + - api_field: cdnPolicy.cacheKeyPolicy.includeNamedCookies + - api_field: cdnPolicy.cacheKeyPolicy.includeProtocol + - api_field: cdnPolicy.cacheKeyPolicy.includeQueryString + - api_field: cdnPolicy.cacheKeyPolicy.queryStringBlacklist + - api_field: cdnPolicy.cacheKeyPolicy.queryStringWhitelist + - api_field: cdnPolicy.cacheMode + - api_field: cdnPolicy.clientTtl + - api_field: cdnPolicy.defaultTtl + - api_field: cdnPolicy.maxTtl + - api_field: cdnPolicy.negativeCaching + - api_field: cdnPolicy.negativeCachingPolicy.code + - api_field: cdnPolicy.serveWhileStale + - api_field: cdnPolicy.signedUrlCacheMaxAgeSec + - api_field: circuitBreakers.maxConnections + - api_field: circuitBreakers.maxPendingRequests + - api_field: circuitBreakers.maxRequests + - api_field: circuitBreakers.maxRequestsPerConnection + - api_field: circuitBreakers.maxRetries + - api_field: connectionDraining.drainingTimeoutSec + field: connection_draining_timeout_sec + - api_field: consistentHash.httpCookie.name + - api_field: consistentHash.httpCookie.path + - api_field: consistentHash.httpCookie.ttl.nanos + - api_field: consistentHash.httpCookie.ttl.seconds + - api_field: consistentHash.httpHeaderName + - api_field: consistentHash.minimumRingSize + - api_field: creationTimestamp + - api_field: customMetrics.dryRun + - api_field: customMetrics.name + - api_field: description + - api_field: enableCDN + - api_field: failoverPolicy.disableConnectionDrainOnFailover + - api_field: failoverPolicy.dropTrafficIfUnhealthy + - api_field: failoverPolicy.failoverRatio + - api_field: fingerprint + - api_field: id + field: generated_id + - api_field: haPolicy.fastIPMove + - api_field: haPolicy.leader.backendGroup + - api_field: haPolicy.leader.networkEndpoint.instance + - api_field: healthChecks + - api_field: iap.enabled + - api_field: iap.oauth2ClientId + - api_field: iap.oauth2ClientSecret + - api_field: iap.oauth2ClientSecretSha256 + - api_field: ipAddressSelectionPolicy + - api_field: loadBalancingScheme + - api_field: localityLbPolicy + - api_field: logConfig.enable + - api_field: logConfig.optionalFields + - api_field: logConfig.optionalMode + - api_field: logConfig.sampleRate + - api_field: name + - api_field: network + - api_field: outlierDetection.baseEjectionTime.nanos + - api_field: outlierDetection.baseEjectionTime.seconds + - api_field: outlierDetection.consecutiveErrors + - api_field: outlierDetection.consecutiveGatewayFailure + - api_field: outlierDetection.enforcingConsecutiveErrors + - api_field: outlierDetection.enforcingConsecutiveGatewayFailure + - api_field: outlierDetection.enforcingSuccessRate + - api_field: outlierDetection.interval.nanos + - api_field: outlierDetection.interval.seconds + - api_field: outlierDetection.maxEjectionPercent + - api_field: outlierDetection.successRateMinimumHosts + - api_field: outlierDetection.successRateRequestVolume + - api_field: outlierDetection.successRateStdevFactor + - api_field: params.resourceManagerTags + - api_field: portName + - api_field: protocol + - api_field: region + - api_field: securityPolicy + - api_field: sessionAffinity + - api_field: strongSessionAffinityCookie.name + - api_field: strongSessionAffinityCookie.path + - api_field: strongSessionAffinityCookie.ttl.nanos + - api_field: strongSessionAffinityCookie.ttl.seconds + - api_field: timeoutSec + - api_field: tlsSettings.authenticationConfig + - api_field: tlsSettings.sni + - api_field: tlsSettings.subjectAltNames.dnsName + - api_field: tlsSettings.subjectAltNames.uniformResourceIdentifier + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_commitment.go b/google/services/compute/resource_compute_region_commitment.go index 1bb1d02bebb..9502dad86de 100644 --- a/google/services/compute/resource_compute_region_commitment.go +++ b/google/services/compute/resource_compute_region_commitment.go @@ -255,7 +255,7 @@ Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.`, ForceNew: true, Description: `The type of commitment, which affects the discount rate and the eligible resources. The type could be one of the following value: 'MEMORY_OPTIMIZED', 'ACCELERATOR_OPTIMIZED', -'GENERAL_PURPOSE_N1', 'GENERAL_PURPOSE_N2', 'GENERAL_PURPOSE_N2D', 'GENERAL_PURPOSE_E2', +'GENERAL_PURPOSE', 'GENERAL_PURPOSE_N2', 'GENERAL_PURPOSE_N2D', 'GENERAL_PURPOSE_E2', 'GENERAL_PURPOSE_T2D', 'GENERAL_PURPOSE_C3', 'COMPUTE_OPTIMIZED_C2', 'COMPUTE_OPTIMIZED_C2D' and 'GRAPHICS_OPTIMIZED_G2'`, }, diff --git a/google/services/compute/resource_compute_region_commitment_generated_meta.yaml b/google/services/compute/resource_compute_region_commitment_generated_meta.yaml index 40dd2749600..f35f161e80a 100644 --- a/google/services/compute/resource_compute_region_commitment_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_commitment_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_compute_region_commitment' -generation_type: 'mmv1' -source_file: 'products/compute/RegionCommitment.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Commitment' +resource: google_compute_region_commitment +generation_type: mmv1 +source_file: products/compute/RegionCommitment.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Commitment fields: - - api_field: 'autoRenew' - - api_field: 'category' - - api_field: 'id' - field: 'commitment_id' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'endTimestamp' - - api_field: 'existingReservations' - - api_field: 'licenseResource.amount' - - api_field: 'licenseResource.coresPerLicense' - - api_field: 'licenseResource.license' - - api_field: 'name' - - api_field: 'plan' - - api_field: 'region' - - api_field: 'resources.acceleratorType' - - api_field: 'resources.amount' - - api_field: 'resources.type' - - api_field: 'startTimestamp' - - api_field: 'status' - - api_field: 'statusMessage' - - api_field: 'type' - - api_field: 'selfLink' + - api_field: autoRenew + - api_field: category + - api_field: id + field: commitment_id + - api_field: creationTimestamp + - api_field: description + - api_field: endTimestamp + - api_field: existingReservations + - api_field: licenseResource.amount + - api_field: licenseResource.coresPerLicense + - api_field: licenseResource.license + - api_field: name + - api_field: plan + - api_field: region + - api_field: resources.acceleratorType + - api_field: resources.amount + - api_field: resources.type + - api_field: startTimestamp + - api_field: status + - api_field: statusMessage + - api_field: type + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_disk.go b/google/services/compute/resource_compute_region_disk.go index f2972d9045f..3c4d9efde2e 100644 --- a/google/services/compute/resource_compute_region_disk.go +++ b/google/services/compute/resource_compute_region_disk.go @@ -1310,7 +1310,8 @@ func resourceComputeRegionDiskDelete(d *schema.ResourceData, meta interface{}) e if disks, ok := instanceRes["disks"].([]interface{}); ok { for _, diskInterface := range disks { disk := diskInterface.(map[string]interface{}) - if tpgresource.CompareSelfLinkOrResourceName("", disk["source"].(string), self, nil) { + // source is nil for scratch disks + if source := disk["source"]; source != nil && tpgresource.CompareSelfLinkOrResourceName("", source.(string), self, nil) { detachCalls = append(detachCalls, detachArgs{ project: instanceProject, zone: tpgresource.GetResourceNameFromSelfLink(instanceRes["zone"].(string)), diff --git a/google/services/compute/resource_compute_region_disk_generated_meta.yaml b/google/services/compute/resource_compute_region_disk_generated_meta.yaml index 8d3a343c204..0e0d596fdff 100644 --- a/google/services/compute/resource_compute_region_disk_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_disk_generated_meta.yaml @@ -1,49 +1,49 @@ -resource: 'google_compute_region_disk' -generation_type: 'mmv1' -source_file: 'products/compute/RegionDisk.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Disk' +resource: google_compute_region_disk +generation_type: mmv1 +source_file: products/compute/RegionDisk.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Disk fields: - - api_field: 'accessMode' - - api_field: 'asyncPrimaryDisk.disk' - - field: 'create_snapshot_before_destroy' - provider_only: true - - field: 'create_snapshot_before_destroy_prefix' - provider_only: true - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'diskEncryptionKey.kmsKeyName' - - api_field: 'diskEncryptionKey.rawKey' - - api_field: 'diskEncryptionKey.rsaEncryptedKey' - - api_field: 'diskEncryptionKey.sha256' - - api_field: 'id' - field: 'disk_id' - - field: 'effective_labels' - provider_only: true - - api_field: 'guestOsFeatures.type' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'lastAttachTimestamp' - - api_field: 'lastDetachTimestamp' - - api_field: 'licenses' - - api_field: 'name' - - api_field: 'physicalBlockSizeBytes' - - api_field: 'provisionedIops' - - api_field: 'provisionedThroughput' - - api_field: 'region' - - api_field: 'replicaZones' - - api_field: 'sizeGb' - field: 'size' - - api_field: 'sourceSnapshot' - field: 'snapshot' - - api_field: 'sourceDisk' - - api_field: 'sourceDiskId' - - api_field: 'sourceSnapshotEncryptionKey.rawKey' - - api_field: 'sourceSnapshotEncryptionKey.sha256' - - api_field: 'sourceSnapshotId' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'users' - - api_field: 'selfLink' + - api_field: accessMode + - api_field: asyncPrimaryDisk.disk + - field: create_snapshot_before_destroy + provider_only: true + - field: create_snapshot_before_destroy_prefix + provider_only: true + - api_field: creationTimestamp + - api_field: description + - api_field: diskEncryptionKey.kmsKeyName + - api_field: diskEncryptionKey.rawKey + - api_field: diskEncryptionKey.rsaEncryptedKey + - api_field: diskEncryptionKey.sha256 + - api_field: id + field: disk_id + - field: effective_labels + provider_only: true + - api_field: guestOsFeatures.type + - api_field: labelFingerprint + - api_field: labels + - api_field: lastAttachTimestamp + - api_field: lastDetachTimestamp + - api_field: licenses + - api_field: name + - api_field: physicalBlockSizeBytes + - api_field: provisionedIops + - api_field: provisionedThroughput + - api_field: region + - api_field: replicaZones + - api_field: sizeGb + field: size + - api_field: sourceSnapshot + field: snapshot + - api_field: sourceDisk + - api_field: sourceDiskId + - api_field: sourceSnapshotEncryptionKey.rawKey + - api_field: sourceSnapshotEncryptionKey.sha256 + - api_field: sourceSnapshotId + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: users + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_disk_resource_policy_attachment_generated_meta.yaml b/google/services/compute/resource_compute_region_disk_resource_policy_attachment_generated_meta.yaml index 353e0e5a427..19bc2829d3a 100644 --- a/google/services/compute/resource_compute_region_disk_resource_policy_attachment_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_disk_resource_policy_attachment_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_compute_region_disk_resource_policy_attachment' -generation_type: 'mmv1' -source_file: 'products/compute/RegionDiskResourcePolicyAttachment.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Disk' +resource: google_compute_region_disk_resource_policy_attachment +generation_type: mmv1 +source_file: products/compute/RegionDiskResourcePolicyAttachment.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Disk fields: - - field: 'disk' - provider_only: true - - api_field: 'name' - - field: 'region' - provider_only: true + - field: disk + provider_only: true + - api_field: name + - field: region + provider_only: true diff --git a/google/services/compute/resource_compute_region_health_check_generated_meta.yaml b/google/services/compute/resource_compute_region_health_check_generated_meta.yaml index 582fd9b06ae..b03fae4220a 100644 --- a/google/services/compute/resource_compute_region_health_check_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_health_check_generated_meta.yaml @@ -1,62 +1,62 @@ -resource: 'google_compute_region_health_check' -generation_type: 'mmv1' -source_file: 'products/compute/RegionHealthCheck.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HealthCheck' +resource: google_compute_region_health_check +generation_type: mmv1 +source_file: products/compute/RegionHealthCheck.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: HealthCheck api_variant_patterns: - - 'projects/{project}/regions/{region}/healthChecks/{healthCheck}' + - projects/{project}/regions/{region}/healthChecks/{healthCheck} fields: - - api_field: 'checkIntervalSec' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'grpcHealthCheck.grpcServiceName' - - api_field: 'grpcHealthCheck.port' - - api_field: 'grpcHealthCheck.portName' - - api_field: 'grpcHealthCheck.portSpecification' - - api_field: 'grpcTlsHealthCheck.grpcServiceName' - - api_field: 'grpcTlsHealthCheck.port' - - api_field: 'grpcTlsHealthCheck.portSpecification' - - api_field: 'id' - field: 'health_check_id' - - api_field: 'healthyThreshold' - - api_field: 'http2HealthCheck.host' - - api_field: 'http2HealthCheck.port' - - api_field: 'http2HealthCheck.portName' - - api_field: 'http2HealthCheck.portSpecification' - - api_field: 'http2HealthCheck.proxyHeader' - - api_field: 'http2HealthCheck.requestPath' - - api_field: 'http2HealthCheck.response' - - api_field: 'httpHealthCheck.host' - - api_field: 'httpHealthCheck.port' - - api_field: 'httpHealthCheck.portName' - - api_field: 'httpHealthCheck.portSpecification' - - api_field: 'httpHealthCheck.proxyHeader' - - api_field: 'httpHealthCheck.requestPath' - - api_field: 'httpHealthCheck.response' - - api_field: 'httpsHealthCheck.host' - - api_field: 'httpsHealthCheck.port' - - api_field: 'httpsHealthCheck.portName' - - api_field: 'httpsHealthCheck.portSpecification' - - api_field: 'httpsHealthCheck.proxyHeader' - - api_field: 'httpsHealthCheck.requestPath' - - api_field: 'httpsHealthCheck.response' - - api_field: 'logConfig.enable' - - api_field: 'name' - - api_field: 'region' - - api_field: 'sslHealthCheck.port' - - api_field: 'sslHealthCheck.portName' - - api_field: 'sslHealthCheck.portSpecification' - - api_field: 'sslHealthCheck.proxyHeader' - - api_field: 'sslHealthCheck.request' - - api_field: 'sslHealthCheck.response' - - api_field: 'tcpHealthCheck.port' - - api_field: 'tcpHealthCheck.portName' - - api_field: 'tcpHealthCheck.portSpecification' - - api_field: 'tcpHealthCheck.proxyHeader' - - api_field: 'tcpHealthCheck.request' - - api_field: 'tcpHealthCheck.response' - - api_field: 'timeoutSec' - - api_field: 'type' - - api_field: 'unhealthyThreshold' - - api_field: 'selfLink' + - api_field: checkIntervalSec + - api_field: creationTimestamp + - api_field: description + - api_field: grpcHealthCheck.grpcServiceName + - api_field: grpcHealthCheck.port + - api_field: grpcHealthCheck.portName + - api_field: grpcHealthCheck.portSpecification + - api_field: grpcTlsHealthCheck.grpcServiceName + - api_field: grpcTlsHealthCheck.port + - api_field: grpcTlsHealthCheck.portSpecification + - api_field: id + field: health_check_id + - api_field: healthyThreshold + - api_field: http2HealthCheck.host + - api_field: http2HealthCheck.port + - api_field: http2HealthCheck.portName + - api_field: http2HealthCheck.portSpecification + - api_field: http2HealthCheck.proxyHeader + - api_field: http2HealthCheck.requestPath + - api_field: http2HealthCheck.response + - api_field: httpHealthCheck.host + - api_field: httpHealthCheck.port + - api_field: httpHealthCheck.portName + - api_field: httpHealthCheck.portSpecification + - api_field: httpHealthCheck.proxyHeader + - api_field: httpHealthCheck.requestPath + - api_field: httpHealthCheck.response + - api_field: httpsHealthCheck.host + - api_field: httpsHealthCheck.port + - api_field: httpsHealthCheck.portName + - api_field: httpsHealthCheck.portSpecification + - api_field: httpsHealthCheck.proxyHeader + - api_field: httpsHealthCheck.requestPath + - api_field: httpsHealthCheck.response + - api_field: logConfig.enable + - api_field: name + - api_field: region + - api_field: sslHealthCheck.port + - api_field: sslHealthCheck.portName + - api_field: sslHealthCheck.portSpecification + - api_field: sslHealthCheck.proxyHeader + - api_field: sslHealthCheck.request + - api_field: sslHealthCheck.response + - api_field: tcpHealthCheck.port + - api_field: tcpHealthCheck.portName + - api_field: tcpHealthCheck.portSpecification + - api_field: tcpHealthCheck.proxyHeader + - api_field: tcpHealthCheck.request + - api_field: tcpHealthCheck.response + - api_field: timeoutSec + - api_field: type + - api_field: unhealthyThreshold + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_health_check_test.go b/google/services/compute/resource_compute_region_health_check_test.go index 29a6e461606..ffade175b51 100644 --- a/google/services/compute/resource_compute_region_health_check_test.go +++ b/google/services/compute/resource_compute_region_health_check_test.go @@ -202,21 +202,51 @@ func TestAccComputeRegionHealthCheck_typeTransition(t *testing.T) { { Config: testAccComputeRegionHealthCheck_https(hckName), }, + { + ResourceName: "google_compute_region_health_check.foobar", + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccComputeRegionHealthCheck_http(hckName), }, + { + ResourceName: "google_compute_region_health_check.foobar", + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccComputeRegionHealthCheck_ssl(hckName), }, + { + ResourceName: "google_compute_region_health_check.foobar", + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccComputeRegionHealthCheck_tcp(hckName), }, + { + ResourceName: "google_compute_region_health_check.foobar", + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccComputeRegionHealthCheck_http2(hckName), }, + { + ResourceName: "google_compute_region_health_check.foobar", + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccComputeRegionHealthCheck_https(hckName), }, + { + ResourceName: "google_compute_region_health_check.foobar", + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/google/services/compute/resource_compute_region_health_source_test.go b/google/services/compute/resource_compute_region_health_source_test.go new file mode 100644 index 00000000000..39582c2953c --- /dev/null +++ b/google/services/compute/resource_compute_region_health_source_test.go @@ -0,0 +1,17 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/resource_compute_region_health_source_test.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package compute_test diff --git a/google/services/compute/resource_compute_region_instance_group_manager_meta.yaml b/google/services/compute/resource_compute_region_instance_group_manager_meta.yaml index 4efb1d2b9b9..31839b364cc 100644 --- a/google/services/compute/resource_compute_region_instance_group_manager_meta.yaml +++ b/google/services/compute/resource_compute_region_instance_group_manager_meta.yaml @@ -15,12 +15,17 @@ fields: - api_field: 'baseInstanceName' - api_field: 'creationTimestamp' - api_field: 'description' - - field: 'distribution_policy_target_shape' - - field: 'distribution_policy_zones' + - api_field: 'distributionPolicy.targetShape' + field: 'distribution_policy_target_shape' + - api_field: 'distributionPolicy.zones.zone' + field: 'distribution_policy_zones' - api_field: 'fingerprint' - - field: 'instance_flexibility_policy.instance_selections.machine_types' - - field: 'instance_flexibility_policy.instance_selections.name' - - field: 'instance_flexibility_policy.instance_selections.rank' + - api_field: 'instanceFlexibilityPolicy.instanceSelections.value.machineTypes' + field: 'instance_flexibility_policy.instance_selections.machine_types' + - api_field: 'instanceFlexibilityPolicy.instanceSelections.key' + field: 'instance_flexibility_policy.instance_selections.name' + - api_field: 'instanceFlexibilityPolicy.instanceSelections.value.rank' + field: 'instance_flexibility_policy.instance_selections.rank' - api_field: 'instanceGroup' - api_field: 'id' field: 'instance_group_manager_id' @@ -38,17 +43,17 @@ fields: - api_field: 'standbyPolicy.initialDelaySec' - api_field: 'standbyPolicy.mode' - field: 'stateful_disk.delete_rule' - api_field: 'statefulPolicy.preservedState.disks' + api_field: 'statefulPolicy.preservedState.disks.value.autoDelete' - field: 'stateful_disk.device_name' - api_field: 'statefulPolicy.preservedState.disks' + api_field: 'statefulPolicy.preservedState.disks.key' - field: 'stateful_external_ip.delete_rule' - api_field: 'statefulPolicy.preservedState.externalIPs' + api_field: 'statefulPolicy.preservedState.externalIPs.value.autoDelete' - field: 'stateful_external_ip.interface_name' - api_field: 'statefulPolicy.preservedState.externalIPs' + api_field: 'statefulPolicy.preservedState.externalIPs.key' - field: 'stateful_internal_ip.delete_rule' - api_field: 'statefulPolicy.preservedState.internalIPs' + api_field: 'statefulPolicy.preservedState.internalIPs.value.autoDelete' - field: 'stateful_internal_ip.interface_name' - api_field: 'statefulPolicy.preservedState.internalIPs' + api_field: 'statefulPolicy.preservedState.internalIPs.key' - api_field: 'status.allInstancesConfig.currentRevision' - api_field: 'status.allInstancesConfig.effective' - api_field: 'status.isStable' diff --git a/google/services/compute/resource_compute_region_network_endpoint.go b/google/services/compute/resource_compute_region_network_endpoint.go index 834b90ffc3d..307aae187ee 100644 --- a/google/services/compute/resource_compute_region_network_endpoint.go +++ b/google/services/compute/resource_compute_region_network_endpoint.go @@ -152,6 +152,12 @@ func ResourceComputeRegionNetworkEndpoint() *schema.Resource { DiffSuppressFunc: tpgresource.CompareResourceNames, Description: `The network endpoint group this endpoint is part of.`, }, + "client_destination_port": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + Description: `Client destination port for the 'GCE_VM_IP_PORTMAP' NEG.`, + }, "fqdn": { Type: schema.TypeString, Optional: true, @@ -161,6 +167,14 @@ func ResourceComputeRegionNetworkEndpoint() *schema.Resource { This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT.`, AtLeastOneOf: []string{"fqdn", "ip_address"}, }, + "instance": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + DiffSuppressFunc: tpgresource.CompareSelfLinkOrResourceName, + Description: `The name for a specific VM instance that the IP address belongs to. +This is required for network endpoints of type GCE_VM_IP_PORTMAP.`, + }, "ip_address": { Type: schema.TypeString, Optional: true, @@ -219,6 +233,18 @@ func resourceComputeRegionNetworkEndpointCreate(d *schema.ResourceData, meta int } else if v, ok := d.GetOkExists("fqdn"); !tpgresource.IsEmptyValue(reflect.ValueOf(fqdnProp)) && (ok || !reflect.DeepEqual(v, fqdnProp)) { obj["fqdn"] = fqdnProp } + clientDestinationPortProp, err := expandNestedComputeRegionNetworkEndpointClientDestinationPort(d.Get("client_destination_port"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("client_destination_port"); !tpgresource.IsEmptyValue(reflect.ValueOf(clientDestinationPortProp)) && (ok || !reflect.DeepEqual(v, clientDestinationPortProp)) { + obj["clientDestinationPort"] = clientDestinationPortProp + } + instanceProp, err := expandNestedComputeRegionNetworkEndpointInstance(d.Get("instance"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("instance"); !tpgresource.IsEmptyValue(reflect.ValueOf(instanceProp)) && (ok || !reflect.DeepEqual(v, instanceProp)) { + obj["instance"] = instanceProp + } obj, err = resourceComputeRegionNetworkEndpointEncoder(d, meta, obj) if err != nil { @@ -410,6 +436,12 @@ func resourceComputeRegionNetworkEndpointRead(d *schema.ResourceData, meta inter if err := d.Set("fqdn", flattenNestedComputeRegionNetworkEndpointFqdn(res["fqdn"], d, config)); err != nil { return fmt.Errorf("Error reading RegionNetworkEndpoint: %s", err) } + if err := d.Set("client_destination_port", flattenNestedComputeRegionNetworkEndpointClientDestinationPort(res["clientDestinationPort"], d, config)); err != nil { + return fmt.Errorf("Error reading RegionNetworkEndpoint: %s", err) + } + if err := d.Set("instance", flattenNestedComputeRegionNetworkEndpointInstance(res["instance"], d, config)); err != nil { + return fmt.Errorf("Error reading RegionNetworkEndpoint: %s", err) + } identity, err := d.Identity() if err == nil && identity != nil { @@ -606,6 +638,21 @@ func flattenNestedComputeRegionNetworkEndpointFqdn(v interface{}, d *schema.Reso return v } +func flattenNestedComputeRegionNetworkEndpointClientDestinationPort(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles int given in float64 format + if floatVal, ok := v.(float64); ok { + return int(floatVal) + } + return v +} + +func flattenNestedComputeRegionNetworkEndpointInstance(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + return tpgresource.ConvertSelfLinkToV1(v.(string)) +} + func expandNestedComputeRegionNetworkEndpointPort(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } @@ -618,6 +665,14 @@ func expandNestedComputeRegionNetworkEndpointFqdn(v interface{}, d tpgresource.T return v, nil } +func expandNestedComputeRegionNetworkEndpointClientDestinationPort(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNestedComputeRegionNetworkEndpointInstance(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func resourceComputeRegionNetworkEndpointEncoder(d *schema.ResourceData, meta interface{}, obj map[string]interface{}) (map[string]interface{}, error) { // Network Endpoint Group is a URL parameter only, so replace self-link/path with resource name only. if err := d.Set("region_network_endpoint_group", tpgresource.GetResourceNameFromSelfLink(d.Get("region_network_endpoint_group").(string))); err != nil { diff --git a/google/services/compute/resource_compute_region_network_endpoint_generated_meta.yaml b/google/services/compute/resource_compute_region_network_endpoint_generated_meta.yaml index 9742789bdfe..262c4960cf8 100644 --- a/google/services/compute/resource_compute_region_network_endpoint_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_network_endpoint_generated_meta.yaml @@ -1,16 +1,18 @@ -resource: 'google_compute_region_network_endpoint' -generation_type: 'mmv1' -source_file: 'products/compute/RegionNetworkEndpoint.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkEndpointGroup' +resource: google_compute_region_network_endpoint +generation_type: mmv1 +source_file: products/compute/RegionNetworkEndpoint.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkEndpointGroup fields: - - api_field: 'fqdn' - - api_field: 'ipAddress' - - api_field: 'id' - field: 'network_endpoint_id' - - api_field: 'port' - - field: 'region' - provider_only: true - - field: 'region_network_endpoint_group' - provider_only: true + - api_field: clientDestinationPort + - api_field: fqdn + - api_field: instance + - api_field: ipAddress + - api_field: id + field: network_endpoint_id + - api_field: port + - field: region + provider_only: true + - field: region_network_endpoint_group + provider_only: true diff --git a/google/services/compute/resource_compute_region_network_endpoint_generated_test.go b/google/services/compute/resource_compute_region_network_endpoint_generated_test.go index 3aa423d0de3..22fd5adf889 100644 --- a/google/services/compute/resource_compute_region_network_endpoint_generated_test.go +++ b/google/services/compute/resource_compute_region_network_endpoint_generated_test.go @@ -69,7 +69,7 @@ func TestAccComputeRegionNetworkEndpoint_regionNetworkEndpointInternetIpPortExam ResourceName: "google_compute_region_network_endpoint.region-internet-ip-port-endpoint", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"region", "region_network_endpoint_group"}, + ImportStateVerifyIgnore: []string{"instance", "region", "region_network_endpoint_group"}, }, { ResourceName: "google_compute_region_network_endpoint.region-internet-ip-port-endpoint", @@ -126,7 +126,7 @@ func TestAccComputeRegionNetworkEndpoint_regionNetworkEndpointInternetFqdnPortEx ResourceName: "google_compute_region_network_endpoint.region-internet-fqdn-port-endpoint", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"region", "region_network_endpoint_group"}, + ImportStateVerifyIgnore: []string{"instance", "region", "region_network_endpoint_group"}, }, { ResourceName: "google_compute_region_network_endpoint.region-internet-fqdn-port-endpoint", diff --git a/google/services/compute/resource_compute_region_network_endpoint_group_generated_meta.yaml b/google/services/compute/resource_compute_region_network_endpoint_group_generated_meta.yaml index b9ac4a4c899..2839692abd5 100644 --- a/google/services/compute/resource_compute_region_network_endpoint_group_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_network_endpoint_group_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_compute_region_network_endpoint_group' -generation_type: 'mmv1' -source_file: 'products/compute/RegionNetworkEndpointGroup.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkEndpointGroup' +resource: google_compute_region_network_endpoint_group +generation_type: mmv1 +source_file: products/compute/RegionNetworkEndpointGroup.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkEndpointGroup fields: - - api_field: 'appEngine.service' - - api_field: 'appEngine.urlMask' - - api_field: 'appEngine.version' - - api_field: 'cloudFunction.function' - - api_field: 'cloudFunction.urlMask' - - api_field: 'cloudRun.service' - - api_field: 'cloudRun.tag' - - api_field: 'cloudRun.urlMask' - - api_field: 'description' - - api_field: 'name' - - api_field: 'network' - - api_field: 'networkEndpointType' - - api_field: 'pscData.producerPort' - - api_field: 'pscTargetService' - - api_field: 'region' - - api_field: 'subnetwork' - - api_field: 'selfLink' + - api_field: appEngine.service + - api_field: appEngine.urlMask + - api_field: appEngine.version + - api_field: cloudFunction.function + - api_field: cloudFunction.urlMask + - api_field: cloudRun.service + - api_field: cloudRun.tag + - api_field: cloudRun.urlMask + - api_field: description + - api_field: name + - api_field: network + - api_field: networkEndpointType + - api_field: pscData.producerPort + - api_field: pscTargetService + - api_field: region + - api_field: subnetwork + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_network_firewall_policy_association_generated_meta.yaml b/google/services/compute/resource_compute_region_network_firewall_policy_association_generated_meta.yaml index 3dda75761a5..f9a76f4fc53 100644 --- a/google/services/compute/resource_compute_region_network_firewall_policy_association_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_network_firewall_policy_association_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_compute_region_network_firewall_policy_association' -generation_type: 'mmv1' -source_file: 'products/compute/RegionNetworkFirewallPolicyAssociation.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_region_network_firewall_policy_association +generation_type: mmv1 +source_file: products/compute/RegionNetworkFirewallPolicyAssociation.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'associations.attachmentTarget' - field: 'attachment_target' - - field: 'firewall_policy' - provider_only: true - - api_field: 'associations.name' - field: 'name' - - field: 'region' - provider_only: true - - api_field: 'associations.shortName' - field: 'short_name' + - api_field: associations.attachmentTarget + field: attachment_target + - field: firewall_policy + provider_only: true + - api_field: associations.name + field: name + - field: region + provider_only: true + - api_field: associations.shortName + field: short_name diff --git a/google/services/compute/resource_compute_region_network_firewall_policy_generated_meta.yaml b/google/services/compute/resource_compute_region_network_firewall_policy_generated_meta.yaml index 5f76b7dfab7..331d23a2786 100644 --- a/google/services/compute/resource_compute_region_network_firewall_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_network_firewall_policy_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_compute_region_network_firewall_policy' -generation_type: 'mmv1' -source_file: 'products/compute/RegionNetworkFirewallPolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_region_network_firewall_policy +generation_type: mmv1 +source_file: products/compute/RegionNetworkFirewallPolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'name' - - api_field: 'policyType' - - field: 'region' - provider_only: true - - api_field: 'id' - field: 'region_network_firewall_policy_id' - - api_field: 'ruleTupleCount' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: name + - api_field: policyType + - field: region + provider_only: true + - api_field: id + field: region_network_firewall_policy_id + - api_field: ruleTupleCount + - api_field: selfLink + - api_field: selfLinkWithId diff --git a/google/services/compute/resource_compute_region_network_firewall_policy_rule_generated_meta.yaml b/google/services/compute/resource_compute_region_network_firewall_policy_rule_generated_meta.yaml index 0f0e8089b95..f006dec6688 100644 --- a/google/services/compute/resource_compute_region_network_firewall_policy_rule_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_network_firewall_policy_rule_generated_meta.yaml @@ -1,69 +1,69 @@ -resource: 'google_compute_region_network_firewall_policy_rule' -generation_type: 'mmv1' -source_file: 'products/compute/RegionNetworkFirewallPolicyRule.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_region_network_firewall_policy_rule +generation_type: mmv1 +source_file: products/compute/RegionNetworkFirewallPolicyRule.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'rules.action' - field: 'action' - - api_field: 'rules.creationTimestamp' - field: 'creation_timestamp' - - api_field: 'rules.description' - field: 'description' - - api_field: 'rules.direction' - field: 'direction' - - api_field: 'rules.disabled' - field: 'disabled' - - api_field: 'rules.enableLogging' - field: 'enable_logging' - - field: 'firewall_policy' - provider_only: true - - api_field: 'rules.kind' - field: 'kind' - - api_field: 'rules.match.destAddressGroups' - field: 'match.dest_address_groups' - - api_field: 'rules.match.destFqdns' - field: 'match.dest_fqdns' - - api_field: 'rules.match.destIpRanges' - field: 'match.dest_ip_ranges' - - api_field: 'rules.match.destRegionCodes' - field: 'match.dest_region_codes' - - api_field: 'rules.match.destThreatIntelligences' - field: 'match.dest_threat_intelligences' - - api_field: 'rules.match.layer4Configs.ipProtocol' - field: 'match.layer4_configs.ip_protocol' - - api_field: 'rules.match.layer4Configs.ports' - field: 'match.layer4_configs.ports' - - api_field: 'rules.match.srcAddressGroups' - field: 'match.src_address_groups' - - api_field: 'rules.match.srcFqdns' - field: 'match.src_fqdns' - - api_field: 'rules.match.srcIpRanges' - field: 'match.src_ip_ranges' - - api_field: 'rules.match.srcRegionCodes' - field: 'match.src_region_codes' - - api_field: 'rules.match.srcSecureTags.name' - field: 'match.src_secure_tags.name' - - api_field: 'rules.match.srcSecureTags.state' - field: 'match.src_secure_tags.state' - - api_field: 'rules.match.srcThreatIntelligences' - field: 'match.src_threat_intelligences' - - api_field: 'rules.priority' - field: 'priority' - - field: 'region' - provider_only: true - - api_field: 'rules.ruleName' - field: 'rule_name' - - api_field: 'rules.ruleTupleCount' - field: 'rule_tuple_count' - - api_field: 'rules.securityProfileGroup' - field: 'security_profile_group' - - api_field: 'rules.targetSecureTags.name' - field: 'target_secure_tags.name' - - api_field: 'rules.targetSecureTags.state' - field: 'target_secure_tags.state' - - api_field: 'rules.targetServiceAccounts' - field: 'target_service_accounts' - - api_field: 'rules.tlsInspect' - field: 'tls_inspect' + - api_field: rules.action + field: action + - api_field: rules.creationTimestamp + field: creation_timestamp + - api_field: rules.description + field: description + - api_field: rules.direction + field: direction + - api_field: rules.disabled + field: disabled + - api_field: rules.enableLogging + field: enable_logging + - field: firewall_policy + provider_only: true + - api_field: rules.kind + field: kind + - api_field: rules.match.destAddressGroups + field: match.dest_address_groups + - api_field: rules.match.destFqdns + field: match.dest_fqdns + - api_field: rules.match.destIpRanges + field: match.dest_ip_ranges + - api_field: rules.match.destRegionCodes + field: match.dest_region_codes + - api_field: rules.match.destThreatIntelligences + field: match.dest_threat_intelligences + - api_field: rules.match.layer4Configs.ipProtocol + field: match.layer4_configs.ip_protocol + - api_field: rules.match.layer4Configs.ports + field: match.layer4_configs.ports + - api_field: rules.match.srcAddressGroups + field: match.src_address_groups + - api_field: rules.match.srcFqdns + field: match.src_fqdns + - api_field: rules.match.srcIpRanges + field: match.src_ip_ranges + - api_field: rules.match.srcRegionCodes + field: match.src_region_codes + - api_field: rules.match.srcSecureTags.name + field: match.src_secure_tags.name + - api_field: rules.match.srcSecureTags.state + field: match.src_secure_tags.state + - api_field: rules.match.srcThreatIntelligences + field: match.src_threat_intelligences + - api_field: rules.priority + field: priority + - field: region + provider_only: true + - api_field: rules.ruleName + field: rule_name + - api_field: rules.ruleTupleCount + field: rule_tuple_count + - api_field: rules.securityProfileGroup + field: security_profile_group + - api_field: rules.targetSecureTags.name + field: target_secure_tags.name + - api_field: rules.targetSecureTags.state + field: target_secure_tags.state + - api_field: rules.targetServiceAccounts + field: target_service_accounts + - api_field: rules.tlsInspect + field: tls_inspect diff --git a/google/services/compute/resource_compute_region_network_firewall_policy_with_rules_generated_meta.yaml b/google/services/compute/resource_compute_region_network_firewall_policy_with_rules_generated_meta.yaml index 4c3d59724fc..307a48c33cf 100644 --- a/google/services/compute/resource_compute_region_network_firewall_policy_with_rules_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_network_firewall_policy_with_rules_generated_meta.yaml @@ -1,103 +1,103 @@ -resource: 'google_compute_region_network_firewall_policy_with_rules' -generation_type: 'mmv1' -source_file: 'products/compute/RegionNetworkFirewallPolicyWithRules.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallPolicy' +resource: google_compute_region_network_firewall_policy_with_rules +generation_type: mmv1 +source_file: products/compute/RegionNetworkFirewallPolicyWithRules.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'name' - - api_field: 'id' - field: 'network_firewall_policy_id' - - api_field: 'policyType' - - api_field: 'predefinedRules.action' - - api_field: 'predefinedRules.description' - - api_field: 'predefinedRules.direction' - - api_field: 'predefinedRules.disabled' - - api_field: 'predefinedRules.enableLogging' - - api_field: 'predefinedRules.match.destAddressGroups' - - api_field: 'predefinedRules.match.destFqdns' - - api_field: 'predefinedRules.match.destIpRanges' - - api_field: 'predefinedRules.match.destRegionCodes' - - api_field: 'predefinedRules.match.destThreatIntelligences' - - api_field: 'predefinedRules.match.layer4Configs.ipProtocol' - field: 'predefined_rules.match.layer4_config.ip_protocol' - - api_field: 'predefinedRules.match.layer4Configs.ports' - field: 'predefined_rules.match.layer4_config.ports' - - api_field: 'predefinedRules.match.srcAddressGroups' - - api_field: 'predefinedRules.match.srcFqdns' - - api_field: 'predefinedRules.match.srcIpRanges' - - api_field: 'predefinedRules.match.srcRegionCodes' - - api_field: 'predefinedRules.match.srcSecureTags.name' - field: 'predefined_rules.match.src_secure_tag.name' - - api_field: 'predefinedRules.match.srcSecureTags.state' - field: 'predefined_rules.match.src_secure_tag.state' - - api_field: 'predefinedRules.match.srcThreatIntelligences' - - api_field: 'predefinedRules.priority' - - api_field: 'predefinedRules.ruleName' - - api_field: 'predefinedRules.securityProfileGroup' - - api_field: 'predefinedRules.targetSecureTags.name' - field: 'predefined_rules.target_secure_tag.name' - - api_field: 'predefinedRules.targetSecureTags.state' - field: 'predefined_rules.target_secure_tag.state' - - api_field: 'predefinedRules.targetServiceAccounts' - - api_field: 'predefinedRules.tlsInspect' - - field: 'region' - provider_only: true - - api_field: 'rules.action' - field: 'rule.action' - - api_field: 'rules.description' - field: 'rule.description' - - api_field: 'rules.direction' - field: 'rule.direction' - - api_field: 'rules.disabled' - field: 'rule.disabled' - - api_field: 'rules.enableLogging' - field: 'rule.enable_logging' - - api_field: 'rules.match.destAddressGroups' - field: 'rule.match.dest_address_groups' - - api_field: 'rules.match.destFqdns' - field: 'rule.match.dest_fqdns' - - api_field: 'rules.match.destIpRanges' - field: 'rule.match.dest_ip_ranges' - - api_field: 'rules.match.destRegionCodes' - field: 'rule.match.dest_region_codes' - - api_field: 'rules.match.destThreatIntelligences' - field: 'rule.match.dest_threat_intelligences' - - api_field: 'rules.match.layer4Configs.ipProtocol' - field: 'rule.match.layer4_config.ip_protocol' - - api_field: 'rules.match.layer4Configs.ports' - field: 'rule.match.layer4_config.ports' - - api_field: 'rules.match.srcAddressGroups' - field: 'rule.match.src_address_groups' - - api_field: 'rules.match.srcFqdns' - field: 'rule.match.src_fqdns' - - api_field: 'rules.match.srcIpRanges' - field: 'rule.match.src_ip_ranges' - - api_field: 'rules.match.srcRegionCodes' - field: 'rule.match.src_region_codes' - - api_field: 'rules.match.srcSecureTags.name' - field: 'rule.match.src_secure_tag.name' - - api_field: 'rules.match.srcSecureTags.state' - field: 'rule.match.src_secure_tag.state' - - api_field: 'rules.match.srcThreatIntelligences' - field: 'rule.match.src_threat_intelligences' - - api_field: 'rules.priority' - field: 'rule.priority' - - api_field: 'rules.ruleName' - field: 'rule.rule_name' - - api_field: 'rules.securityProfileGroup' - field: 'rule.security_profile_group' - - api_field: 'rules.targetSecureTags.name' - field: 'rule.target_secure_tag.name' - - api_field: 'rules.targetSecureTags.state' - field: 'rule.target_secure_tag.state' - - api_field: 'rules.targetServiceAccounts' - field: 'rule.target_service_accounts' - - api_field: 'rules.tlsInspect' - field: 'rule.tls_inspect' - - api_field: 'ruleTupleCount' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: name + - api_field: id + field: network_firewall_policy_id + - api_field: policyType + - api_field: predefinedRules.action + - api_field: predefinedRules.description + - api_field: predefinedRules.direction + - api_field: predefinedRules.disabled + - api_field: predefinedRules.enableLogging + - api_field: predefinedRules.match.destAddressGroups + - api_field: predefinedRules.match.destFqdns + - api_field: predefinedRules.match.destIpRanges + - api_field: predefinedRules.match.destRegionCodes + - api_field: predefinedRules.match.destThreatIntelligences + - api_field: predefinedRules.match.layer4Configs.ipProtocol + field: predefined_rules.match.layer4_config.ip_protocol + - api_field: predefinedRules.match.layer4Configs.ports + field: predefined_rules.match.layer4_config.ports + - api_field: predefinedRules.match.srcAddressGroups + - api_field: predefinedRules.match.srcFqdns + - api_field: predefinedRules.match.srcIpRanges + - api_field: predefinedRules.match.srcRegionCodes + - api_field: predefinedRules.match.srcSecureTags.name + field: predefined_rules.match.src_secure_tag.name + - api_field: predefinedRules.match.srcSecureTags.state + field: predefined_rules.match.src_secure_tag.state + - api_field: predefinedRules.match.srcThreatIntelligences + - api_field: predefinedRules.priority + - api_field: predefinedRules.ruleName + - api_field: predefinedRules.securityProfileGroup + - api_field: predefinedRules.targetSecureTags.name + field: predefined_rules.target_secure_tag.name + - api_field: predefinedRules.targetSecureTags.state + field: predefined_rules.target_secure_tag.state + - api_field: predefinedRules.targetServiceAccounts + - api_field: predefinedRules.tlsInspect + - field: region + provider_only: true + - api_field: rules.action + field: rule.action + - api_field: rules.description + field: rule.description + - api_field: rules.direction + field: rule.direction + - api_field: rules.disabled + field: rule.disabled + - api_field: rules.enableLogging + field: rule.enable_logging + - api_field: rules.match.destAddressGroups + field: rule.match.dest_address_groups + - api_field: rules.match.destFqdns + field: rule.match.dest_fqdns + - api_field: rules.match.destIpRanges + field: rule.match.dest_ip_ranges + - api_field: rules.match.destRegionCodes + field: rule.match.dest_region_codes + - api_field: rules.match.destThreatIntelligences + field: rule.match.dest_threat_intelligences + - api_field: rules.match.layer4Configs.ipProtocol + field: rule.match.layer4_config.ip_protocol + - api_field: rules.match.layer4Configs.ports + field: rule.match.layer4_config.ports + - api_field: rules.match.srcAddressGroups + field: rule.match.src_address_groups + - api_field: rules.match.srcFqdns + field: rule.match.src_fqdns + - api_field: rules.match.srcIpRanges + field: rule.match.src_ip_ranges + - api_field: rules.match.srcRegionCodes + field: rule.match.src_region_codes + - api_field: rules.match.srcSecureTags.name + field: rule.match.src_secure_tag.name + - api_field: rules.match.srcSecureTags.state + field: rule.match.src_secure_tag.state + - api_field: rules.match.srcThreatIntelligences + field: rule.match.src_threat_intelligences + - api_field: rules.priority + field: rule.priority + - api_field: rules.ruleName + field: rule.rule_name + - api_field: rules.securityProfileGroup + field: rule.security_profile_group + - api_field: rules.targetSecureTags.name + field: rule.target_secure_tag.name + - api_field: rules.targetSecureTags.state + field: rule.target_secure_tag.state + - api_field: rules.targetServiceAccounts + field: rule.target_service_accounts + - api_field: rules.tlsInspect + field: rule.tls_inspect + - api_field: ruleTupleCount + - api_field: selfLink + - api_field: selfLinkWithId diff --git a/google/services/compute/resource_compute_region_per_instance_config_generated_meta.yaml b/google/services/compute/resource_compute_region_per_instance_config_generated_meta.yaml index 241ef38fb18..02dd83ff5cf 100644 --- a/google/services/compute/resource_compute_region_per_instance_config_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_per_instance_config_generated_meta.yaml @@ -1,39 +1,43 @@ -resource: 'google_compute_region_per_instance_config' -generation_type: 'mmv1' -source_file: 'products/compute/RegionPerInstanceConfig.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceGroupManager' +resource: google_compute_region_per_instance_config +generation_type: mmv1 +source_file: products/compute/RegionPerInstanceConfig.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceGroupManager api_variant_patterns: - - 'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}' + - projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager} fields: - - field: 'minimal_action' - provider_only: true - - field: 'most_disruptive_allowed_action' - provider_only: true - - api_field: 'name' - - api_field: 'preservedState.disks.deleteRule' - field: 'preserved_state.disk.delete_rule' - - api_field: 'preservedState.disks.deviceName' - field: 'preserved_state.disk.device_name' - - api_field: 'preservedState.disks.mode' - field: 'preserved_state.disk.mode' - - api_field: 'preservedState.disks.source' - field: 'preserved_state.disk.source' - - api_field: 'preservedState.externalIPs.externalIp.autoDelete' - field: 'preserved_state.external_ip.external_ip.auto_delete' - - api_field: 'preservedState.externalIPs.externalIp.ipAddress.address' - field: 'preserved_state.external_ip.external_ip.ip_address.address' - - api_field: 'preservedState.internalIPs.internalIp.autoDelete' - field: 'preserved_state.internal_ip.internal_ip.auto_delete' - - api_field: 'preservedState.internalIPs.internalIp.ipAddress.address' - field: 'preserved_state.internal_ip.internal_ip.ip_address.address' - - api_field: 'preservedState.metadata' - - field: 'region' - provider_only: true - - field: 'region_instance_group_manager' - provider_only: true - - field: 'remove_instance_on_destroy' - provider_only: true - - field: 'remove_instance_state_on_destroy' - provider_only: true + - field: minimal_action + provider_only: true + - field: most_disruptive_allowed_action + provider_only: true + - api_field: name + - api_field: preservedState.disks.deleteRule + field: preserved_state.disk.delete_rule + - api_field: preservedState.disks.deviceName + field: preserved_state.disk.device_name + - api_field: preservedState.disks.mode + field: preserved_state.disk.mode + - api_field: preservedState.disks.source + field: preserved_state.disk.source + - api_field: preservedState.externalIPs.key + field: preserved_state.external_ip.interface_name + - api_field: preservedState.externalIPs.value.autoDelete + field: preserved_state.external_ip.auto_delete + - api_field: preservedState.externalIPs.value.ipAddress.address + field: preserved_state.external_ip.ip_address.address + - api_field: preservedState.internalIPs.key + field: preserved_state.internal_ip.interface_name + - api_field: preservedState.internalIPs.value.autoDelete + field: preserved_state.internal_ip.auto_delete + - api_field: preservedState.internalIPs.value.ipAddress.address + field: preserved_state.internal_ip.ip_address.address + - api_field: preservedState.metadata + - field: region + provider_only: true + - field: region_instance_group_manager + provider_only: true + - field: remove_instance_on_destroy + provider_only: true + - field: remove_instance_state_on_destroy + provider_only: true diff --git a/google/services/compute/resource_compute_region_security_policy_generated_meta.yaml b/google/services/compute/resource_compute_region_security_policy_generated_meta.yaml index aae1cce2a6b..5fb0787b806 100644 --- a/google/services/compute/resource_compute_region_security_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_security_policy_generated_meta.yaml @@ -1,74 +1,74 @@ -resource: 'google_compute_region_security_policy' -generation_type: 'mmv1' -source_file: 'products/compute/RegionSecurityPolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityPolicy' +resource: google_compute_region_security_policy +generation_type: mmv1 +source_file: products/compute/RegionSecurityPolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityPolicy fields: - - api_field: 'advancedOptionsConfig.jsonCustomConfig.contentTypes' - - api_field: 'advancedOptionsConfig.jsonParsing' - - api_field: 'advancedOptionsConfig.logLevel' - - api_field: 'advancedOptionsConfig.userIpRequestHeaders' - - api_field: 'ddosProtectionConfig.ddosProtection' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'name' - - api_field: 'id' - field: 'policy_id' - - api_field: 'region' - - api_field: 'rules.action' - - api_field: 'rules.description' - - api_field: 'rules.match.config.srcIpRanges' - - api_field: 'rules.match.expr.expression' - - api_field: 'rules.match.versionedExpr' - - api_field: 'rules.networkMatch.destIpRanges' - - api_field: 'rules.networkMatch.destPorts' - - api_field: 'rules.networkMatch.ipProtocols' - - api_field: 'rules.networkMatch.srcAsns' - - api_field: 'rules.networkMatch.srcIpRanges' - - api_field: 'rules.networkMatch.srcPorts' - - api_field: 'rules.networkMatch.srcRegionCodes' - - api_field: 'rules.networkMatch.userDefinedFields.name' - - api_field: 'rules.networkMatch.userDefinedFields.values' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.op' - field: 'rules.preconfigured_waf_config.exclusion.request_cookie.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.val' - field: 'rules.preconfigured_waf_config.exclusion.request_cookie.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.op' - field: 'rules.preconfigured_waf_config.exclusion.request_header.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.val' - field: 'rules.preconfigured_waf_config.exclusion.request_header.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.op' - field: 'rules.preconfigured_waf_config.exclusion.request_query_param.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.val' - field: 'rules.preconfigured_waf_config.exclusion.request_query_param.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.op' - field: 'rules.preconfigured_waf_config.exclusion.request_uri.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.val' - field: 'rules.preconfigured_waf_config.exclusion.request_uri.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleIds' - field: 'rules.preconfigured_waf_config.exclusion.target_rule_ids' - - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleSet' - field: 'rules.preconfigured_waf_config.exclusion.target_rule_set' - - api_field: 'rules.preview' - - api_field: 'rules.priority' - - api_field: 'rules.rateLimitOptions.banDurationSec' - - api_field: 'rules.rateLimitOptions.banThreshold.count' - - api_field: 'rules.rateLimitOptions.banThreshold.intervalSec' - - api_field: 'rules.rateLimitOptions.conformAction' - - api_field: 'rules.rateLimitOptions.enforceOnKey' - - api_field: 'rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyName' - - api_field: 'rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyType' - - api_field: 'rules.rateLimitOptions.enforceOnKeyName' - - api_field: 'rules.rateLimitOptions.exceedAction' - - api_field: 'rules.rateLimitOptions.rateLimitThreshold.count' - - api_field: 'rules.rateLimitOptions.rateLimitThreshold.intervalSec' - - api_field: 'selfLink' - - api_field: 'selfLinkWithId' - field: 'self_link_with_policy_id' - - api_field: 'type' - - api_field: 'userDefinedFields.base' - - api_field: 'userDefinedFields.mask' - - api_field: 'userDefinedFields.name' - - api_field: 'userDefinedFields.offset' - - api_field: 'userDefinedFields.size' + - api_field: advancedOptionsConfig.jsonCustomConfig.contentTypes + - api_field: advancedOptionsConfig.jsonParsing + - api_field: advancedOptionsConfig.logLevel + - api_field: advancedOptionsConfig.userIpRequestHeaders + - api_field: ddosProtectionConfig.ddosProtection + - api_field: description + - api_field: fingerprint + - api_field: name + - api_field: id + field: policy_id + - api_field: region + - api_field: rules.action + - api_field: rules.description + - api_field: rules.match.config.srcIpRanges + - api_field: rules.match.expr.expression + - api_field: rules.match.versionedExpr + - api_field: rules.networkMatch.destIpRanges + - api_field: rules.networkMatch.destPorts + - api_field: rules.networkMatch.ipProtocols + - api_field: rules.networkMatch.srcAsns + - api_field: rules.networkMatch.srcIpRanges + - api_field: rules.networkMatch.srcPorts + - api_field: rules.networkMatch.srcRegionCodes + - api_field: rules.networkMatch.userDefinedFields.name + - api_field: rules.networkMatch.userDefinedFields.values + - api_field: rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.op + field: rules.preconfigured_waf_config.exclusion.request_cookie.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.val + field: rules.preconfigured_waf_config.exclusion.request_cookie.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.op + field: rules.preconfigured_waf_config.exclusion.request_header.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.val + field: rules.preconfigured_waf_config.exclusion.request_header.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.op + field: rules.preconfigured_waf_config.exclusion.request_query_param.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.val + field: rules.preconfigured_waf_config.exclusion.request_query_param.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.op + field: rules.preconfigured_waf_config.exclusion.request_uri.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.val + field: rules.preconfigured_waf_config.exclusion.request_uri.value + - api_field: rules.preconfiguredWafConfig.exclusions.targetRuleIds + field: rules.preconfigured_waf_config.exclusion.target_rule_ids + - api_field: rules.preconfiguredWafConfig.exclusions.targetRuleSet + field: rules.preconfigured_waf_config.exclusion.target_rule_set + - api_field: rules.preview + - api_field: rules.priority + - api_field: rules.rateLimitOptions.banDurationSec + - api_field: rules.rateLimitOptions.banThreshold.count + - api_field: rules.rateLimitOptions.banThreshold.intervalSec + - api_field: rules.rateLimitOptions.conformAction + - api_field: rules.rateLimitOptions.enforceOnKey + - api_field: rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyName + - api_field: rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyType + - api_field: rules.rateLimitOptions.enforceOnKeyName + - api_field: rules.rateLimitOptions.exceedAction + - api_field: rules.rateLimitOptions.rateLimitThreshold.count + - api_field: rules.rateLimitOptions.rateLimitThreshold.intervalSec + - api_field: selfLink + - api_field: selfLinkWithId + field: self_link_with_policy_id + - api_field: type + - api_field: userDefinedFields.base + - api_field: userDefinedFields.mask + - api_field: userDefinedFields.name + - api_field: userDefinedFields.offset + - api_field: userDefinedFields.size diff --git a/google/services/compute/resource_compute_region_security_policy_rule_generated_meta.yaml b/google/services/compute/resource_compute_region_security_policy_rule_generated_meta.yaml index 21d1a9337c6..88a9e9c967c 100644 --- a/google/services/compute/resource_compute_region_security_policy_rule_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_security_policy_rule_generated_meta.yaml @@ -1,85 +1,85 @@ -resource: 'google_compute_region_security_policy_rule' -generation_type: 'mmv1' -source_file: 'products/compute/RegionSecurityPolicyRule.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityPolicy' +resource: google_compute_region_security_policy_rule +generation_type: mmv1 +source_file: products/compute/RegionSecurityPolicyRule.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityPolicy fields: - - api_field: 'rules.action' - field: 'action' - - api_field: 'rules.description' - field: 'description' - - api_field: 'rules.match.config.srcIpRanges' - field: 'match.config.src_ip_ranges' - - api_field: 'rules.match.expr.expression' - field: 'match.expr.expression' - - api_field: 'rules.match.versionedExpr' - field: 'match.versioned_expr' - - api_field: 'rules.networkMatch.destIpRanges' - field: 'network_match.dest_ip_ranges' - - api_field: 'rules.networkMatch.destPorts' - field: 'network_match.dest_ports' - - api_field: 'rules.networkMatch.ipProtocols' - field: 'network_match.ip_protocols' - - api_field: 'rules.networkMatch.srcAsns' - field: 'network_match.src_asns' - - api_field: 'rules.networkMatch.srcIpRanges' - field: 'network_match.src_ip_ranges' - - api_field: 'rules.networkMatch.srcPorts' - field: 'network_match.src_ports' - - api_field: 'rules.networkMatch.srcRegionCodes' - field: 'network_match.src_region_codes' - - api_field: 'rules.networkMatch.userDefinedFields.name' - field: 'network_match.user_defined_fields.name' - - api_field: 'rules.networkMatch.userDefinedFields.values' - field: 'network_match.user_defined_fields.values' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_cookie.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_cookie.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_header.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_header.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_query_param.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_query_param.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_uri.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_uri.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleIds' - field: 'preconfigured_waf_config.exclusion.target_rule_ids' - - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleSet' - field: 'preconfigured_waf_config.exclusion.target_rule_set' - - api_field: 'rules.preview' - field: 'preview' - - api_field: 'rules.priority' - field: 'priority' - - api_field: 'rules.rateLimitOptions.banDurationSec' - field: 'rate_limit_options.ban_duration_sec' - - api_field: 'rules.rateLimitOptions.banThreshold.count' - field: 'rate_limit_options.ban_threshold.count' - - api_field: 'rules.rateLimitOptions.banThreshold.intervalSec' - field: 'rate_limit_options.ban_threshold.interval_sec' - - api_field: 'rules.rateLimitOptions.conformAction' - field: 'rate_limit_options.conform_action' - - api_field: 'rules.rateLimitOptions.enforceOnKey' - field: 'rate_limit_options.enforce_on_key' - - api_field: 'rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyName' - field: 'rate_limit_options.enforce_on_key_configs.enforce_on_key_name' - - api_field: 'rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyType' - field: 'rate_limit_options.enforce_on_key_configs.enforce_on_key_type' - - api_field: 'rules.rateLimitOptions.enforceOnKeyName' - field: 'rate_limit_options.enforce_on_key_name' - - api_field: 'rules.rateLimitOptions.exceedAction' - field: 'rate_limit_options.exceed_action' - - api_field: 'rules.rateLimitOptions.rateLimitThreshold.count' - field: 'rate_limit_options.rate_limit_threshold.count' - - api_field: 'rules.rateLimitOptions.rateLimitThreshold.intervalSec' - field: 'rate_limit_options.rate_limit_threshold.interval_sec' - - field: 'region' - provider_only: true - - field: 'security_policy' - provider_only: true + - api_field: rules.action + field: action + - api_field: rules.description + field: description + - api_field: rules.match.config.srcIpRanges + field: match.config.src_ip_ranges + - api_field: rules.match.expr.expression + field: match.expr.expression + - api_field: rules.match.versionedExpr + field: match.versioned_expr + - api_field: rules.networkMatch.destIpRanges + field: network_match.dest_ip_ranges + - api_field: rules.networkMatch.destPorts + field: network_match.dest_ports + - api_field: rules.networkMatch.ipProtocols + field: network_match.ip_protocols + - api_field: rules.networkMatch.srcAsns + field: network_match.src_asns + - api_field: rules.networkMatch.srcIpRanges + field: network_match.src_ip_ranges + - api_field: rules.networkMatch.srcPorts + field: network_match.src_ports + - api_field: rules.networkMatch.srcRegionCodes + field: network_match.src_region_codes + - api_field: rules.networkMatch.userDefinedFields.name + field: network_match.user_defined_fields.name + - api_field: rules.networkMatch.userDefinedFields.values + field: network_match.user_defined_fields.values + - api_field: rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.op + field: preconfigured_waf_config.exclusion.request_cookie.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.val + field: preconfigured_waf_config.exclusion.request_cookie.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.op + field: preconfigured_waf_config.exclusion.request_header.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.val + field: preconfigured_waf_config.exclusion.request_header.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.op + field: preconfigured_waf_config.exclusion.request_query_param.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.val + field: preconfigured_waf_config.exclusion.request_query_param.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.op + field: preconfigured_waf_config.exclusion.request_uri.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.val + field: preconfigured_waf_config.exclusion.request_uri.value + - api_field: rules.preconfiguredWafConfig.exclusions.targetRuleIds + field: preconfigured_waf_config.exclusion.target_rule_ids + - api_field: rules.preconfiguredWafConfig.exclusions.targetRuleSet + field: preconfigured_waf_config.exclusion.target_rule_set + - api_field: rules.preview + field: preview + - api_field: rules.priority + field: priority + - api_field: rules.rateLimitOptions.banDurationSec + field: rate_limit_options.ban_duration_sec + - api_field: rules.rateLimitOptions.banThreshold.count + field: rate_limit_options.ban_threshold.count + - api_field: rules.rateLimitOptions.banThreshold.intervalSec + field: rate_limit_options.ban_threshold.interval_sec + - api_field: rules.rateLimitOptions.conformAction + field: rate_limit_options.conform_action + - api_field: rules.rateLimitOptions.enforceOnKey + field: rate_limit_options.enforce_on_key + - api_field: rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyName + field: rate_limit_options.enforce_on_key_configs.enforce_on_key_name + - api_field: rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyType + field: rate_limit_options.enforce_on_key_configs.enforce_on_key_type + - api_field: rules.rateLimitOptions.enforceOnKeyName + field: rate_limit_options.enforce_on_key_name + - api_field: rules.rateLimitOptions.exceedAction + field: rate_limit_options.exceed_action + - api_field: rules.rateLimitOptions.rateLimitThreshold.count + field: rate_limit_options.rate_limit_threshold.count + - api_field: rules.rateLimitOptions.rateLimitThreshold.intervalSec + field: rate_limit_options.rate_limit_threshold.interval_sec + - field: region + provider_only: true + - field: security_policy + provider_only: true diff --git a/google/services/compute/resource_compute_region_ssl_certificate_generated_meta.yaml b/google/services/compute/resource_compute_region_ssl_certificate_generated_meta.yaml index 825c23e7eed..1249b6075c4 100644 --- a/google/services/compute/resource_compute_region_ssl_certificate_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_ssl_certificate_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_compute_region_ssl_certificate' -generation_type: 'mmv1' -source_file: 'products/compute/RegionSslCertificate.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SslCertificate' +resource: google_compute_region_ssl_certificate +generation_type: mmv1 +source_file: products/compute/RegionSslCertificate.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SslCertificate fields: - - api_field: 'certificate' - - api_field: 'id' - field: 'certificate_id' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'expireTime' - - api_field: 'name' - - api_field: 'privateKey' - - api_field: 'region' - - api_field: 'selfLink' + - api_field: certificate + - api_field: id + field: certificate_id + - api_field: creationTimestamp + - api_field: description + - api_field: expireTime + - api_field: name + - api_field: privateKey + - api_field: region + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_ssl_policy_generated_meta.yaml b/google/services/compute/resource_compute_region_ssl_policy_generated_meta.yaml index 94f6de2d9ba..9b3700443a5 100644 --- a/google/services/compute/resource_compute_region_ssl_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_ssl_policy_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_compute_region_ssl_policy' -generation_type: 'mmv1' -source_file: 'products/compute/RegionSslPolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SslPolicy' +resource: google_compute_region_ssl_policy +generation_type: mmv1 +source_file: products/compute/RegionSslPolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SslPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'customFeatures' - - api_field: 'description' - - api_field: 'enabledFeatures' - - api_field: 'fingerprint' - - api_field: 'minTlsVersion' - - api_field: 'name' - - api_field: 'profile' - - api_field: 'region' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: customFeatures + - api_field: description + - api_field: enabledFeatures + - api_field: fingerprint + - api_field: minTlsVersion + - api_field: name + - api_field: profile + - api_field: region + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_target_http_proxy_generated_meta.yaml b/google/services/compute/resource_compute_region_target_http_proxy_generated_meta.yaml index 8a260dcc6bf..40fa461bc14 100644 --- a/google/services/compute/resource_compute_region_target_http_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_target_http_proxy_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_compute_region_target_http_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/RegionTargetHttpProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetHttpProxy' +resource: google_compute_region_target_http_proxy +generation_type: mmv1 +source_file: products/compute/RegionTargetHttpProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetHttpProxy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'httpKeepAliveTimeoutSec' - - api_field: 'name' - - api_field: 'id' - field: 'proxy_id' - - api_field: 'region' - - api_field: 'urlMap' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: description + - api_field: httpKeepAliveTimeoutSec + - api_field: name + - api_field: id + field: proxy_id + - api_field: region + - api_field: urlMap + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_target_https_proxy_generated_meta.yaml b/google/services/compute/resource_compute_region_target_https_proxy_generated_meta.yaml index 92df5ed0901..df6a1c37d45 100644 --- a/google/services/compute/resource_compute_region_target_https_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_target_https_proxy_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_compute_region_target_https_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/RegionTargetHttpsProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetHttpsProxy' +resource: google_compute_region_target_https_proxy +generation_type: mmv1 +source_file: products/compute/RegionTargetHttpsProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetHttpsProxy fields: - - api_field: 'certificateManagerCertificates' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'httpKeepAliveTimeoutSec' - - api_field: 'name' - - api_field: 'id' - field: 'proxy_id' - - api_field: 'region' - - api_field: 'serverTlsPolicy' - - api_field: 'sslCertificates' - - api_field: 'sslPolicy' - - api_field: 'urlMap' - - api_field: 'selfLink' + - api_field: certificateManagerCertificates + - api_field: creationTimestamp + - api_field: description + - api_field: httpKeepAliveTimeoutSec + - api_field: name + - api_field: id + field: proxy_id + - api_field: region + - api_field: serverTlsPolicy + - api_field: sslCertificates + - api_field: sslPolicy + - api_field: urlMap + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_target_tcp_proxy_generated_meta.yaml b/google/services/compute/resource_compute_region_target_tcp_proxy_generated_meta.yaml index 0acdef4a2b1..d1ff9e9f0e1 100644 --- a/google/services/compute/resource_compute_region_target_tcp_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_target_tcp_proxy_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_compute_region_target_tcp_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/RegionTargetTcpProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetTcpProxy' +resource: google_compute_region_target_tcp_proxy +generation_type: mmv1 +source_file: products/compute/RegionTargetTcpProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetTcpProxy fields: - - api_field: 'service' - field: 'backend_service' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'name' - - api_field: 'proxyBind' - - api_field: 'proxyHeader' - - api_field: 'id' - field: 'proxy_id' - - api_field: 'region' - - api_field: 'selfLink' + - api_field: service + field: backend_service + - api_field: creationTimestamp + - api_field: description + - api_field: name + - api_field: proxyBind + - api_field: proxyHeader + - api_field: id + field: proxy_id + - api_field: region + - api_field: selfLink diff --git a/google/services/compute/resource_compute_region_url_map_generated_meta.yaml b/google/services/compute/resource_compute_region_url_map_generated_meta.yaml index a2b1d312a9e..73b9e534fdc 100644 --- a/google/services/compute/resource_compute_region_url_map_generated_meta.yaml +++ b/google/services/compute/resource_compute_region_url_map_generated_meta.yaml @@ -1,400 +1,400 @@ -resource: 'google_compute_region_url_map' -generation_type: 'mmv1' -source_file: 'products/compute/RegionUrlMap.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'UrlMap' +resource: google_compute_region_url_map +generation_type: mmv1 +source_file: products/compute/RegionUrlMap.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: UrlMap fields: - - api_field: 'creationTimestamp' - - api_field: 'defaultRouteAction.corsPolicy.allowCredentials' - - api_field: 'defaultRouteAction.corsPolicy.allowHeaders' - - api_field: 'defaultRouteAction.corsPolicy.allowMethods' - - api_field: 'defaultRouteAction.corsPolicy.allowOriginRegexes' - - api_field: 'defaultRouteAction.corsPolicy.allowOrigins' - - api_field: 'defaultRouteAction.corsPolicy.disabled' - - api_field: 'defaultRouteAction.corsPolicy.exposeHeaders' - - api_field: 'defaultRouteAction.corsPolicy.maxAge' - - api_field: 'defaultRouteAction.faultInjectionPolicy.abort.httpStatus' - - api_field: 'defaultRouteAction.faultInjectionPolicy.abort.percentage' - - api_field: 'defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos' - - api_field: 'defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds' - - api_field: 'defaultRouteAction.faultInjectionPolicy.delay.percentage' - - api_field: 'defaultRouteAction.requestMirrorPolicy.backendService' - - api_field: 'defaultRouteAction.retryPolicy.numRetries' - - api_field: 'defaultRouteAction.retryPolicy.perTryTimeout.nanos' - - api_field: 'defaultRouteAction.retryPolicy.perTryTimeout.seconds' - - api_field: 'defaultRouteAction.retryPolicy.retryConditions' - - api_field: 'defaultRouteAction.timeout.nanos' - - api_field: 'defaultRouteAction.timeout.seconds' - - api_field: 'defaultRouteAction.urlRewrite.hostRewrite' - - api_field: 'defaultRouteAction.urlRewrite.pathPrefixRewrite' - - api_field: 'defaultRouteAction.weightedBackendServices.backendService' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove' - - api_field: 'defaultRouteAction.weightedBackendServices.weight' - - api_field: 'defaultService' - - api_field: 'defaultUrlRedirect.hostRedirect' - - api_field: 'defaultUrlRedirect.httpsRedirect' - - api_field: 'defaultUrlRedirect.pathRedirect' - - api_field: 'defaultUrlRedirect.prefixRedirect' - - api_field: 'defaultUrlRedirect.redirectResponseCode' - - api_field: 'defaultUrlRedirect.stripQuery' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'headerAction.requestHeadersToAdd.headerName' - - api_field: 'headerAction.requestHeadersToAdd.headerValue' - - api_field: 'headerAction.requestHeadersToAdd.replace' - - api_field: 'headerAction.requestHeadersToRemove' - - api_field: 'headerAction.responseHeadersToAdd.headerName' - - api_field: 'headerAction.responseHeadersToAdd.headerValue' - - api_field: 'headerAction.responseHeadersToAdd.replace' - - api_field: 'headerAction.responseHeadersToRemove' - - api_field: 'hostRules.description' - field: 'host_rule.description' - - api_field: 'hostRules.hosts' - field: 'host_rule.hosts' - - api_field: 'hostRules.pathMatcher' - field: 'host_rule.path_matcher' - - api_field: 'id' - field: 'map_id' - - api_field: 'name' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowCredentials' - field: 'path_matcher.default_route_action.cors_policy.allow_credentials' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowHeaders' - field: 'path_matcher.default_route_action.cors_policy.allow_headers' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowMethods' - field: 'path_matcher.default_route_action.cors_policy.allow_methods' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowOriginRegexes' - field: 'path_matcher.default_route_action.cors_policy.allow_origin_regexes' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowOrigins' - field: 'path_matcher.default_route_action.cors_policy.allow_origins' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.disabled' - field: 'path_matcher.default_route_action.cors_policy.disabled' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.exposeHeaders' - field: 'path_matcher.default_route_action.cors_policy.expose_headers' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.maxAge' - field: 'path_matcher.default_route_action.cors_policy.max_age' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.httpStatus' - field: 'path_matcher.default_route_action.fault_injection_policy.abort.http_status' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.percentage' - field: 'path_matcher.default_route_action.fault_injection_policy.abort.percentage' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos' - field: 'path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.nanos' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds' - field: 'path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.seconds' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.percentage' - field: 'path_matcher.default_route_action.fault_injection_policy.delay.percentage' - - api_field: 'pathMatchers.defaultRouteAction.maxStreamDuration.nanos' - field: 'path_matcher.default_route_action.max_stream_duration.nanos' - - api_field: 'pathMatchers.defaultRouteAction.maxStreamDuration.seconds' - field: 'path_matcher.default_route_action.max_stream_duration.seconds' - - api_field: 'pathMatchers.defaultRouteAction.requestMirrorPolicy.backendService' - field: 'path_matcher.default_route_action.request_mirror_policy.backend_service' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.numRetries' - field: 'path_matcher.default_route_action.retry_policy.num_retries' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.nanos' - field: 'path_matcher.default_route_action.retry_policy.per_try_timeout.nanos' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.seconds' - field: 'path_matcher.default_route_action.retry_policy.per_try_timeout.seconds' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.retryConditions' - field: 'path_matcher.default_route_action.retry_policy.retry_conditions' - - api_field: 'pathMatchers.defaultRouteAction.timeout.nanos' - field: 'path_matcher.default_route_action.timeout.nanos' - - api_field: 'pathMatchers.defaultRouteAction.timeout.seconds' - field: 'path_matcher.default_route_action.timeout.seconds' - - api_field: 'pathMatchers.defaultRouteAction.urlRewrite.hostRewrite' - field: 'path_matcher.default_route_action.url_rewrite.host_rewrite' - - api_field: 'pathMatchers.defaultRouteAction.urlRewrite.pathPrefixRewrite' - field: 'path_matcher.default_route_action.url_rewrite.path_prefix_rewrite' - - api_field: 'pathMatchers.defaultRouteAction.urlRewrite.pathTemplateRewrite' - field: 'path_matcher.default_route_action.url_rewrite.path_template_rewrite' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.backendService' - field: 'path_matcher.default_route_action.weighted_backend_services.backend_service' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.weight' - field: 'path_matcher.default_route_action.weighted_backend_services.weight' - - api_field: 'pathMatchers.defaultService' - field: 'path_matcher.default_service' - - api_field: 'pathMatchers.defaultUrlRedirect.hostRedirect' - field: 'path_matcher.default_url_redirect.host_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.httpsRedirect' - field: 'path_matcher.default_url_redirect.https_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.pathRedirect' - field: 'path_matcher.default_url_redirect.path_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.prefixRedirect' - field: 'path_matcher.default_url_redirect.prefix_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.redirectResponseCode' - field: 'path_matcher.default_url_redirect.redirect_response_code' - - api_field: 'pathMatchers.defaultUrlRedirect.stripQuery' - field: 'path_matcher.default_url_redirect.strip_query' - - api_field: 'pathMatchers.description' - field: 'path_matcher.description' - - api_field: 'pathMatchers.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.headerAction.requestHeadersToRemove' - field: 'path_matcher.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.headerAction.responseHeadersToRemove' - field: 'path_matcher.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.name' - field: 'path_matcher.name' - - api_field: 'pathMatchers.pathRules.paths' - field: 'path_matcher.path_rule.paths' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowCredentials' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_credentials' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowHeaders' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_headers' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowMethods' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_methods' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowOriginRegexes' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_origin_regexes' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowOrigins' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_origins' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.disabled' - field: 'path_matcher.path_rule.route_action.cors_policy.disabled' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.exposeHeaders' - field: 'path_matcher.path_rule.route_action.cors_policy.expose_headers' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.maxAge' - field: 'path_matcher.path_rule.route_action.cors_policy.max_age' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.httpStatus' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.abort.http_status' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.percentage' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.abort.percentage' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.nanos' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.seconds' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.percentage' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.delay.percentage' - - api_field: 'pathMatchers.pathRules.routeAction.requestMirrorPolicy.backendService' - field: 'path_matcher.path_rule.route_action.request_mirror_policy.backend_service' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.numRetries' - field: 'path_matcher.path_rule.route_action.retry_policy.num_retries' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.nanos' - field: 'path_matcher.path_rule.route_action.retry_policy.per_try_timeout.nanos' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.seconds' - field: 'path_matcher.path_rule.route_action.retry_policy.per_try_timeout.seconds' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.retryConditions' - field: 'path_matcher.path_rule.route_action.retry_policy.retry_conditions' - - api_field: 'pathMatchers.pathRules.routeAction.timeout.nanos' - field: 'path_matcher.path_rule.route_action.timeout.nanos' - - api_field: 'pathMatchers.pathRules.routeAction.timeout.seconds' - field: 'path_matcher.path_rule.route_action.timeout.seconds' - - api_field: 'pathMatchers.pathRules.routeAction.urlRewrite.hostRewrite' - field: 'path_matcher.path_rule.route_action.url_rewrite.host_rewrite' - - api_field: 'pathMatchers.pathRules.routeAction.urlRewrite.pathPrefixRewrite' - field: 'path_matcher.path_rule.route_action.url_rewrite.path_prefix_rewrite' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.backendService' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.backend_service' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.weight' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.weight' - - api_field: 'pathMatchers.pathRules.service' - field: 'path_matcher.path_rule.service' - - api_field: 'pathMatchers.pathRules.urlRedirect.hostRedirect' - field: 'path_matcher.path_rule.url_redirect.host_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.httpsRedirect' - field: 'path_matcher.path_rule.url_redirect.https_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.pathRedirect' - field: 'path_matcher.path_rule.url_redirect.path_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.prefixRedirect' - field: 'path_matcher.path_rule.url_redirect.prefix_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.redirectResponseCode' - field: 'path_matcher.path_rule.url_redirect.redirect_response_code' - - api_field: 'pathMatchers.pathRules.urlRedirect.stripQuery' - field: 'path_matcher.path_rule.url_redirect.strip_query' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.route_rules.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.route_rules.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToRemove' - field: 'path_matcher.route_rules.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.route_rules.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.route_rules.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToRemove' - field: 'path_matcher.route_rules.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.routeRules.matchRules.fullPathMatch' - field: 'path_matcher.route_rules.match_rules.full_path_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.exactMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.exact_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.headerName' - field: 'path_matcher.route_rules.match_rules.header_matches.header_name' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.invertMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.invert_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.prefixMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.prefix_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.presentMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.present_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeEnd' - field: 'path_matcher.route_rules.match_rules.header_matches.range_match.range_end' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeStart' - field: 'path_matcher.route_rules.match_rules.header_matches.range_match.range_start' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.regexMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.regex_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.suffixMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.suffix_match' - - api_field: 'pathMatchers.routeRules.matchRules.ignoreCase' - field: 'path_matcher.route_rules.match_rules.ignore_case' - - api_field: 'pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.name' - field: 'path_matcher.route_rules.match_rules.metadata_filters.filter_labels.name' - - api_field: 'pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.value' - field: 'path_matcher.route_rules.match_rules.metadata_filters.filter_labels.value' - - api_field: 'pathMatchers.routeRules.matchRules.metadataFilters.filterMatchCriteria' - field: 'path_matcher.route_rules.match_rules.metadata_filters.filter_match_criteria' - - api_field: 'pathMatchers.routeRules.matchRules.pathTemplateMatch' - field: 'path_matcher.route_rules.match_rules.path_template_match' - - api_field: 'pathMatchers.routeRules.matchRules.prefixMatch' - field: 'path_matcher.route_rules.match_rules.prefix_match' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.exactMatch' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.exact_match' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.name' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.name' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.presentMatch' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.present_match' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.regexMatch' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.regex_match' - - api_field: 'pathMatchers.routeRules.matchRules.regexMatch' - field: 'path_matcher.route_rules.match_rules.regex_match' - - api_field: 'pathMatchers.routeRules.priority' - field: 'path_matcher.route_rules.priority' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowCredentials' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_credentials' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowHeaders' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_headers' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowMethods' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_methods' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowOriginRegexes' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_origin_regexes' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowOrigins' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_origins' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.disabled' - field: 'path_matcher.route_rules.route_action.cors_policy.disabled' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.exposeHeaders' - field: 'path_matcher.route_rules.route_action.cors_policy.expose_headers' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.maxAge' - field: 'path_matcher.route_rules.route_action.cors_policy.max_age' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.httpStatus' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.abort.http_status' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.percentage' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.abort.percentage' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.nanos' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.seconds' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.percentage' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.delay.percentage' - - api_field: 'pathMatchers.routeRules.routeAction.requestMirrorPolicy.backendService' - field: 'path_matcher.route_rules.route_action.request_mirror_policy.backend_service' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.numRetries' - field: 'path_matcher.route_rules.route_action.retry_policy.num_retries' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.nanos' - field: 'path_matcher.route_rules.route_action.retry_policy.per_try_timeout.nanos' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.seconds' - field: 'path_matcher.route_rules.route_action.retry_policy.per_try_timeout.seconds' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.retryConditions' - field: 'path_matcher.route_rules.route_action.retry_policy.retry_conditions' - - api_field: 'pathMatchers.routeRules.routeAction.timeout.nanos' - field: 'path_matcher.route_rules.route_action.timeout.nanos' - - api_field: 'pathMatchers.routeRules.routeAction.timeout.seconds' - field: 'path_matcher.route_rules.route_action.timeout.seconds' - - api_field: 'pathMatchers.routeRules.routeAction.urlRewrite.hostRewrite' - field: 'path_matcher.route_rules.route_action.url_rewrite.host_rewrite' - - api_field: 'pathMatchers.routeRules.routeAction.urlRewrite.pathPrefixRewrite' - field: 'path_matcher.route_rules.route_action.url_rewrite.path_prefix_rewrite' - - api_field: 'pathMatchers.routeRules.routeAction.urlRewrite.pathTemplateRewrite' - field: 'path_matcher.route_rules.route_action.url_rewrite.path_template_rewrite' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.backendService' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.backend_service' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.weight' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.weight' - - api_field: 'pathMatchers.routeRules.service' - field: 'path_matcher.route_rules.service' - - api_field: 'pathMatchers.routeRules.urlRedirect.hostRedirect' - field: 'path_matcher.route_rules.url_redirect.host_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.httpsRedirect' - field: 'path_matcher.route_rules.url_redirect.https_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.pathRedirect' - field: 'path_matcher.route_rules.url_redirect.path_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.prefixRedirect' - field: 'path_matcher.route_rules.url_redirect.prefix_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.redirectResponseCode' - field: 'path_matcher.route_rules.url_redirect.redirect_response_code' - - api_field: 'pathMatchers.routeRules.urlRedirect.stripQuery' - field: 'path_matcher.route_rules.url_redirect.strip_query' - - api_field: 'region' - - api_field: 'tests.description' - field: 'test.description' - - api_field: 'tests.host' - field: 'test.host' - - api_field: 'tests.path' - field: 'test.path' - - api_field: 'tests.service' - field: 'test.service' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: defaultRouteAction.corsPolicy.allowCredentials + - api_field: defaultRouteAction.corsPolicy.allowHeaders + - api_field: defaultRouteAction.corsPolicy.allowMethods + - api_field: defaultRouteAction.corsPolicy.allowOriginRegexes + - api_field: defaultRouteAction.corsPolicy.allowOrigins + - api_field: defaultRouteAction.corsPolicy.disabled + - api_field: defaultRouteAction.corsPolicy.exposeHeaders + - api_field: defaultRouteAction.corsPolicy.maxAge + - api_field: defaultRouteAction.faultInjectionPolicy.abort.httpStatus + - api_field: defaultRouteAction.faultInjectionPolicy.abort.percentage + - api_field: defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos + - api_field: defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds + - api_field: defaultRouteAction.faultInjectionPolicy.delay.percentage + - api_field: defaultRouteAction.requestMirrorPolicy.backendService + - api_field: defaultRouteAction.retryPolicy.numRetries + - api_field: defaultRouteAction.retryPolicy.perTryTimeout.nanos + - api_field: defaultRouteAction.retryPolicy.perTryTimeout.seconds + - api_field: defaultRouteAction.retryPolicy.retryConditions + - api_field: defaultRouteAction.timeout.nanos + - api_field: defaultRouteAction.timeout.seconds + - api_field: defaultRouteAction.urlRewrite.hostRewrite + - api_field: defaultRouteAction.urlRewrite.pathPrefixRewrite + - api_field: defaultRouteAction.weightedBackendServices.backendService + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove + - api_field: defaultRouteAction.weightedBackendServices.weight + - api_field: defaultService + - api_field: defaultUrlRedirect.hostRedirect + - api_field: defaultUrlRedirect.httpsRedirect + - api_field: defaultUrlRedirect.pathRedirect + - api_field: defaultUrlRedirect.prefixRedirect + - api_field: defaultUrlRedirect.redirectResponseCode + - api_field: defaultUrlRedirect.stripQuery + - api_field: description + - api_field: fingerprint + - api_field: headerAction.requestHeadersToAdd.headerName + - api_field: headerAction.requestHeadersToAdd.headerValue + - api_field: headerAction.requestHeadersToAdd.replace + - api_field: headerAction.requestHeadersToRemove + - api_field: headerAction.responseHeadersToAdd.headerName + - api_field: headerAction.responseHeadersToAdd.headerValue + - api_field: headerAction.responseHeadersToAdd.replace + - api_field: headerAction.responseHeadersToRemove + - api_field: hostRules.description + field: host_rule.description + - api_field: hostRules.hosts + field: host_rule.hosts + - api_field: hostRules.pathMatcher + field: host_rule.path_matcher + - api_field: id + field: map_id + - api_field: name + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowCredentials + field: path_matcher.default_route_action.cors_policy.allow_credentials + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowHeaders + field: path_matcher.default_route_action.cors_policy.allow_headers + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowMethods + field: path_matcher.default_route_action.cors_policy.allow_methods + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowOriginRegexes + field: path_matcher.default_route_action.cors_policy.allow_origin_regexes + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowOrigins + field: path_matcher.default_route_action.cors_policy.allow_origins + - api_field: pathMatchers.defaultRouteAction.corsPolicy.disabled + field: path_matcher.default_route_action.cors_policy.disabled + - api_field: pathMatchers.defaultRouteAction.corsPolicy.exposeHeaders + field: path_matcher.default_route_action.cors_policy.expose_headers + - api_field: pathMatchers.defaultRouteAction.corsPolicy.maxAge + field: path_matcher.default_route_action.cors_policy.max_age + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.httpStatus + field: path_matcher.default_route_action.fault_injection_policy.abort.http_status + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.percentage + field: path_matcher.default_route_action.fault_injection_policy.abort.percentage + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos + field: path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.nanos + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds + field: path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.seconds + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.percentage + field: path_matcher.default_route_action.fault_injection_policy.delay.percentage + - api_field: pathMatchers.defaultRouteAction.maxStreamDuration.nanos + field: path_matcher.default_route_action.max_stream_duration.nanos + - api_field: pathMatchers.defaultRouteAction.maxStreamDuration.seconds + field: path_matcher.default_route_action.max_stream_duration.seconds + - api_field: pathMatchers.defaultRouteAction.requestMirrorPolicy.backendService + field: path_matcher.default_route_action.request_mirror_policy.backend_service + - api_field: pathMatchers.defaultRouteAction.retryPolicy.numRetries + field: path_matcher.default_route_action.retry_policy.num_retries + - api_field: pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.nanos + field: path_matcher.default_route_action.retry_policy.per_try_timeout.nanos + - api_field: pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.seconds + field: path_matcher.default_route_action.retry_policy.per_try_timeout.seconds + - api_field: pathMatchers.defaultRouteAction.retryPolicy.retryConditions + field: path_matcher.default_route_action.retry_policy.retry_conditions + - api_field: pathMatchers.defaultRouteAction.timeout.nanos + field: path_matcher.default_route_action.timeout.nanos + - api_field: pathMatchers.defaultRouteAction.timeout.seconds + field: path_matcher.default_route_action.timeout.seconds + - api_field: pathMatchers.defaultRouteAction.urlRewrite.hostRewrite + field: path_matcher.default_route_action.url_rewrite.host_rewrite + - api_field: pathMatchers.defaultRouteAction.urlRewrite.pathPrefixRewrite + field: path_matcher.default_route_action.url_rewrite.path_prefix_rewrite + - api_field: pathMatchers.defaultRouteAction.urlRewrite.pathTemplateRewrite + field: path_matcher.default_route_action.url_rewrite.path_template_rewrite + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.backendService + field: path_matcher.default_route_action.weighted_backend_services.backend_service + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.replace + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_remove + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.replace + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_remove + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.weight + field: path_matcher.default_route_action.weighted_backend_services.weight + - api_field: pathMatchers.defaultService + field: path_matcher.default_service + - api_field: pathMatchers.defaultUrlRedirect.hostRedirect + field: path_matcher.default_url_redirect.host_redirect + - api_field: pathMatchers.defaultUrlRedirect.httpsRedirect + field: path_matcher.default_url_redirect.https_redirect + - api_field: pathMatchers.defaultUrlRedirect.pathRedirect + field: path_matcher.default_url_redirect.path_redirect + - api_field: pathMatchers.defaultUrlRedirect.prefixRedirect + field: path_matcher.default_url_redirect.prefix_redirect + - api_field: pathMatchers.defaultUrlRedirect.redirectResponseCode + field: path_matcher.default_url_redirect.redirect_response_code + - api_field: pathMatchers.defaultUrlRedirect.stripQuery + field: path_matcher.default_url_redirect.strip_query + - api_field: pathMatchers.description + field: path_matcher.description + - api_field: pathMatchers.headerAction.requestHeadersToAdd.headerName + field: path_matcher.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.headerAction.requestHeadersToAdd.replace + field: path_matcher.header_action.request_headers_to_add.replace + - api_field: pathMatchers.headerAction.requestHeadersToRemove + field: path_matcher.header_action.request_headers_to_remove + - api_field: pathMatchers.headerAction.responseHeadersToAdd.headerName + field: path_matcher.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.headerAction.responseHeadersToAdd.replace + field: path_matcher.header_action.response_headers_to_add.replace + - api_field: pathMatchers.headerAction.responseHeadersToRemove + field: path_matcher.header_action.response_headers_to_remove + - api_field: pathMatchers.name + field: path_matcher.name + - api_field: pathMatchers.pathRules.paths + field: path_matcher.path_rule.paths + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowCredentials + field: path_matcher.path_rule.route_action.cors_policy.allow_credentials + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowHeaders + field: path_matcher.path_rule.route_action.cors_policy.allow_headers + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowMethods + field: path_matcher.path_rule.route_action.cors_policy.allow_methods + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowOriginRegexes + field: path_matcher.path_rule.route_action.cors_policy.allow_origin_regexes + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowOrigins + field: path_matcher.path_rule.route_action.cors_policy.allow_origins + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.disabled + field: path_matcher.path_rule.route_action.cors_policy.disabled + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.exposeHeaders + field: path_matcher.path_rule.route_action.cors_policy.expose_headers + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.maxAge + field: path_matcher.path_rule.route_action.cors_policy.max_age + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.httpStatus + field: path_matcher.path_rule.route_action.fault_injection_policy.abort.http_status + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.percentage + field: path_matcher.path_rule.route_action.fault_injection_policy.abort.percentage + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos + field: path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.nanos + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds + field: path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.seconds + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.percentage + field: path_matcher.path_rule.route_action.fault_injection_policy.delay.percentage + - api_field: pathMatchers.pathRules.routeAction.requestMirrorPolicy.backendService + field: path_matcher.path_rule.route_action.request_mirror_policy.backend_service + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.numRetries + field: path_matcher.path_rule.route_action.retry_policy.num_retries + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.nanos + field: path_matcher.path_rule.route_action.retry_policy.per_try_timeout.nanos + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.seconds + field: path_matcher.path_rule.route_action.retry_policy.per_try_timeout.seconds + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.retryConditions + field: path_matcher.path_rule.route_action.retry_policy.retry_conditions + - api_field: pathMatchers.pathRules.routeAction.timeout.nanos + field: path_matcher.path_rule.route_action.timeout.nanos + - api_field: pathMatchers.pathRules.routeAction.timeout.seconds + field: path_matcher.path_rule.route_action.timeout.seconds + - api_field: pathMatchers.pathRules.routeAction.urlRewrite.hostRewrite + field: path_matcher.path_rule.route_action.url_rewrite.host_rewrite + - api_field: pathMatchers.pathRules.routeAction.urlRewrite.pathPrefixRewrite + field: path_matcher.path_rule.route_action.url_rewrite.path_prefix_rewrite + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.backendService + field: path_matcher.path_rule.route_action.weighted_backend_services.backend_service + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.replace + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_remove + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.replace + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_remove + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.weight + field: path_matcher.path_rule.route_action.weighted_backend_services.weight + - api_field: pathMatchers.pathRules.service + field: path_matcher.path_rule.service + - api_field: pathMatchers.pathRules.urlRedirect.hostRedirect + field: path_matcher.path_rule.url_redirect.host_redirect + - api_field: pathMatchers.pathRules.urlRedirect.httpsRedirect + field: path_matcher.path_rule.url_redirect.https_redirect + - api_field: pathMatchers.pathRules.urlRedirect.pathRedirect + field: path_matcher.path_rule.url_redirect.path_redirect + - api_field: pathMatchers.pathRules.urlRedirect.prefixRedirect + field: path_matcher.path_rule.url_redirect.prefix_redirect + - api_field: pathMatchers.pathRules.urlRedirect.redirectResponseCode + field: path_matcher.path_rule.url_redirect.redirect_response_code + - api_field: pathMatchers.pathRules.urlRedirect.stripQuery + field: path_matcher.path_rule.url_redirect.strip_query + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerName + field: path_matcher.route_rules.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.route_rules.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace + field: path_matcher.route_rules.header_action.request_headers_to_add.replace + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToRemove + field: path_matcher.route_rules.header_action.request_headers_to_remove + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerName + field: path_matcher.route_rules.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.route_rules.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace + field: path_matcher.route_rules.header_action.response_headers_to_add.replace + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToRemove + field: path_matcher.route_rules.header_action.response_headers_to_remove + - api_field: pathMatchers.routeRules.matchRules.fullPathMatch + field: path_matcher.route_rules.match_rules.full_path_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.exactMatch + field: path_matcher.route_rules.match_rules.header_matches.exact_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.headerName + field: path_matcher.route_rules.match_rules.header_matches.header_name + - api_field: pathMatchers.routeRules.matchRules.headerMatches.invertMatch + field: path_matcher.route_rules.match_rules.header_matches.invert_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.prefixMatch + field: path_matcher.route_rules.match_rules.header_matches.prefix_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.presentMatch + field: path_matcher.route_rules.match_rules.header_matches.present_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeEnd + field: path_matcher.route_rules.match_rules.header_matches.range_match.range_end + - api_field: pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeStart + field: path_matcher.route_rules.match_rules.header_matches.range_match.range_start + - api_field: pathMatchers.routeRules.matchRules.headerMatches.regexMatch + field: path_matcher.route_rules.match_rules.header_matches.regex_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.suffixMatch + field: path_matcher.route_rules.match_rules.header_matches.suffix_match + - api_field: pathMatchers.routeRules.matchRules.ignoreCase + field: path_matcher.route_rules.match_rules.ignore_case + - api_field: pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.name + field: path_matcher.route_rules.match_rules.metadata_filters.filter_labels.name + - api_field: pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.value + field: path_matcher.route_rules.match_rules.metadata_filters.filter_labels.value + - api_field: pathMatchers.routeRules.matchRules.metadataFilters.filterMatchCriteria + field: path_matcher.route_rules.match_rules.metadata_filters.filter_match_criteria + - api_field: pathMatchers.routeRules.matchRules.pathTemplateMatch + field: path_matcher.route_rules.match_rules.path_template_match + - api_field: pathMatchers.routeRules.matchRules.prefixMatch + field: path_matcher.route_rules.match_rules.prefix_match + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.exactMatch + field: path_matcher.route_rules.match_rules.query_parameter_matches.exact_match + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.name + field: path_matcher.route_rules.match_rules.query_parameter_matches.name + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.presentMatch + field: path_matcher.route_rules.match_rules.query_parameter_matches.present_match + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.regexMatch + field: path_matcher.route_rules.match_rules.query_parameter_matches.regex_match + - api_field: pathMatchers.routeRules.matchRules.regexMatch + field: path_matcher.route_rules.match_rules.regex_match + - api_field: pathMatchers.routeRules.priority + field: path_matcher.route_rules.priority + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowCredentials + field: path_matcher.route_rules.route_action.cors_policy.allow_credentials + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowHeaders + field: path_matcher.route_rules.route_action.cors_policy.allow_headers + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowMethods + field: path_matcher.route_rules.route_action.cors_policy.allow_methods + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowOriginRegexes + field: path_matcher.route_rules.route_action.cors_policy.allow_origin_regexes + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowOrigins + field: path_matcher.route_rules.route_action.cors_policy.allow_origins + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.disabled + field: path_matcher.route_rules.route_action.cors_policy.disabled + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.exposeHeaders + field: path_matcher.route_rules.route_action.cors_policy.expose_headers + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.maxAge + field: path_matcher.route_rules.route_action.cors_policy.max_age + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.httpStatus + field: path_matcher.route_rules.route_action.fault_injection_policy.abort.http_status + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.percentage + field: path_matcher.route_rules.route_action.fault_injection_policy.abort.percentage + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos + field: path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.nanos + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds + field: path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.seconds + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.percentage + field: path_matcher.route_rules.route_action.fault_injection_policy.delay.percentage + - api_field: pathMatchers.routeRules.routeAction.requestMirrorPolicy.backendService + field: path_matcher.route_rules.route_action.request_mirror_policy.backend_service + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.numRetries + field: path_matcher.route_rules.route_action.retry_policy.num_retries + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.nanos + field: path_matcher.route_rules.route_action.retry_policy.per_try_timeout.nanos + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.seconds + field: path_matcher.route_rules.route_action.retry_policy.per_try_timeout.seconds + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.retryConditions + field: path_matcher.route_rules.route_action.retry_policy.retry_conditions + - api_field: pathMatchers.routeRules.routeAction.timeout.nanos + field: path_matcher.route_rules.route_action.timeout.nanos + - api_field: pathMatchers.routeRules.routeAction.timeout.seconds + field: path_matcher.route_rules.route_action.timeout.seconds + - api_field: pathMatchers.routeRules.routeAction.urlRewrite.hostRewrite + field: path_matcher.route_rules.route_action.url_rewrite.host_rewrite + - api_field: pathMatchers.routeRules.routeAction.urlRewrite.pathPrefixRewrite + field: path_matcher.route_rules.route_action.url_rewrite.path_prefix_rewrite + - api_field: pathMatchers.routeRules.routeAction.urlRewrite.pathTemplateRewrite + field: path_matcher.route_rules.route_action.url_rewrite.path_template_rewrite + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.backendService + field: path_matcher.route_rules.route_action.weighted_backend_services.backend_service + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.replace + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_remove + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.replace + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_remove + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.weight + field: path_matcher.route_rules.route_action.weighted_backend_services.weight + - api_field: pathMatchers.routeRules.service + field: path_matcher.route_rules.service + - api_field: pathMatchers.routeRules.urlRedirect.hostRedirect + field: path_matcher.route_rules.url_redirect.host_redirect + - api_field: pathMatchers.routeRules.urlRedirect.httpsRedirect + field: path_matcher.route_rules.url_redirect.https_redirect + - api_field: pathMatchers.routeRules.urlRedirect.pathRedirect + field: path_matcher.route_rules.url_redirect.path_redirect + - api_field: pathMatchers.routeRules.urlRedirect.prefixRedirect + field: path_matcher.route_rules.url_redirect.prefix_redirect + - api_field: pathMatchers.routeRules.urlRedirect.redirectResponseCode + field: path_matcher.route_rules.url_redirect.redirect_response_code + - api_field: pathMatchers.routeRules.urlRedirect.stripQuery + field: path_matcher.route_rules.url_redirect.strip_query + - api_field: region + - api_field: tests.description + field: test.description + - api_field: tests.host + field: test.host + - api_field: tests.path + field: test.path + - api_field: tests.service + field: test.service + - api_field: selfLink diff --git a/google/services/compute/resource_compute_reservation_generated_meta.yaml b/google/services/compute/resource_compute_reservation_generated_meta.yaml index 24627c3683a..19651c0967b 100644 --- a/google/services/compute/resource_compute_reservation_generated_meta.yaml +++ b/google/services/compute/resource_compute_reservation_generated_meta.yaml @@ -1,60 +1,63 @@ -resource: 'google_compute_reservation' -generation_type: 'mmv1' -source_file: 'products/compute/Reservation.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Allocation' +resource: google_compute_reservation +generation_type: mmv1 +source_file: products/compute/Reservation.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Allocation fields: - - field: 'block_names' - provider_only: true - - api_field: 'commitment' - - api_field: 'creationTimestamp' - - api_field: 'deleteAfterDuration.nanos' - - api_field: 'deleteAfterDuration.seconds' - - api_field: 'deleteAtTime' - - api_field: 'description' - - api_field: 'id' - - api_field: 'kind' - - api_field: 'linkedCommitments' - - api_field: 'name' - - api_field: 'reservationBlockCount' - - api_field: 'reservationSharingPolicy.serviceShareType' - - api_field: 'resourceStatus.healthInfo.degradedBlockCount' - - api_field: 'resourceStatus.healthInfo.healthStatus' - - api_field: 'resourceStatus.healthInfo.healthyBlockCount' - - api_field: 'resourceStatus.reservationBlockCount' - - api_field: 'resourceStatus.reservationMaintenance.instanceMaintenanceOngoingCount' - - api_field: 'resourceStatus.reservationMaintenance.instanceMaintenancePendingCount' - - api_field: 'resourceStatus.reservationMaintenance.maintenanceOngoingCount' - - api_field: 'resourceStatus.reservationMaintenance.maintenancePendingCount' - - api_field: 'resourceStatus.reservationMaintenance.schedulingType' - - api_field: 'resourceStatus.reservationMaintenance.subblockInfraMaintenanceOngoingCount' - - api_field: 'resourceStatus.reservationMaintenance.subblockInfraMaintenancePendingCount' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.canReschedule' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.latestWindowStartTime' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.maintenanceOnShutdown' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.maintenanceReasons' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.maintenanceStatus' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.type' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.windowEndTime' - - api_field: 'resourceStatus.reservationMaintenance.upcomingGroupMaintenance.windowStartTime' - - api_field: 'resourceStatus.specificSkuAllocation.sourceInstanceTemplateId' - - api_field: 'resourceStatus.specificSkuAllocation.utilizations' - - api_field: 'satisfiesPzs' - - api_field: 'shareSettings.projectMap.projectConfig.projectId' - - api_field: 'shareSettings.shareType' - - api_field: 'specificReservation.assuredCount' - - api_field: 'specificReservation.count' - - api_field: 'specificReservation.inUseCount' - - api_field: 'specificReservation.instanceProperties.guestAccelerators.acceleratorCount' - - api_field: 'specificReservation.instanceProperties.guestAccelerators.acceleratorType' - - api_field: 'specificReservation.instanceProperties.localSsds.diskSizeGb' - - api_field: 'specificReservation.instanceProperties.localSsds.interface' - - api_field: 'specificReservation.instanceProperties.locationHint' - - api_field: 'specificReservation.instanceProperties.machineType' - - api_field: 'specificReservation.instanceProperties.minCpuPlatform' - - api_field: 'specificReservation.sourceInstanceTemplate' - - api_field: 'specificReservationRequired' - - api_field: 'status' - - api_field: 'zone' - - api_field: 'selfLink' + - field: block_names + provider_only: true + - api_field: commitment + - api_field: creationTimestamp + - api_field: deleteAfterDuration.nanos + - api_field: deleteAfterDuration.seconds + - api_field: deleteAtTime + - api_field: description + - api_field: id + - api_field: kind + - api_field: linkedCommitments + - api_field: name + - api_field: reservationBlockCount + - api_field: reservationSharingPolicy.serviceShareType + - api_field: resourceStatus.healthInfo.degradedBlockCount + - api_field: resourceStatus.healthInfo.healthStatus + - api_field: resourceStatus.healthInfo.healthyBlockCount + - api_field: resourceStatus.reservationBlockCount + - api_field: resourceStatus.reservationMaintenance.instanceMaintenanceOngoingCount + - api_field: resourceStatus.reservationMaintenance.instanceMaintenancePendingCount + - api_field: resourceStatus.reservationMaintenance.maintenanceOngoingCount + - api_field: resourceStatus.reservationMaintenance.maintenancePendingCount + - api_field: resourceStatus.reservationMaintenance.schedulingType + - api_field: resourceStatus.reservationMaintenance.subblockInfraMaintenanceOngoingCount + - api_field: resourceStatus.reservationMaintenance.subblockInfraMaintenancePendingCount + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.canReschedule + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.latestWindowStartTime + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.maintenanceOnShutdown + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.maintenanceReasons + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.maintenanceStatus + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.type + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.windowEndTime + - api_field: resourceStatus.reservationMaintenance.upcomingGroupMaintenance.windowStartTime + - api_field: resourceStatus.specificSkuAllocation.sourceInstanceTemplateId + - api_field: resourceStatus.specificSkuAllocation.utilizations + - api_field: satisfiesPzs + - api_field: shareSettings.projectMap.key + field: share_settings.project_map.id + - api_field: shareSettings.projectMap.value.projectId + field: share_settings.project_map.project_id + - api_field: shareSettings.shareType + - api_field: specificReservation.assuredCount + - api_field: specificReservation.count + - api_field: specificReservation.inUseCount + - api_field: specificReservation.instanceProperties.guestAccelerators.acceleratorCount + - api_field: specificReservation.instanceProperties.guestAccelerators.acceleratorType + - api_field: specificReservation.instanceProperties.localSsds.diskSizeGb + - api_field: specificReservation.instanceProperties.localSsds.interface + - api_field: specificReservation.instanceProperties.locationHint + - api_field: specificReservation.instanceProperties.machineType + - api_field: specificReservation.instanceProperties.minCpuPlatform + - api_field: specificReservation.sourceInstanceTemplate + - api_field: specificReservationRequired + - api_field: status + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_resize_request_generated_meta.yaml b/google/services/compute/resource_compute_resize_request_generated_meta.yaml index 2da172eb431..f83e9c0bff0 100644 --- a/google/services/compute/resource_compute_resize_request_generated_meta.yaml +++ b/google/services/compute/resource_compute_resize_request_generated_meta.yaml @@ -1,49 +1,49 @@ -resource: 'google_compute_resize_request' -generation_type: 'mmv1' -source_file: 'products/compute/ResizeRequest.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceGroupManagerResizeRequest' +resource: google_compute_resize_request +generation_type: mmv1 +source_file: products/compute/ResizeRequest.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceGroupManagerResizeRequest fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - field: 'instance_group_manager' - provider_only: true - - api_field: 'name' - - api_field: 'requestedRunDuration.nanos' - - api_field: 'requestedRunDuration.seconds' - - api_field: 'resizeBy' - - api_field: 'state' - - api_field: 'status.error.errors.code' - - api_field: 'status.error.errors.errorDetails.errorInfo.domain' - - api_field: 'status.error.errors.errorDetails.errorInfo.metadatas' - - api_field: 'status.error.errors.errorDetails.errorInfo.reason' - - api_field: 'status.error.errors.errorDetails.help.links.description' - - api_field: 'status.error.errors.errorDetails.help.links.url' - - api_field: 'status.error.errors.errorDetails.localizedMessage.locale' - - api_field: 'status.error.errors.errorDetails.localizedMessage.message' - - api_field: 'status.error.errors.errorDetails.quotaInfo.dimensions' - - api_field: 'status.error.errors.errorDetails.quotaInfo.futureLimit' - - api_field: 'status.error.errors.errorDetails.quotaInfo.limit' - - api_field: 'status.error.errors.errorDetails.quotaInfo.limitName' - - api_field: 'status.error.errors.errorDetails.quotaInfo.metricName' - - api_field: 'status.error.errors.errorDetails.quotaInfo.rolloutStatus' - - api_field: 'status.error.errors.location' - - api_field: 'status.error.errors.message' - - api_field: 'status.lastAttempt.error.errors.code' - - api_field: 'status.lastAttempt.error.errors.errorDetails.errorInfo.domain' - - api_field: 'status.lastAttempt.error.errors.errorDetails.errorInfo.metadatas' - - api_field: 'status.lastAttempt.error.errors.errorDetails.errorInfo.reason' - - api_field: 'status.lastAttempt.error.errors.errorDetails.help.links.description' - - api_field: 'status.lastAttempt.error.errors.errorDetails.help.links.url' - - api_field: 'status.lastAttempt.error.errors.errorDetails.localizedMessage.locale' - - api_field: 'status.lastAttempt.error.errors.errorDetails.localizedMessage.message' - - api_field: 'status.lastAttempt.error.errors.errorDetails.quotaInfo.dimensions' - - api_field: 'status.lastAttempt.error.errors.errorDetails.quotaInfo.futureLimit' - - api_field: 'status.lastAttempt.error.errors.errorDetails.quotaInfo.limit' - - api_field: 'status.lastAttempt.error.errors.errorDetails.quotaInfo.limitName' - - api_field: 'status.lastAttempt.error.errors.errorDetails.quotaInfo.metricName' - - api_field: 'status.lastAttempt.error.errors.errorDetails.quotaInfo.rolloutStatus' - - api_field: 'status.lastAttempt.error.errors.location' - - api_field: 'status.lastAttempt.error.errors.message' - - api_field: 'zone' + - api_field: creationTimestamp + - api_field: description + - field: instance_group_manager + provider_only: true + - api_field: name + - api_field: requestedRunDuration.nanos + - api_field: requestedRunDuration.seconds + - api_field: resizeBy + - api_field: state + - api_field: status.error.errors.code + - api_field: status.error.errors.errorDetails.errorInfo.domain + - api_field: status.error.errors.errorDetails.errorInfo.metadatas + - api_field: status.error.errors.errorDetails.errorInfo.reason + - api_field: status.error.errors.errorDetails.help.links.description + - api_field: status.error.errors.errorDetails.help.links.url + - api_field: status.error.errors.errorDetails.localizedMessage.locale + - api_field: status.error.errors.errorDetails.localizedMessage.message + - api_field: status.error.errors.errorDetails.quotaInfo.dimensions + - api_field: status.error.errors.errorDetails.quotaInfo.futureLimit + - api_field: status.error.errors.errorDetails.quotaInfo.limit + - api_field: status.error.errors.errorDetails.quotaInfo.limitName + - api_field: status.error.errors.errorDetails.quotaInfo.metricName + - api_field: status.error.errors.errorDetails.quotaInfo.rolloutStatus + - api_field: status.error.errors.location + - api_field: status.error.errors.message + - api_field: status.lastAttempt.error.errors.code + - api_field: status.lastAttempt.error.errors.errorDetails.errorInfo.domain + - api_field: status.lastAttempt.error.errors.errorDetails.errorInfo.metadatas + - api_field: status.lastAttempt.error.errors.errorDetails.errorInfo.reason + - api_field: status.lastAttempt.error.errors.errorDetails.help.links.description + - api_field: status.lastAttempt.error.errors.errorDetails.help.links.url + - api_field: status.lastAttempt.error.errors.errorDetails.localizedMessage.locale + - api_field: status.lastAttempt.error.errors.errorDetails.localizedMessage.message + - api_field: status.lastAttempt.error.errors.errorDetails.quotaInfo.dimensions + - api_field: status.lastAttempt.error.errors.errorDetails.quotaInfo.futureLimit + - api_field: status.lastAttempt.error.errors.errorDetails.quotaInfo.limit + - api_field: status.lastAttempt.error.errors.errorDetails.quotaInfo.limitName + - api_field: status.lastAttempt.error.errors.errorDetails.quotaInfo.metricName + - api_field: status.lastAttempt.error.errors.errorDetails.quotaInfo.rolloutStatus + - api_field: status.lastAttempt.error.errors.location + - api_field: status.lastAttempt.error.errors.message + - api_field: zone diff --git a/google/services/compute/resource_compute_resource_policy_attachment_generated_meta.yaml b/google/services/compute/resource_compute_resource_policy_attachment_generated_meta.yaml index f465dc27004..474b6020b7a 100644 --- a/google/services/compute/resource_compute_resource_policy_attachment_generated_meta.yaml +++ b/google/services/compute/resource_compute_resource_policy_attachment_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_compute_resource_policy_attachment' -generation_type: 'mmv1' -source_file: 'products/compute/ResourcePolicyAttachment.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_compute_resource_policy_attachment +generation_type: mmv1 +source_file: products/compute/ResourcePolicyAttachment.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - field: 'instance' - provider_only: true - - api_field: 'name' - - field: 'zone' - provider_only: true + - field: instance + provider_only: true + - api_field: name + - field: zone + provider_only: true diff --git a/google/services/compute/resource_compute_resource_policy_generated_meta.yaml b/google/services/compute/resource_compute_resource_policy_generated_meta.yaml index 0040de7c5f6..e075e624373 100644 --- a/google/services/compute/resource_compute_resource_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_resource_policy_generated_meta.yaml @@ -1,36 +1,36 @@ -resource: 'google_compute_resource_policy' -generation_type: 'mmv1' -source_file: 'products/compute/ResourcePolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ResourcePolicy' +resource: google_compute_resource_policy +generation_type: mmv1 +source_file: products/compute/ResourcePolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: ResourcePolicy fields: - - api_field: 'description' - - api_field: 'diskConsistencyGroupPolicy.enabled' - - api_field: 'groupPlacementPolicy.availabilityDomainCount' - - api_field: 'groupPlacementPolicy.collocation' - - api_field: 'groupPlacementPolicy.gpuTopology' - - api_field: 'groupPlacementPolicy.vmCount' - - api_field: 'instanceSchedulePolicy.expirationTime' - - api_field: 'instanceSchedulePolicy.startTime' - - api_field: 'instanceSchedulePolicy.timeZone' - - api_field: 'instanceSchedulePolicy.vmStartSchedule.schedule' - - api_field: 'instanceSchedulePolicy.vmStopSchedule.schedule' - - api_field: 'name' - - api_field: 'region' - - api_field: 'snapshotSchedulePolicy.retentionPolicy.maxRetentionDays' - - api_field: 'snapshotSchedulePolicy.retentionPolicy.onSourceDiskDelete' - - api_field: 'snapshotSchedulePolicy.schedule.dailySchedule.daysInCycle' - - api_field: 'snapshotSchedulePolicy.schedule.dailySchedule.startTime' - - api_field: 'snapshotSchedulePolicy.schedule.hourlySchedule.hoursInCycle' - - api_field: 'snapshotSchedulePolicy.schedule.hourlySchedule.startTime' - - api_field: 'snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks.day' - - api_field: 'snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks.startTime' - - api_field: 'snapshotSchedulePolicy.snapshotProperties.chainName' - - api_field: 'snapshotSchedulePolicy.snapshotProperties.guestFlush' - - api_field: 'snapshotSchedulePolicy.snapshotProperties.labels' - - api_field: 'snapshotSchedulePolicy.snapshotProperties.storageLocations' - - api_field: 'workloadPolicy.acceleratorTopology' - - api_field: 'workloadPolicy.maxTopologyDistance' - - api_field: 'workloadPolicy.type' - - api_field: 'selfLink' + - api_field: description + - api_field: diskConsistencyGroupPolicy.enabled + - api_field: groupPlacementPolicy.availabilityDomainCount + - api_field: groupPlacementPolicy.collocation + - api_field: groupPlacementPolicy.gpuTopology + - api_field: groupPlacementPolicy.vmCount + - api_field: instanceSchedulePolicy.expirationTime + - api_field: instanceSchedulePolicy.startTime + - api_field: instanceSchedulePolicy.timeZone + - api_field: instanceSchedulePolicy.vmStartSchedule.schedule + - api_field: instanceSchedulePolicy.vmStopSchedule.schedule + - api_field: name + - api_field: region + - api_field: snapshotSchedulePolicy.retentionPolicy.maxRetentionDays + - api_field: snapshotSchedulePolicy.retentionPolicy.onSourceDiskDelete + - api_field: snapshotSchedulePolicy.schedule.dailySchedule.daysInCycle + - api_field: snapshotSchedulePolicy.schedule.dailySchedule.startTime + - api_field: snapshotSchedulePolicy.schedule.hourlySchedule.hoursInCycle + - api_field: snapshotSchedulePolicy.schedule.hourlySchedule.startTime + - api_field: snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks.day + - api_field: snapshotSchedulePolicy.schedule.weeklySchedule.dayOfWeeks.startTime + - api_field: snapshotSchedulePolicy.snapshotProperties.chainName + - api_field: snapshotSchedulePolicy.snapshotProperties.guestFlush + - api_field: snapshotSchedulePolicy.snapshotProperties.labels + - api_field: snapshotSchedulePolicy.snapshotProperties.storageLocations + - api_field: workloadPolicy.acceleratorTopology + - api_field: workloadPolicy.maxTopologyDistance + - api_field: workloadPolicy.type + - api_field: selfLink diff --git a/google/services/compute/resource_compute_route_generated_meta.yaml b/google/services/compute/resource_compute_route_generated_meta.yaml index 41cfdf712f0..531e4243459 100644 --- a/google/services/compute/resource_compute_route_generated_meta.yaml +++ b/google/services/compute/resource_compute_route_generated_meta.yaml @@ -1,35 +1,35 @@ -resource: 'google_compute_route' -generation_type: 'mmv1' -source_file: 'products/compute/Route.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Route' +resource: google_compute_route +generation_type: mmv1 +source_file: products/compute/Route.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Route fields: - - api_field: 'asPaths.asLists' - - api_field: 'asPaths.pathSegmentType' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'destRange' - - api_field: 'name' - - api_field: 'network' - - api_field: 'nextHopGateway' - - api_field: 'nextHopHub' - - api_field: 'nextHopIlb' - - api_field: 'nextHopInstance' - - api_field: 'nextHopInterRegionCost' - - api_field: 'nextHopIp' - - api_field: 'nextHopMed' - - api_field: 'nextHopNetwork' - - api_field: 'nextHopOrigin' - - api_field: 'nextHopPeering' - - api_field: 'nextHopVpnTunnel' - - api_field: 'params.resourceManagerTags' - - api_field: 'priority' - - api_field: 'routeStatus' - - api_field: 'routeType' - - api_field: 'tags' - - api_field: 'warnings.code' - - api_field: 'warnings.data.key' - - api_field: 'warnings.data.value' - - api_field: 'warnings.message' - - api_field: 'selfLink' + - api_field: asPaths.asLists + - api_field: asPaths.pathSegmentType + - api_field: creationTimestamp + - api_field: description + - api_field: destRange + - api_field: name + - api_field: network + - api_field: nextHopGateway + - api_field: nextHopHub + - api_field: nextHopIlb + - api_field: nextHopInstance + - api_field: nextHopInterRegionCost + - api_field: nextHopIp + - api_field: nextHopMed + - api_field: nextHopNetwork + - api_field: nextHopOrigin + - api_field: nextHopPeering + - api_field: nextHopVpnTunnel + - api_field: params.resourceManagerTags + - api_field: priority + - api_field: routeStatus + - api_field: routeType + - api_field: tags + - api_field: warnings.code + - api_field: warnings.data.key + - api_field: warnings.data.value + - api_field: warnings.message + - api_field: selfLink diff --git a/google/services/compute/resource_compute_router_generated_meta.yaml b/google/services/compute/resource_compute_router_generated_meta.yaml index 3c22bb25e91..ea0b36d00c1 100644 --- a/google/services/compute/resource_compute_router_generated_meta.yaml +++ b/google/services/compute/resource_compute_router_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_compute_router' -generation_type: 'mmv1' -source_file: 'products/compute/Router.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Router' +resource: google_compute_router +generation_type: mmv1 +source_file: products/compute/Router.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Router fields: - - api_field: 'bgp.advertiseMode' - - api_field: 'bgp.advertisedGroups' - - api_field: 'bgp.advertisedIpRanges.description' - - api_field: 'bgp.advertisedIpRanges.range' - - api_field: 'bgp.asn' - - api_field: 'bgp.identifierRange' - - api_field: 'bgp.keepaliveInterval' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'encryptedInterconnectRouter' - - api_field: 'md5AuthenticationKeys.key' - - api_field: 'md5AuthenticationKeys.name' - - api_field: 'name' - - api_field: 'network' - - api_field: 'params.resourceManagerTags' - - api_field: 'region' - - api_field: 'selfLink' + - api_field: bgp.advertiseMode + - api_field: bgp.advertisedGroups + - api_field: bgp.advertisedIpRanges.description + - api_field: bgp.advertisedIpRanges.range + - api_field: bgp.asn + - api_field: bgp.identifierRange + - api_field: bgp.keepaliveInterval + - api_field: creationTimestamp + - api_field: description + - api_field: encryptedInterconnectRouter + - api_field: md5AuthenticationKeys.key + - api_field: md5AuthenticationKeys.name + - api_field: name + - api_field: network + - api_field: params.resourceManagerTags + - api_field: region + - api_field: selfLink diff --git a/google/services/compute/resource_compute_router_nat_address_generated_meta.yaml b/google/services/compute/resource_compute_router_nat_address_generated_meta.yaml index d75d1d56f42..718110da3ce 100644 --- a/google/services/compute/resource_compute_router_nat_address_generated_meta.yaml +++ b/google/services/compute/resource_compute_router_nat_address_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_router_nat_address' -generation_type: 'mmv1' -source_file: 'products/compute/RouterNatAddress.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Router' +resource: google_compute_router_nat_address +generation_type: mmv1 +source_file: products/compute/RouterNatAddress.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Router fields: - - api_field: 'drainNatIps' - - api_field: 'natIps' - - field: 'region' - provider_only: true - - field: 'router' - provider_only: true - - api_field: 'name' - field: 'router_nat' + - api_field: drainNatIps + - api_field: natIps + - field: region + provider_only: true + - field: router + provider_only: true + - api_field: name + field: router_nat diff --git a/google/services/compute/resource_compute_router_nat_generated_meta.yaml b/google/services/compute/resource_compute_router_nat_generated_meta.yaml index 9c32acb1a78..49a89dabd76 100644 --- a/google/services/compute/resource_compute_router_nat_generated_meta.yaml +++ b/google/services/compute/resource_compute_router_nat_generated_meta.yaml @@ -1,75 +1,75 @@ -resource: 'google_compute_router_nat' -generation_type: 'mmv1' -source_file: 'products/compute/RouterNat.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Router' +resource: google_compute_router_nat +generation_type: mmv1 +source_file: products/compute/RouterNat.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Router fields: - - api_field: 'nats.autoNetworkTier' - field: 'auto_network_tier' - - api_field: 'nats.drainNatIps' - field: 'drain_nat_ips' - - api_field: 'nats.enableDynamicPortAllocation' - field: 'enable_dynamic_port_allocation' - - api_field: 'nats.enableEndpointIndependentMapping' - field: 'enable_endpoint_independent_mapping' - - api_field: 'nats.endpointTypes' - field: 'endpoint_types' - - api_field: 'nats.icmpIdleTimeoutSec' - field: 'icmp_idle_timeout_sec' - - api_field: 'nats.initialNatIps' - field: 'initial_nat_ips' - - api_field: 'nats.logConfig.enable' - field: 'log_config.enable' - - api_field: 'nats.logConfig.filter' - field: 'log_config.filter' - - api_field: 'nats.maxPortsPerVm' - field: 'max_ports_per_vm' - - api_field: 'nats.minPortsPerVm' - field: 'min_ports_per_vm' - - api_field: 'nats.name' - field: 'name' - - api_field: 'nats.nat64Subnetworks.name' - field: 'nat64_subnetwork.name' - - api_field: 'nats.natIpAllocateOption' - field: 'nat_ip_allocate_option' - - api_field: 'nats.natIps' - field: 'nat_ips' - - field: 'region' - provider_only: true - - field: 'router' - provider_only: true - - api_field: 'nats.rules.action.sourceNatActiveIps' - field: 'rules.action.source_nat_active_ips' - - api_field: 'nats.rules.action.sourceNatActiveRanges' - field: 'rules.action.source_nat_active_ranges' - - api_field: 'nats.rules.action.sourceNatDrainIps' - field: 'rules.action.source_nat_drain_ips' - - api_field: 'nats.rules.action.sourceNatDrainRanges' - field: 'rules.action.source_nat_drain_ranges' - - api_field: 'nats.rules.description' - field: 'rules.description' - - api_field: 'nats.rules.match' - field: 'rules.match' - - api_field: 'nats.rules.ruleNumber' - field: 'rules.rule_number' - - api_field: 'nats.sourceSubnetworkIpRangesToNat' - field: 'source_subnetwork_ip_ranges_to_nat' - - api_field: 'nats.sourceSubnetworkIpRangesToNat64' - field: 'source_subnetwork_ip_ranges_to_nat64' - - api_field: 'nats.subnetworks.name' - field: 'subnetwork.name' - - api_field: 'nats.subnetworks.secondaryIpRangeNames' - field: 'subnetwork.secondary_ip_range_names' - - api_field: 'nats.subnetworks.sourceIpRangesToNat' - field: 'subnetwork.source_ip_ranges_to_nat' - - api_field: 'nats.tcpEstablishedIdleTimeoutSec' - field: 'tcp_established_idle_timeout_sec' - - api_field: 'nats.tcpTimeWaitTimeoutSec' - field: 'tcp_time_wait_timeout_sec' - - api_field: 'nats.tcpTransitoryIdleTimeoutSec' - field: 'tcp_transitory_idle_timeout_sec' - - api_field: 'nats.type' - field: 'type' - - api_field: 'nats.udpIdleTimeoutSec' - field: 'udp_idle_timeout_sec' + - api_field: nats.autoNetworkTier + field: auto_network_tier + - api_field: nats.drainNatIps + field: drain_nat_ips + - api_field: nats.enableDynamicPortAllocation + field: enable_dynamic_port_allocation + - api_field: nats.enableEndpointIndependentMapping + field: enable_endpoint_independent_mapping + - api_field: nats.endpointTypes + field: endpoint_types + - api_field: nats.icmpIdleTimeoutSec + field: icmp_idle_timeout_sec + - api_field: nats.initialNatIps + field: initial_nat_ips + - api_field: nats.logConfig.enable + field: log_config.enable + - api_field: nats.logConfig.filter + field: log_config.filter + - api_field: nats.maxPortsPerVm + field: max_ports_per_vm + - api_field: nats.minPortsPerVm + field: min_ports_per_vm + - api_field: nats.name + field: name + - api_field: nats.nat64Subnetworks.name + field: nat64_subnetwork.name + - api_field: nats.natIpAllocateOption + field: nat_ip_allocate_option + - api_field: nats.natIps + field: nat_ips + - field: region + provider_only: true + - field: router + provider_only: true + - api_field: nats.rules.action.sourceNatActiveIps + field: rules.action.source_nat_active_ips + - api_field: nats.rules.action.sourceNatActiveRanges + field: rules.action.source_nat_active_ranges + - api_field: nats.rules.action.sourceNatDrainIps + field: rules.action.source_nat_drain_ips + - api_field: nats.rules.action.sourceNatDrainRanges + field: rules.action.source_nat_drain_ranges + - api_field: nats.rules.description + field: rules.description + - api_field: nats.rules.match + field: rules.match + - api_field: nats.rules.ruleNumber + field: rules.rule_number + - api_field: nats.sourceSubnetworkIpRangesToNat + field: source_subnetwork_ip_ranges_to_nat + - api_field: nats.sourceSubnetworkIpRangesToNat64 + field: source_subnetwork_ip_ranges_to_nat64 + - api_field: nats.subnetworks.name + field: subnetwork.name + - api_field: nats.subnetworks.secondaryIpRangeNames + field: subnetwork.secondary_ip_range_names + - api_field: nats.subnetworks.sourceIpRangesToNat + field: subnetwork.source_ip_ranges_to_nat + - api_field: nats.tcpEstablishedIdleTimeoutSec + field: tcp_established_idle_timeout_sec + - api_field: nats.tcpTimeWaitTimeoutSec + field: tcp_time_wait_timeout_sec + - api_field: nats.tcpTransitoryIdleTimeoutSec + field: tcp_transitory_idle_timeout_sec + - api_field: nats.type + field: type + - api_field: nats.udpIdleTimeoutSec + field: udp_idle_timeout_sec diff --git a/google/services/compute/resource_compute_router_peer_test.go b/google/services/compute/resource_compute_router_peer_test.go index 2781046acc9..11aa2911616 100644 --- a/google/services/compute/resource_compute_router_peer_test.go +++ b/google/services/compute/resource_compute_router_peer_test.go @@ -90,7 +90,7 @@ resource "google_compute_address" "addr_peer" { } resource "google_compute_instance" "instance" { - name = "router-appliance" + name = "tf-test-router-appliance%{random_suffix}" zone = "us-central1-a" machine_type = "e2-medium" can_ip_forward = true diff --git a/google/services/compute/resource_compute_router_route_policy_generated_meta.yaml b/google/services/compute/resource_compute_router_route_policy_generated_meta.yaml index fb66b738cc2..53e55daae76 100644 --- a/google/services/compute/resource_compute_router_route_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_router_route_policy_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_compute_router_route_policy' -generation_type: 'mmv1' -source_file: 'products/compute/RouterRoutePolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Router' +resource: google_compute_router_route_policy +generation_type: mmv1 +source_file: products/compute/RouterRoutePolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Router fields: - - api_field: 'fingerprint' - - api_field: 'name' - - field: 'region' - provider_only: true - - field: 'router' - provider_only: true - - api_field: 'terms.actions.description' - - api_field: 'terms.actions.expression' - - api_field: 'terms.actions.location' - - api_field: 'terms.actions.title' - - api_field: 'terms.match.description' - - api_field: 'terms.match.expression' - - api_field: 'terms.match.location' - - api_field: 'terms.match.title' - - api_field: 'terms.priority' - - api_field: 'type' + - api_field: fingerprint + - api_field: name + - field: region + provider_only: true + - field: router + provider_only: true + - api_field: terms.actions.description + - api_field: terms.actions.expression + - api_field: terms.actions.location + - api_field: terms.actions.title + - api_field: terms.match.description + - api_field: terms.match.expression + - api_field: terms.match.location + - api_field: terms.match.title + - api_field: terms.priority + - api_field: type diff --git a/google/services/compute/resource_compute_security_policy_meta.yaml b/google/services/compute/resource_compute_security_policy_meta.yaml index a957915f3b9..fb95574ff3a 100644 --- a/google/services/compute/resource_compute_security_policy_meta.yaml +++ b/google/services/compute/resource_compute_security_policy_meta.yaml @@ -61,25 +61,25 @@ fields: field: 'rule.match.expr_options.recaptcha_options.session_token_site_keys' - api_field: 'rules.match.versionedExpr' field: 'rule.match.versioned_expr' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestCookiesToExclude.op' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.op' field: 'rule.preconfigured_waf_config.exclusion.request_cookie.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestCookiesToExclude.val' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.val' field: 'rule.preconfigured_waf_config.exclusion.request_cookie.value' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestHeadersToExclude.op' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.op' field: 'rule.preconfigured_waf_config.exclusion.request_header.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestHeadersToExclude.val' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.val' field: 'rule.preconfigured_waf_config.exclusion.request_header.value' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestQueryParamsToExclude.op' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.op' field: 'rule.preconfigured_waf_config.exclusion.request_query_param.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestQueryParamsToExclude.val' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.val' field: 'rule.preconfigured_waf_config.exclusion.request_query_param.value' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestUrisToExclude.op' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.op' field: 'rule.preconfigured_waf_config.exclusion.request_uri.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusion.requestUrisToExclude.val' + - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.val' field: 'rule.preconfigured_waf_config.exclusion.request_uri.value' - - api_field: 'rules.preconfiguredWafConfig.exclusion.targetRuleIds' + - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleIds' field: 'rule.preconfigured_waf_config.exclusion.target_rule_ids' - - api_field: 'rules.preconfiguredWafConfig.exclusion.targetRuleSet' + - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleSet' field: 'rule.preconfigured_waf_config.exclusion.target_rule_set' - api_field: 'rules.preview' field: 'rule.preview' diff --git a/google/services/compute/resource_compute_security_policy_rule_generated_meta.yaml b/google/services/compute/resource_compute_security_policy_rule_generated_meta.yaml index 1ed626bdf7b..391087a9eeb 100644 --- a/google/services/compute/resource_compute_security_policy_rule_generated_meta.yaml +++ b/google/services/compute/resource_compute_security_policy_rule_generated_meta.yaml @@ -1,81 +1,81 @@ -resource: 'google_compute_security_policy_rule' -generation_type: 'mmv1' -source_file: 'products/compute/SecurityPolicyRule.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityPolicy' +resource: google_compute_security_policy_rule +generation_type: mmv1 +source_file: products/compute/SecurityPolicyRule.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityPolicy fields: - - api_field: 'rules.action' - field: 'action' - - api_field: 'rules.description' - field: 'description' - - api_field: 'rules.headerAction.requestHeadersToAdds.headerName' - field: 'header_action.request_headers_to_adds.header_name' - - api_field: 'rules.headerAction.requestHeadersToAdds.headerValue' - field: 'header_action.request_headers_to_adds.header_value' - - api_field: 'rules.match.config.srcIpRanges' - field: 'match.config.src_ip_ranges' - - api_field: 'rules.match.expr.expression' - field: 'match.expr.expression' - - api_field: 'rules.match.exprOptions.recaptchaOptions.actionTokenSiteKeys' - field: 'match.expr_options.recaptcha_options.action_token_site_keys' - - api_field: 'rules.match.exprOptions.recaptchaOptions.sessionTokenSiteKeys' - field: 'match.expr_options.recaptcha_options.session_token_site_keys' - - api_field: 'rules.match.versionedExpr' - field: 'match.versioned_expr' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_cookie.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_cookie.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_header.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_header.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_query_param.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_query_param.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.op' - field: 'preconfigured_waf_config.exclusion.request_uri.operator' - - api_field: 'rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.val' - field: 'preconfigured_waf_config.exclusion.request_uri.value' - - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleIds' - field: 'preconfigured_waf_config.exclusion.target_rule_ids' - - api_field: 'rules.preconfiguredWafConfig.exclusions.targetRuleSet' - field: 'preconfigured_waf_config.exclusion.target_rule_set' - - api_field: 'rules.preview' - field: 'preview' - - api_field: 'rules.priority' - field: 'priority' - - api_field: 'rules.rateLimitOptions.banDurationSec' - field: 'rate_limit_options.ban_duration_sec' - - api_field: 'rules.rateLimitOptions.banThreshold.count' - field: 'rate_limit_options.ban_threshold.count' - - api_field: 'rules.rateLimitOptions.banThreshold.intervalSec' - field: 'rate_limit_options.ban_threshold.interval_sec' - - api_field: 'rules.rateLimitOptions.conformAction' - field: 'rate_limit_options.conform_action' - - api_field: 'rules.rateLimitOptions.enforceOnKey' - field: 'rate_limit_options.enforce_on_key' - - api_field: 'rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyName' - field: 'rate_limit_options.enforce_on_key_configs.enforce_on_key_name' - - api_field: 'rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyType' - field: 'rate_limit_options.enforce_on_key_configs.enforce_on_key_type' - - api_field: 'rules.rateLimitOptions.enforceOnKeyName' - field: 'rate_limit_options.enforce_on_key_name' - - api_field: 'rules.rateLimitOptions.exceedAction' - field: 'rate_limit_options.exceed_action' - - api_field: 'rules.rateLimitOptions.exceedRedirectOptions.target' - field: 'rate_limit_options.exceed_redirect_options.target' - - api_field: 'rules.rateLimitOptions.exceedRedirectOptions.type' - field: 'rate_limit_options.exceed_redirect_options.type' - - api_field: 'rules.rateLimitOptions.rateLimitThreshold.count' - field: 'rate_limit_options.rate_limit_threshold.count' - - api_field: 'rules.rateLimitOptions.rateLimitThreshold.intervalSec' - field: 'rate_limit_options.rate_limit_threshold.interval_sec' - - api_field: 'rules.redirectOptions.target' - field: 'redirect_options.target' - - api_field: 'rules.redirectOptions.type' - field: 'redirect_options.type' - - field: 'security_policy' - provider_only: true + - api_field: rules.action + field: action + - api_field: rules.description + field: description + - api_field: rules.headerAction.requestHeadersToAdds.headerName + field: header_action.request_headers_to_adds.header_name + - api_field: rules.headerAction.requestHeadersToAdds.headerValue + field: header_action.request_headers_to_adds.header_value + - api_field: rules.match.config.srcIpRanges + field: match.config.src_ip_ranges + - api_field: rules.match.expr.expression + field: match.expr.expression + - api_field: rules.match.exprOptions.recaptchaOptions.actionTokenSiteKeys + field: match.expr_options.recaptcha_options.action_token_site_keys + - api_field: rules.match.exprOptions.recaptchaOptions.sessionTokenSiteKeys + field: match.expr_options.recaptcha_options.session_token_site_keys + - api_field: rules.match.versionedExpr + field: match.versioned_expr + - api_field: rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.op + field: preconfigured_waf_config.exclusion.request_cookie.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestCookiesToExclude.val + field: preconfigured_waf_config.exclusion.request_cookie.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.op + field: preconfigured_waf_config.exclusion.request_header.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestHeadersToExclude.val + field: preconfigured_waf_config.exclusion.request_header.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.op + field: preconfigured_waf_config.exclusion.request_query_param.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestQueryParamsToExclude.val + field: preconfigured_waf_config.exclusion.request_query_param.value + - api_field: rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.op + field: preconfigured_waf_config.exclusion.request_uri.operator + - api_field: rules.preconfiguredWafConfig.exclusions.requestUrisToExclude.val + field: preconfigured_waf_config.exclusion.request_uri.value + - api_field: rules.preconfiguredWafConfig.exclusions.targetRuleIds + field: preconfigured_waf_config.exclusion.target_rule_ids + - api_field: rules.preconfiguredWafConfig.exclusions.targetRuleSet + field: preconfigured_waf_config.exclusion.target_rule_set + - api_field: rules.preview + field: preview + - api_field: rules.priority + field: priority + - api_field: rules.rateLimitOptions.banDurationSec + field: rate_limit_options.ban_duration_sec + - api_field: rules.rateLimitOptions.banThreshold.count + field: rate_limit_options.ban_threshold.count + - api_field: rules.rateLimitOptions.banThreshold.intervalSec + field: rate_limit_options.ban_threshold.interval_sec + - api_field: rules.rateLimitOptions.conformAction + field: rate_limit_options.conform_action + - api_field: rules.rateLimitOptions.enforceOnKey + field: rate_limit_options.enforce_on_key + - api_field: rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyName + field: rate_limit_options.enforce_on_key_configs.enforce_on_key_name + - api_field: rules.rateLimitOptions.enforceOnKeyConfigs.enforceOnKeyType + field: rate_limit_options.enforce_on_key_configs.enforce_on_key_type + - api_field: rules.rateLimitOptions.enforceOnKeyName + field: rate_limit_options.enforce_on_key_name + - api_field: rules.rateLimitOptions.exceedAction + field: rate_limit_options.exceed_action + - api_field: rules.rateLimitOptions.exceedRedirectOptions.target + field: rate_limit_options.exceed_redirect_options.target + - api_field: rules.rateLimitOptions.exceedRedirectOptions.type + field: rate_limit_options.exceed_redirect_options.type + - api_field: rules.rateLimitOptions.rateLimitThreshold.count + field: rate_limit_options.rate_limit_threshold.count + - api_field: rules.rateLimitOptions.rateLimitThreshold.intervalSec + field: rate_limit_options.rate_limit_threshold.interval_sec + - api_field: rules.redirectOptions.target + field: redirect_options.target + - api_field: rules.redirectOptions.type + field: redirect_options.type + - field: security_policy + provider_only: true diff --git a/google/services/compute/resource_compute_service_attachment_generated_meta.yaml b/google/services/compute/resource_compute_service_attachment_generated_meta.yaml index 5c47c00c0f1..08e47647e18 100644 --- a/google/services/compute/resource_compute_service_attachment_generated_meta.yaml +++ b/google/services/compute/resource_compute_service_attachment_generated_meta.yaml @@ -1,35 +1,35 @@ -resource: 'google_compute_service_attachment' -generation_type: 'mmv1' -source_file: 'products/compute/ServiceAttachment.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServiceAttachment' +resource: google_compute_service_attachment +generation_type: mmv1 +source_file: products/compute/ServiceAttachment.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: ServiceAttachment fields: - - api_field: 'connectedEndpoints.consumerNetwork' - - api_field: 'connectedEndpoints.endpoint' - - api_field: 'connectedEndpoints.natIps' - - api_field: 'connectedEndpoints.propagatedConnectionCount' - - api_field: 'connectedEndpoints.pscConnectionId' - - api_field: 'connectedEndpoints.status' - - api_field: 'connectionPreference' - - api_field: 'consumerAcceptLists.connectionLimit' - - api_field: 'consumerAcceptLists.networkUrl' - - api_field: 'consumerAcceptLists.projectIdOrNum' - - api_field: 'consumerRejectLists' - - api_field: 'description' - - api_field: 'domainNames' - - api_field: 'enableProxyProtocol' - - api_field: 'fingerprint' - - api_field: 'name' - - api_field: 'natSubnets' - - api_field: 'propagatedConnectionLimit' - - api_field: 'pscServiceAttachmentId.high' - - api_field: 'pscServiceAttachmentId.low' - - api_field: 'reconcileConnections' - - api_field: 'region' - - field: 'send_propagated_connection_limit_if_zero' - provider_only: true - - field: 'show_nat_ips' - provider_only: true - - api_field: 'targetService' - - api_field: 'selfLink' + - api_field: connectedEndpoints.consumerNetwork + - api_field: connectedEndpoints.endpoint + - api_field: connectedEndpoints.natIps + - api_field: connectedEndpoints.propagatedConnectionCount + - api_field: connectedEndpoints.pscConnectionId + - api_field: connectedEndpoints.status + - api_field: connectionPreference + - api_field: consumerAcceptLists.connectionLimit + - api_field: consumerAcceptLists.networkUrl + - api_field: consumerAcceptLists.projectIdOrNum + - api_field: consumerRejectLists + - api_field: description + - api_field: domainNames + - api_field: enableProxyProtocol + - api_field: fingerprint + - api_field: name + - api_field: natSubnets + - api_field: propagatedConnectionLimit + - api_field: pscServiceAttachmentId.high + - api_field: pscServiceAttachmentId.low + - api_field: reconcileConnections + - api_field: region + - field: send_propagated_connection_limit_if_zero + provider_only: true + - field: show_nat_ips + provider_only: true + - api_field: targetService + - api_field: selfLink diff --git a/google/services/compute/resource_compute_snapshot_generated_meta.yaml b/google/services/compute/resource_compute_snapshot_generated_meta.yaml index 23a71f6fd3e..c48b4824122 100644 --- a/google/services/compute/resource_compute_snapshot_generated_meta.yaml +++ b/google/services/compute/resource_compute_snapshot_generated_meta.yaml @@ -1,38 +1,38 @@ -resource: 'google_compute_snapshot' -generation_type: 'mmv1' -source_file: 'products/compute/Snapshot.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Snapshot' +resource: google_compute_snapshot +generation_type: mmv1 +source_file: products/compute/Snapshot.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Snapshot fields: - - api_field: 'chainName' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'diskSizeGb' - - field: 'effective_labels' - provider_only: true - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'licenses' - - api_field: 'name' - - api_field: 'snapshotEncryptionKey.kmsKeyName' - field: 'snapshot_encryption_key.kms_key_self_link' - - api_field: 'snapshotEncryptionKey.kmsKeyServiceAccount' - - api_field: 'snapshotEncryptionKey.rawKey' - - api_field: 'snapshotEncryptionKey.rsaEncryptedKey' - - api_field: 'snapshotEncryptionKey.sha256' - - api_field: 'id' - field: 'snapshot_id' - - api_field: 'snapshotType' - - api_field: 'sourceDisk' - - api_field: 'sourceDiskEncryptionKey.kmsKeyName' - field: 'source_disk_encryption_key.kms_key_self_link' - - api_field: 'sourceDiskEncryptionKey.kmsKeyServiceAccount' - - api_field: 'sourceDiskEncryptionKey.rawKey' - - api_field: 'sourceDiskEncryptionKey.rsaEncryptedKey' - - api_field: 'storageBytes' - - api_field: 'storageLocations' - - field: 'terraform_labels' - provider_only: true - - api_field: 'zone' - - api_field: 'selfLink' + - api_field: chainName + - api_field: creationTimestamp + - api_field: description + - api_field: diskSizeGb + - field: effective_labels + provider_only: true + - api_field: labelFingerprint + - api_field: labels + - api_field: licenses + - api_field: name + - api_field: snapshotEncryptionKey.kmsKeyName + field: snapshot_encryption_key.kms_key_self_link + - api_field: snapshotEncryptionKey.kmsKeyServiceAccount + - api_field: snapshotEncryptionKey.rawKey + - api_field: snapshotEncryptionKey.rsaEncryptedKey + - api_field: snapshotEncryptionKey.sha256 + - api_field: id + field: snapshot_id + - api_field: snapshotType + - api_field: sourceDisk + - api_field: sourceDiskEncryptionKey.kmsKeyName + field: source_disk_encryption_key.kms_key_self_link + - api_field: sourceDiskEncryptionKey.kmsKeyServiceAccount + - api_field: sourceDiskEncryptionKey.rawKey + - api_field: sourceDiskEncryptionKey.rsaEncryptedKey + - api_field: storageBytes + - api_field: storageLocations + - field: terraform_labels + provider_only: true + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_snapshot_settings_generated_meta.yaml b/google/services/compute/resource_compute_snapshot_settings_generated_meta.yaml index 1da21f7b8fb..c45298dd0ba 100644 --- a/google/services/compute/resource_compute_snapshot_settings_generated_meta.yaml +++ b/google/services/compute/resource_compute_snapshot_settings_generated_meta.yaml @@ -1,9 +1,12 @@ -resource: 'google_compute_snapshot_settings' -generation_type: 'mmv1' -source_file: 'products/compute/SnapshotSettings.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SnapshotSettings' +resource: google_compute_snapshot_settings +generation_type: mmv1 +source_file: products/compute/SnapshotSettings.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SnapshotSettings fields: - - api_field: 'storageLocation.locations.location.name' - - api_field: 'storageLocation.policy' + - api_field: storageLocation.locations.key + field: storage_location.locations.location + - api_field: storageLocation.locations.value.name + field: storage_location.locations.name + - api_field: storageLocation.policy diff --git a/google/services/compute/resource_compute_ssl_certificate_generated_meta.yaml b/google/services/compute/resource_compute_ssl_certificate_generated_meta.yaml index 9bd77473ce8..0c4c4259075 100644 --- a/google/services/compute/resource_compute_ssl_certificate_generated_meta.yaml +++ b/google/services/compute/resource_compute_ssl_certificate_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_compute_ssl_certificate' -generation_type: 'mmv1' -source_file: 'products/compute/SslCertificate.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SslCertificate' +resource: google_compute_ssl_certificate +generation_type: mmv1 +source_file: products/compute/SslCertificate.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SslCertificate fields: - - api_field: 'certificate' - - api_field: 'id' - field: 'certificate_id' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'expireTime' - - api_field: 'name' - - api_field: 'privateKey' - - api_field: 'selfLink' + - api_field: certificate + - api_field: id + field: certificate_id + - api_field: creationTimestamp + - api_field: description + - api_field: expireTime + - api_field: name + - api_field: privateKey + - api_field: selfLink diff --git a/google/services/compute/resource_compute_ssl_policy_generated_meta.yaml b/google/services/compute/resource_compute_ssl_policy_generated_meta.yaml index dc5be5bb589..027042b4881 100644 --- a/google/services/compute/resource_compute_ssl_policy_generated_meta.yaml +++ b/google/services/compute/resource_compute_ssl_policy_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_compute_ssl_policy' -generation_type: 'mmv1' -source_file: 'products/compute/SslPolicy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SslPolicy' +resource: google_compute_ssl_policy +generation_type: mmv1 +source_file: products/compute/SslPolicy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: SslPolicy fields: - - api_field: 'creationTimestamp' - - api_field: 'customFeatures' - - api_field: 'description' - - api_field: 'enabledFeatures' - - api_field: 'fingerprint' - - api_field: 'minTlsVersion' - - api_field: 'name' - - api_field: 'profile' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: customFeatures + - api_field: description + - api_field: enabledFeatures + - api_field: fingerprint + - api_field: minTlsVersion + - api_field: name + - api_field: profile + - api_field: selfLink diff --git a/google/services/compute/resource_compute_storage_pool_generated_meta.yaml b/google/services/compute/resource_compute_storage_pool_generated_meta.yaml index 58506b08715..7ccc5e79a01 100644 --- a/google/services/compute/resource_compute_storage_pool_generated_meta.yaml +++ b/google/services/compute/resource_compute_storage_pool_generated_meta.yaml @@ -1,47 +1,47 @@ -resource: 'google_compute_storage_pool' -generation_type: 'mmv1' -source_file: 'products/compute/StoragePool.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'StoragePool' +resource: google_compute_storage_pool +generation_type: mmv1 +source_file: products/compute/StoragePool.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: StoragePool fields: - - api_field: 'capacityProvisioningType' - - api_field: 'creationTimestamp' - - field: 'deletion_protection' - provider_only: true - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'id' - - api_field: 'kind' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'performanceProvisioningType' - - api_field: 'poolProvisionedCapacityGb' - - api_field: 'poolProvisionedIops' - - api_field: 'poolProvisionedThroughput' - - api_field: 'resourceStatus.diskCount' - - api_field: 'resourceStatus.lastResizeTimestamp' - - api_field: 'resourceStatus.maxTotalProvisionedDiskCapacityGb' - - api_field: 'resourceStatus.poolUsedCapacityBytes' - - api_field: 'resourceStatus.poolUsedIops' - - api_field: 'resourceStatus.poolUsedThroughput' - - api_field: 'resourceStatus.poolUserWrittenBytes' - - api_field: 'resourceStatus.totalProvisionedDiskCapacityGb' - - api_field: 'resourceStatus.totalProvisionedDiskIops' - - api_field: 'resourceStatus.totalProvisionedDiskThroughput' - - api_field: 'status.diskCount' - - api_field: 'status.lastResizeTimestamp' - - api_field: 'status.maxTotalProvisionedDiskCapacityGb' - - api_field: 'status.poolUsedCapacityBytes' - - api_field: 'status.poolUsedIops' - - api_field: 'status.poolUsedThroughput' - - api_field: 'status.poolUserWrittenBytes' - - api_field: 'status.totalProvisionedDiskCapacityGb' - - api_field: 'status.totalProvisionedDiskIops' - - api_field: 'status.totalProvisionedDiskThroughput' - - api_field: 'storagePoolType' - - field: 'terraform_labels' - provider_only: true - - api_field: 'zone' + - api_field: capacityProvisioningType + - api_field: creationTimestamp + - field: deletion_protection + provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: id + - api_field: kind + - api_field: labelFingerprint + - api_field: labels + - api_field: name + - api_field: performanceProvisioningType + - api_field: poolProvisionedCapacityGb + - api_field: poolProvisionedIops + - api_field: poolProvisionedThroughput + - api_field: resourceStatus.diskCount + - api_field: resourceStatus.lastResizeTimestamp + - api_field: resourceStatus.maxTotalProvisionedDiskCapacityGb + - api_field: resourceStatus.poolUsedCapacityBytes + - api_field: resourceStatus.poolUsedIops + - api_field: resourceStatus.poolUsedThroughput + - api_field: resourceStatus.poolUserWrittenBytes + - api_field: resourceStatus.totalProvisionedDiskCapacityGb + - api_field: resourceStatus.totalProvisionedDiskIops + - api_field: resourceStatus.totalProvisionedDiskThroughput + - api_field: status.diskCount + - api_field: status.lastResizeTimestamp + - api_field: status.maxTotalProvisionedDiskCapacityGb + - api_field: status.poolUsedCapacityBytes + - api_field: status.poolUsedIops + - api_field: status.poolUsedThroughput + - api_field: status.poolUserWrittenBytes + - api_field: status.totalProvisionedDiskCapacityGb + - api_field: status.totalProvisionedDiskIops + - api_field: status.totalProvisionedDiskThroughput + - api_field: storagePoolType + - field: terraform_labels + provider_only: true + - api_field: zone diff --git a/google/services/compute/resource_compute_subnetwork_generated_meta.yaml b/google/services/compute/resource_compute_subnetwork_generated_meta.yaml index afc2092f7c7..5fb6f54d43d 100644 --- a/google/services/compute/resource_compute_subnetwork_generated_meta.yaml +++ b/google/services/compute/resource_compute_subnetwork_generated_meta.yaml @@ -1,44 +1,44 @@ -resource: 'google_compute_subnetwork' -generation_type: 'mmv1' -source_file: 'products/compute/Subnetwork.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Subnetwork' +resource: google_compute_subnetwork +generation_type: mmv1 +source_file: products/compute/Subnetwork.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: Subnetwork fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'externalIpv6Prefix' - - api_field: 'gatewayAddress' - - api_field: 'internalIpv6Prefix' - - api_field: 'ipCidrRange' - - api_field: 'ipCollection' - - api_field: 'ipv6AccessType' - - api_field: 'ipv6CidrRange' - - api_field: 'ipv6GceEndpoint' - - api_field: 'logConfig.aggregationInterval' - - api_field: 'logConfig.filterExpr' - - api_field: 'logConfig.flowSampling' - - api_field: 'logConfig.metadata' - - api_field: 'logConfig.metadataFields' - - api_field: 'name' - - api_field: 'network' - - api_field: 'params.resourceManagerTags' - - api_field: 'privateIpGoogleAccess' - - api_field: 'privateIpv6GoogleAccess' - - api_field: 'purpose' - - api_field: 'region' - - api_field: 'reservedInternalRange' - - api_field: 'role' - - api_field: 'secondaryIpRanges.ipCidrRange' - field: 'secondary_ip_range.ip_cidr_range' - - api_field: 'secondaryIpRanges.rangeName' - field: 'secondary_ip_range.range_name' - - api_field: 'secondaryIpRanges.reservedInternalRange' - field: 'secondary_ip_range.reserved_internal_range' - - field: 'send_secondary_ip_range_if_empty' - provider_only: true - - api_field: 'stackType' - - api_field: 'state' - - api_field: 'id' - field: 'subnetwork_id' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: description + - api_field: externalIpv6Prefix + - api_field: gatewayAddress + - api_field: internalIpv6Prefix + - api_field: ipCidrRange + - api_field: ipCollection + - api_field: ipv6AccessType + - api_field: ipv6CidrRange + - api_field: ipv6GceEndpoint + - api_field: logConfig.aggregationInterval + - api_field: logConfig.filterExpr + - api_field: logConfig.flowSampling + - api_field: logConfig.metadata + - api_field: logConfig.metadataFields + - api_field: name + - api_field: network + - api_field: params.resourceManagerTags + - api_field: privateIpGoogleAccess + - api_field: privateIpv6GoogleAccess + - api_field: purpose + - api_field: region + - api_field: reservedInternalRange + - api_field: role + - api_field: secondaryIpRanges.ipCidrRange + field: secondary_ip_range.ip_cidr_range + - api_field: secondaryIpRanges.rangeName + field: secondary_ip_range.range_name + - api_field: secondaryIpRanges.reservedInternalRange + field: secondary_ip_range.reserved_internal_range + - field: send_secondary_ip_range_if_empty + provider_only: true + - api_field: stackType + - api_field: state + - api_field: id + field: subnetwork_id + - api_field: selfLink diff --git a/google/services/compute/resource_compute_target_grpc_proxy_generated_meta.yaml b/google/services/compute/resource_compute_target_grpc_proxy_generated_meta.yaml index 41e7a1b2f1c..5a30da26eea 100644 --- a/google/services/compute/resource_compute_target_grpc_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_target_grpc_proxy_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_target_grpc_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/TargetGrpcProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetGrpcProxy' +resource: google_compute_target_grpc_proxy +generation_type: mmv1 +source_file: products/compute/TargetGrpcProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetGrpcProxy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'name' - - api_field: 'selfLinkWithId' - - api_field: 'urlMap' - - api_field: 'validateForProxyless' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: name + - api_field: selfLinkWithId + - api_field: urlMap + - api_field: validateForProxyless + - api_field: selfLink diff --git a/google/services/compute/resource_compute_target_http_proxy_generated_meta.yaml b/google/services/compute/resource_compute_target_http_proxy_generated_meta.yaml index ed69de791d2..a180ad53782 100644 --- a/google/services/compute/resource_compute_target_http_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_target_http_proxy_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_compute_target_http_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/TargetHttpProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetHttpProxy' +resource: google_compute_target_http_proxy +generation_type: mmv1 +source_file: products/compute/TargetHttpProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetHttpProxy fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'httpKeepAliveTimeoutSec' - - api_field: 'name' - - api_field: 'proxyBind' - - api_field: 'id' - field: 'proxy_id' - - api_field: 'urlMap' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: httpKeepAliveTimeoutSec + - api_field: name + - api_field: proxyBind + - api_field: id + field: proxy_id + - api_field: urlMap + - api_field: selfLink diff --git a/google/services/compute/resource_compute_target_https_proxy_generated_meta.yaml b/google/services/compute/resource_compute_target_https_proxy_generated_meta.yaml index 5f2a98b942b..1b615495a3e 100644 --- a/google/services/compute/resource_compute_target_https_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_target_https_proxy_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_compute_target_https_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/TargetHttpsProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetHttpsProxy' +resource: google_compute_target_https_proxy +generation_type: mmv1 +source_file: products/compute/TargetHttpsProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetHttpsProxy fields: - - api_field: 'certificateManagerCertificates' - - api_field: 'certificateMap' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'httpKeepAliveTimeoutSec' - - api_field: 'name' - - api_field: 'proxyBind' - - api_field: 'id' - field: 'proxy_id' - - api_field: 'quicOverride' - - api_field: 'serverTlsPolicy' - - api_field: 'sslCertificates' - - api_field: 'sslPolicy' - - api_field: 'tlsEarlyData' - - api_field: 'urlMap' - - api_field: 'selfLink' + - api_field: certificateManagerCertificates + - api_field: certificateMap + - api_field: creationTimestamp + - api_field: description + - api_field: fingerprint + - api_field: httpKeepAliveTimeoutSec + - api_field: name + - api_field: proxyBind + - api_field: id + field: proxy_id + - api_field: quicOverride + - api_field: serverTlsPolicy + - api_field: sslCertificates + - api_field: sslPolicy + - api_field: tlsEarlyData + - api_field: urlMap + - api_field: selfLink diff --git a/google/services/compute/resource_compute_target_instance_generated_meta.yaml b/google/services/compute/resource_compute_target_instance_generated_meta.yaml index 6893879ba3d..ff1009394f7 100644 --- a/google/services/compute/resource_compute_target_instance_generated_meta.yaml +++ b/google/services/compute/resource_compute_target_instance_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_compute_target_instance' -generation_type: 'mmv1' -source_file: 'products/compute/TargetInstance.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetInstance' +resource: google_compute_target_instance +generation_type: mmv1 +source_file: products/compute/TargetInstance.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetInstance fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'instance' - - api_field: 'name' - - api_field: 'natPolicy' - - api_field: 'zone' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: description + - api_field: instance + - api_field: name + - api_field: natPolicy + - api_field: zone + - api_field: selfLink diff --git a/google/services/compute/resource_compute_target_ssl_proxy_generated_meta.yaml b/google/services/compute/resource_compute_target_ssl_proxy_generated_meta.yaml index a26659439b4..858df1159ba 100644 --- a/google/services/compute/resource_compute_target_ssl_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_target_ssl_proxy_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_compute_target_ssl_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/TargetSslProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetSslProxy' +resource: google_compute_target_ssl_proxy +generation_type: mmv1 +source_file: products/compute/TargetSslProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetSslProxy fields: - - api_field: 'service' - field: 'backend_service' - - api_field: 'certificateMap' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'name' - - api_field: 'proxyHeader' - - api_field: 'id' - field: 'proxy_id' - - api_field: 'sslCertificates' - - api_field: 'sslPolicy' - - api_field: 'selfLink' + - api_field: service + field: backend_service + - api_field: certificateMap + - api_field: creationTimestamp + - api_field: description + - api_field: name + - api_field: proxyHeader + - api_field: id + field: proxy_id + - api_field: sslCertificates + - api_field: sslPolicy + - api_field: selfLink diff --git a/google/services/compute/resource_compute_target_tcp_proxy_generated_meta.yaml b/google/services/compute/resource_compute_target_tcp_proxy_generated_meta.yaml index a9a60c58791..4c04d499041 100644 --- a/google/services/compute/resource_compute_target_tcp_proxy_generated_meta.yaml +++ b/google/services/compute/resource_compute_target_tcp_proxy_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_compute_target_tcp_proxy' -generation_type: 'mmv1' -source_file: 'products/compute/TargetTcpProxy.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetTcpProxy' +resource: google_compute_target_tcp_proxy +generation_type: mmv1 +source_file: products/compute/TargetTcpProxy.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: TargetTcpProxy fields: - - api_field: 'service' - field: 'backend_service' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'name' - - api_field: 'proxyBind' - - api_field: 'proxyHeader' - - api_field: 'id' - field: 'proxy_id' - - api_field: 'selfLink' + - api_field: service + field: backend_service + - api_field: creationTimestamp + - api_field: description + - api_field: name + - api_field: proxyBind + - api_field: proxyHeader + - api_field: id + field: proxy_id + - api_field: selfLink diff --git a/google/services/compute/resource_compute_url_map_generated_meta.yaml b/google/services/compute/resource_compute_url_map_generated_meta.yaml index e2abb1f3171..9b9613b5e0f 100644 --- a/google/services/compute/resource_compute_url_map_generated_meta.yaml +++ b/google/services/compute/resource_compute_url_map_generated_meta.yaml @@ -1,446 +1,446 @@ -resource: 'google_compute_url_map' -generation_type: 'mmv1' -source_file: 'products/compute/UrlMap.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'UrlMap' +resource: google_compute_url_map +generation_type: mmv1 +source_file: products/compute/UrlMap.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: UrlMap fields: - - api_field: 'creationTimestamp' - - api_field: 'defaultCustomErrorResponsePolicy.errorResponseRules.matchResponseCodes' - field: 'default_custom_error_response_policy.error_response_rule.match_response_codes' - - api_field: 'defaultCustomErrorResponsePolicy.errorResponseRules.overrideResponseCode' - field: 'default_custom_error_response_policy.error_response_rule.override_response_code' - - api_field: 'defaultCustomErrorResponsePolicy.errorResponseRules.path' - field: 'default_custom_error_response_policy.error_response_rule.path' - - api_field: 'defaultCustomErrorResponsePolicy.errorService' - - api_field: 'defaultRouteAction.corsPolicy.allowCredentials' - - api_field: 'defaultRouteAction.corsPolicy.allowHeaders' - - api_field: 'defaultRouteAction.corsPolicy.allowMethods' - - api_field: 'defaultRouteAction.corsPolicy.allowOriginRegexes' - - api_field: 'defaultRouteAction.corsPolicy.allowOrigins' - - api_field: 'defaultRouteAction.corsPolicy.disabled' - - api_field: 'defaultRouteAction.corsPolicy.exposeHeaders' - - api_field: 'defaultRouteAction.corsPolicy.maxAge' - - api_field: 'defaultRouteAction.faultInjectionPolicy.abort.httpStatus' - - api_field: 'defaultRouteAction.faultInjectionPolicy.abort.percentage' - - api_field: 'defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos' - - api_field: 'defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds' - - api_field: 'defaultRouteAction.faultInjectionPolicy.delay.percentage' - - api_field: 'defaultRouteAction.maxStreamDuration.nanos' - - api_field: 'defaultRouteAction.maxStreamDuration.seconds' - - api_field: 'defaultRouteAction.requestMirrorPolicy.backendService' - - api_field: 'defaultRouteAction.retryPolicy.numRetries' - - api_field: 'defaultRouteAction.retryPolicy.perTryTimeout.nanos' - - api_field: 'defaultRouteAction.retryPolicy.perTryTimeout.seconds' - - api_field: 'defaultRouteAction.retryPolicy.retryConditions' - - api_field: 'defaultRouteAction.timeout.nanos' - - api_field: 'defaultRouteAction.timeout.seconds' - - api_field: 'defaultRouteAction.urlRewrite.hostRewrite' - - api_field: 'defaultRouteAction.urlRewrite.pathPrefixRewrite' - - api_field: 'defaultRouteAction.weightedBackendServices.backendService' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - - api_field: 'defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove' - - api_field: 'defaultRouteAction.weightedBackendServices.weight' - - api_field: 'defaultService' - - api_field: 'defaultUrlRedirect.hostRedirect' - - api_field: 'defaultUrlRedirect.httpsRedirect' - - api_field: 'defaultUrlRedirect.pathRedirect' - - api_field: 'defaultUrlRedirect.prefixRedirect' - - api_field: 'defaultUrlRedirect.redirectResponseCode' - - api_field: 'defaultUrlRedirect.stripQuery' - - api_field: 'description' - - api_field: 'fingerprint' - - api_field: 'headerAction.requestHeadersToAdd.headerName' - - api_field: 'headerAction.requestHeadersToAdd.headerValue' - - api_field: 'headerAction.requestHeadersToAdd.replace' - - api_field: 'headerAction.requestHeadersToRemove' - - api_field: 'headerAction.responseHeadersToAdd.headerName' - - api_field: 'headerAction.responseHeadersToAdd.headerValue' - - api_field: 'headerAction.responseHeadersToAdd.replace' - - api_field: 'headerAction.responseHeadersToRemove' - - api_field: 'hostRules.description' - field: 'host_rule.description' - - api_field: 'hostRules.hosts' - field: 'host_rule.hosts' - - api_field: 'hostRules.pathMatcher' - field: 'host_rule.path_matcher' - - api_field: 'id' - field: 'map_id' - - api_field: 'name' - - api_field: 'pathMatchers.defaultCustomErrorResponsePolicy.errorResponseRules.matchResponseCodes' - field: 'path_matcher.default_custom_error_response_policy.error_response_rule.match_response_codes' - - api_field: 'pathMatchers.defaultCustomErrorResponsePolicy.errorResponseRules.overrideResponseCode' - field: 'path_matcher.default_custom_error_response_policy.error_response_rule.override_response_code' - - api_field: 'pathMatchers.defaultCustomErrorResponsePolicy.errorResponseRules.path' - field: 'path_matcher.default_custom_error_response_policy.error_response_rule.path' - - api_field: 'pathMatchers.defaultCustomErrorResponsePolicy.errorService' - field: 'path_matcher.default_custom_error_response_policy.error_service' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowCredentials' - field: 'path_matcher.default_route_action.cors_policy.allow_credentials' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowHeaders' - field: 'path_matcher.default_route_action.cors_policy.allow_headers' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowMethods' - field: 'path_matcher.default_route_action.cors_policy.allow_methods' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowOriginRegexes' - field: 'path_matcher.default_route_action.cors_policy.allow_origin_regexes' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.allowOrigins' - field: 'path_matcher.default_route_action.cors_policy.allow_origins' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.disabled' - field: 'path_matcher.default_route_action.cors_policy.disabled' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.exposeHeaders' - field: 'path_matcher.default_route_action.cors_policy.expose_headers' - - api_field: 'pathMatchers.defaultRouteAction.corsPolicy.maxAge' - field: 'path_matcher.default_route_action.cors_policy.max_age' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.httpStatus' - field: 'path_matcher.default_route_action.fault_injection_policy.abort.http_status' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.percentage' - field: 'path_matcher.default_route_action.fault_injection_policy.abort.percentage' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos' - field: 'path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.nanos' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds' - field: 'path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.seconds' - - api_field: 'pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.percentage' - field: 'path_matcher.default_route_action.fault_injection_policy.delay.percentage' - - api_field: 'pathMatchers.defaultRouteAction.maxStreamDuration.nanos' - field: 'path_matcher.default_route_action.max_stream_duration.nanos' - - api_field: 'pathMatchers.defaultRouteAction.maxStreamDuration.seconds' - field: 'path_matcher.default_route_action.max_stream_duration.seconds' - - api_field: 'pathMatchers.defaultRouteAction.requestMirrorPolicy.backendService' - field: 'path_matcher.default_route_action.request_mirror_policy.backend_service' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.numRetries' - field: 'path_matcher.default_route_action.retry_policy.num_retries' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.nanos' - field: 'path_matcher.default_route_action.retry_policy.per_try_timeout.nanos' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.seconds' - field: 'path_matcher.default_route_action.retry_policy.per_try_timeout.seconds' - - api_field: 'pathMatchers.defaultRouteAction.retryPolicy.retryConditions' - field: 'path_matcher.default_route_action.retry_policy.retry_conditions' - - api_field: 'pathMatchers.defaultRouteAction.timeout.nanos' - field: 'path_matcher.default_route_action.timeout.nanos' - - api_field: 'pathMatchers.defaultRouteAction.timeout.seconds' - field: 'path_matcher.default_route_action.timeout.seconds' - - api_field: 'pathMatchers.defaultRouteAction.urlRewrite.hostRewrite' - field: 'path_matcher.default_route_action.url_rewrite.host_rewrite' - - api_field: 'pathMatchers.defaultRouteAction.urlRewrite.pathPrefixRewrite' - field: 'path_matcher.default_route_action.url_rewrite.path_prefix_rewrite' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.backendService' - field: 'path_matcher.default_route_action.weighted_backend_services.backend_service' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove' - field: 'path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.defaultRouteAction.weightedBackendServices.weight' - field: 'path_matcher.default_route_action.weighted_backend_services.weight' - - api_field: 'pathMatchers.defaultService' - field: 'path_matcher.default_service' - - api_field: 'pathMatchers.defaultUrlRedirect.hostRedirect' - field: 'path_matcher.default_url_redirect.host_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.httpsRedirect' - field: 'path_matcher.default_url_redirect.https_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.pathRedirect' - field: 'path_matcher.default_url_redirect.path_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.prefixRedirect' - field: 'path_matcher.default_url_redirect.prefix_redirect' - - api_field: 'pathMatchers.defaultUrlRedirect.redirectResponseCode' - field: 'path_matcher.default_url_redirect.redirect_response_code' - - api_field: 'pathMatchers.defaultUrlRedirect.stripQuery' - field: 'path_matcher.default_url_redirect.strip_query' - - api_field: 'pathMatchers.description' - field: 'path_matcher.description' - - api_field: 'pathMatchers.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.headerAction.requestHeadersToRemove' - field: 'path_matcher.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.headerAction.responseHeadersToRemove' - field: 'path_matcher.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.name' - field: 'path_matcher.name' - - api_field: 'pathMatchers.pathRules.customErrorResponsePolicy.errorResponseRules.matchResponseCodes' - field: 'path_matcher.path_rule.custom_error_response_policy.error_response_rule.match_response_codes' - - api_field: 'pathMatchers.pathRules.customErrorResponsePolicy.errorResponseRules.overrideResponseCode' - field: 'path_matcher.path_rule.custom_error_response_policy.error_response_rule.override_response_code' - - api_field: 'pathMatchers.pathRules.customErrorResponsePolicy.errorResponseRules.path' - field: 'path_matcher.path_rule.custom_error_response_policy.error_response_rule.path' - - api_field: 'pathMatchers.pathRules.customErrorResponsePolicy.errorService' - field: 'path_matcher.path_rule.custom_error_response_policy.error_service' - - api_field: 'pathMatchers.pathRules.paths' - field: 'path_matcher.path_rule.paths' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowCredentials' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_credentials' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowHeaders' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_headers' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowMethods' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_methods' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowOriginRegexes' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_origin_regexes' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.allowOrigins' - field: 'path_matcher.path_rule.route_action.cors_policy.allow_origins' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.disabled' - field: 'path_matcher.path_rule.route_action.cors_policy.disabled' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.exposeHeaders' - field: 'path_matcher.path_rule.route_action.cors_policy.expose_headers' - - api_field: 'pathMatchers.pathRules.routeAction.corsPolicy.maxAge' - field: 'path_matcher.path_rule.route_action.cors_policy.max_age' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.httpStatus' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.abort.http_status' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.percentage' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.abort.percentage' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.nanos' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.seconds' - - api_field: 'pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.percentage' - field: 'path_matcher.path_rule.route_action.fault_injection_policy.delay.percentage' - - api_field: 'pathMatchers.pathRules.routeAction.maxStreamDuration.nanos' - field: 'path_matcher.path_rule.route_action.max_stream_duration.nanos' - - api_field: 'pathMatchers.pathRules.routeAction.maxStreamDuration.seconds' - field: 'path_matcher.path_rule.route_action.max_stream_duration.seconds' - - api_field: 'pathMatchers.pathRules.routeAction.requestMirrorPolicy.backendService' - field: 'path_matcher.path_rule.route_action.request_mirror_policy.backend_service' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.numRetries' - field: 'path_matcher.path_rule.route_action.retry_policy.num_retries' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.nanos' - field: 'path_matcher.path_rule.route_action.retry_policy.per_try_timeout.nanos' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.seconds' - field: 'path_matcher.path_rule.route_action.retry_policy.per_try_timeout.seconds' - - api_field: 'pathMatchers.pathRules.routeAction.retryPolicy.retryConditions' - field: 'path_matcher.path_rule.route_action.retry_policy.retry_conditions' - - api_field: 'pathMatchers.pathRules.routeAction.timeout.nanos' - field: 'path_matcher.path_rule.route_action.timeout.nanos' - - api_field: 'pathMatchers.pathRules.routeAction.timeout.seconds' - field: 'path_matcher.path_rule.route_action.timeout.seconds' - - api_field: 'pathMatchers.pathRules.routeAction.urlRewrite.hostRewrite' - field: 'path_matcher.path_rule.route_action.url_rewrite.host_rewrite' - - api_field: 'pathMatchers.pathRules.routeAction.urlRewrite.pathPrefixRewrite' - field: 'path_matcher.path_rule.route_action.url_rewrite.path_prefix_rewrite' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.backendService' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.backend_service' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.pathRules.routeAction.weightedBackendServices.weight' - field: 'path_matcher.path_rule.route_action.weighted_backend_services.weight' - - api_field: 'pathMatchers.pathRules.service' - field: 'path_matcher.path_rule.service' - - api_field: 'pathMatchers.pathRules.urlRedirect.hostRedirect' - field: 'path_matcher.path_rule.url_redirect.host_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.httpsRedirect' - field: 'path_matcher.path_rule.url_redirect.https_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.pathRedirect' - field: 'path_matcher.path_rule.url_redirect.path_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.prefixRedirect' - field: 'path_matcher.path_rule.url_redirect.prefix_redirect' - - api_field: 'pathMatchers.pathRules.urlRedirect.redirectResponseCode' - field: 'path_matcher.path_rule.url_redirect.redirect_response_code' - - api_field: 'pathMatchers.pathRules.urlRedirect.stripQuery' - field: 'path_matcher.path_rule.url_redirect.strip_query' - - api_field: 'pathMatchers.routeRules.customErrorResponsePolicy.errorResponseRules.matchResponseCodes' - field: 'path_matcher.route_rules.custom_error_response_policy.error_response_rule.match_response_codes' - - api_field: 'pathMatchers.routeRules.customErrorResponsePolicy.errorResponseRules.overrideResponseCode' - field: 'path_matcher.route_rules.custom_error_response_policy.error_response_rule.override_response_code' - - api_field: 'pathMatchers.routeRules.customErrorResponsePolicy.errorResponseRules.path' - field: 'path_matcher.route_rules.custom_error_response_policy.error_response_rule.path' - - api_field: 'pathMatchers.routeRules.customErrorResponsePolicy.errorService' - field: 'path_matcher.route_rules.custom_error_response_policy.error_service' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.route_rules.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.route_rules.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.headerAction.requestHeadersToRemove' - field: 'path_matcher.route_rules.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.route_rules.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.route_rules.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.headerAction.responseHeadersToRemove' - field: 'path_matcher.route_rules.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.routeRules.matchRules.fullPathMatch' - field: 'path_matcher.route_rules.match_rules.full_path_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.exactMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.exact_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.headerName' - field: 'path_matcher.route_rules.match_rules.header_matches.header_name' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.invertMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.invert_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.prefixMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.prefix_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.presentMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.present_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeEnd' - field: 'path_matcher.route_rules.match_rules.header_matches.range_match.range_end' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeStart' - field: 'path_matcher.route_rules.match_rules.header_matches.range_match.range_start' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.regexMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.regex_match' - - api_field: 'pathMatchers.routeRules.matchRules.headerMatches.suffixMatch' - field: 'path_matcher.route_rules.match_rules.header_matches.suffix_match' - - api_field: 'pathMatchers.routeRules.matchRules.ignoreCase' - field: 'path_matcher.route_rules.match_rules.ignore_case' - - api_field: 'pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.name' - field: 'path_matcher.route_rules.match_rules.metadata_filters.filter_labels.name' - - api_field: 'pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.value' - field: 'path_matcher.route_rules.match_rules.metadata_filters.filter_labels.value' - - api_field: 'pathMatchers.routeRules.matchRules.metadataFilters.filterMatchCriteria' - field: 'path_matcher.route_rules.match_rules.metadata_filters.filter_match_criteria' - - api_field: 'pathMatchers.routeRules.matchRules.pathTemplateMatch' - field: 'path_matcher.route_rules.match_rules.path_template_match' - - api_field: 'pathMatchers.routeRules.matchRules.prefixMatch' - field: 'path_matcher.route_rules.match_rules.prefix_match' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.exactMatch' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.exact_match' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.name' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.name' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.presentMatch' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.present_match' - - api_field: 'pathMatchers.routeRules.matchRules.queryParameterMatches.regexMatch' - field: 'path_matcher.route_rules.match_rules.query_parameter_matches.regex_match' - - api_field: 'pathMatchers.routeRules.matchRules.regexMatch' - field: 'path_matcher.route_rules.match_rules.regex_match' - - api_field: 'pathMatchers.routeRules.priority' - field: 'path_matcher.route_rules.priority' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowCredentials' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_credentials' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowHeaders' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_headers' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowMethods' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_methods' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowOriginRegexes' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_origin_regexes' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.allowOrigins' - field: 'path_matcher.route_rules.route_action.cors_policy.allow_origins' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.disabled' - field: 'path_matcher.route_rules.route_action.cors_policy.disabled' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.exposeHeaders' - field: 'path_matcher.route_rules.route_action.cors_policy.expose_headers' - - api_field: 'pathMatchers.routeRules.routeAction.corsPolicy.maxAge' - field: 'path_matcher.route_rules.route_action.cors_policy.max_age' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.httpStatus' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.abort.http_status' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.percentage' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.abort.percentage' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.nanos' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.seconds' - - api_field: 'pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.percentage' - field: 'path_matcher.route_rules.route_action.fault_injection_policy.delay.percentage' - - api_field: 'pathMatchers.routeRules.routeAction.maxStreamDuration.nanos' - field: 'path_matcher.route_rules.route_action.max_stream_duration.nanos' - - api_field: 'pathMatchers.routeRules.routeAction.maxStreamDuration.seconds' - field: 'path_matcher.route_rules.route_action.max_stream_duration.seconds' - - api_field: 'pathMatchers.routeRules.routeAction.requestMirrorPolicy.backendService' - field: 'path_matcher.route_rules.route_action.request_mirror_policy.backend_service' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.numRetries' - field: 'path_matcher.route_rules.route_action.retry_policy.num_retries' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.nanos' - field: 'path_matcher.route_rules.route_action.retry_policy.per_try_timeout.nanos' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.seconds' - field: 'path_matcher.route_rules.route_action.retry_policy.per_try_timeout.seconds' - - api_field: 'pathMatchers.routeRules.routeAction.retryPolicy.retryConditions' - field: 'path_matcher.route_rules.route_action.retry_policy.retry_conditions' - - api_field: 'pathMatchers.routeRules.routeAction.timeout.nanos' - field: 'path_matcher.route_rules.route_action.timeout.nanos' - - api_field: 'pathMatchers.routeRules.routeAction.timeout.seconds' - field: 'path_matcher.route_rules.route_action.timeout.seconds' - - api_field: 'pathMatchers.routeRules.routeAction.urlRewrite.hostRewrite' - field: 'path_matcher.route_rules.route_action.url_rewrite.host_rewrite' - - api_field: 'pathMatchers.routeRules.routeAction.urlRewrite.pathPrefixRewrite' - field: 'path_matcher.route_rules.route_action.url_rewrite.path_prefix_rewrite' - - api_field: 'pathMatchers.routeRules.routeAction.urlRewrite.pathTemplateRewrite' - field: 'path_matcher.route_rules.route_action.url_rewrite.path_template_rewrite' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.backendService' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.backend_service' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_remove' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.replace' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_remove' - - api_field: 'pathMatchers.routeRules.routeAction.weightedBackendServices.weight' - field: 'path_matcher.route_rules.route_action.weighted_backend_services.weight' - - api_field: 'pathMatchers.routeRules.service' - field: 'path_matcher.route_rules.service' - - api_field: 'pathMatchers.routeRules.urlRedirect.hostRedirect' - field: 'path_matcher.route_rules.url_redirect.host_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.httpsRedirect' - field: 'path_matcher.route_rules.url_redirect.https_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.pathRedirect' - field: 'path_matcher.route_rules.url_redirect.path_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.prefixRedirect' - field: 'path_matcher.route_rules.url_redirect.prefix_redirect' - - api_field: 'pathMatchers.routeRules.urlRedirect.redirectResponseCode' - field: 'path_matcher.route_rules.url_redirect.redirect_response_code' - - api_field: 'pathMatchers.routeRules.urlRedirect.stripQuery' - field: 'path_matcher.route_rules.url_redirect.strip_query' - - api_field: 'tests.description' - field: 'test.description' - - api_field: 'tests.expectedOutputUrl' - field: 'test.expected_output_url' - - api_field: 'tests.expectedRedirectResponseCode' - field: 'test.expected_redirect_response_code' - - api_field: 'tests.headers.name' - field: 'test.headers.name' - - api_field: 'tests.headers.value' - field: 'test.headers.value' - - api_field: 'tests.host' - field: 'test.host' - - api_field: 'tests.path' - field: 'test.path' - - api_field: 'tests.service' - field: 'test.service' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: defaultCustomErrorResponsePolicy.errorResponseRules.matchResponseCodes + field: default_custom_error_response_policy.error_response_rule.match_response_codes + - api_field: defaultCustomErrorResponsePolicy.errorResponseRules.overrideResponseCode + field: default_custom_error_response_policy.error_response_rule.override_response_code + - api_field: defaultCustomErrorResponsePolicy.errorResponseRules.path + field: default_custom_error_response_policy.error_response_rule.path + - api_field: defaultCustomErrorResponsePolicy.errorService + - api_field: defaultRouteAction.corsPolicy.allowCredentials + - api_field: defaultRouteAction.corsPolicy.allowHeaders + - api_field: defaultRouteAction.corsPolicy.allowMethods + - api_field: defaultRouteAction.corsPolicy.allowOriginRegexes + - api_field: defaultRouteAction.corsPolicy.allowOrigins + - api_field: defaultRouteAction.corsPolicy.disabled + - api_field: defaultRouteAction.corsPolicy.exposeHeaders + - api_field: defaultRouteAction.corsPolicy.maxAge + - api_field: defaultRouteAction.faultInjectionPolicy.abort.httpStatus + - api_field: defaultRouteAction.faultInjectionPolicy.abort.percentage + - api_field: defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos + - api_field: defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds + - api_field: defaultRouteAction.faultInjectionPolicy.delay.percentage + - api_field: defaultRouteAction.maxStreamDuration.nanos + - api_field: defaultRouteAction.maxStreamDuration.seconds + - api_field: defaultRouteAction.requestMirrorPolicy.backendService + - api_field: defaultRouteAction.retryPolicy.numRetries + - api_field: defaultRouteAction.retryPolicy.perTryTimeout.nanos + - api_field: defaultRouteAction.retryPolicy.perTryTimeout.seconds + - api_field: defaultRouteAction.retryPolicy.retryConditions + - api_field: defaultRouteAction.timeout.nanos + - api_field: defaultRouteAction.timeout.seconds + - api_field: defaultRouteAction.urlRewrite.hostRewrite + - api_field: defaultRouteAction.urlRewrite.pathPrefixRewrite + - api_field: defaultRouteAction.weightedBackendServices.backendService + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + - api_field: defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + - api_field: defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove + - api_field: defaultRouteAction.weightedBackendServices.weight + - api_field: defaultService + - api_field: defaultUrlRedirect.hostRedirect + - api_field: defaultUrlRedirect.httpsRedirect + - api_field: defaultUrlRedirect.pathRedirect + - api_field: defaultUrlRedirect.prefixRedirect + - api_field: defaultUrlRedirect.redirectResponseCode + - api_field: defaultUrlRedirect.stripQuery + - api_field: description + - api_field: fingerprint + - api_field: headerAction.requestHeadersToAdd.headerName + - api_field: headerAction.requestHeadersToAdd.headerValue + - api_field: headerAction.requestHeadersToAdd.replace + - api_field: headerAction.requestHeadersToRemove + - api_field: headerAction.responseHeadersToAdd.headerName + - api_field: headerAction.responseHeadersToAdd.headerValue + - api_field: headerAction.responseHeadersToAdd.replace + - api_field: headerAction.responseHeadersToRemove + - api_field: hostRules.description + field: host_rule.description + - api_field: hostRules.hosts + field: host_rule.hosts + - api_field: hostRules.pathMatcher + field: host_rule.path_matcher + - api_field: id + field: map_id + - api_field: name + - api_field: pathMatchers.defaultCustomErrorResponsePolicy.errorResponseRules.matchResponseCodes + field: path_matcher.default_custom_error_response_policy.error_response_rule.match_response_codes + - api_field: pathMatchers.defaultCustomErrorResponsePolicy.errorResponseRules.overrideResponseCode + field: path_matcher.default_custom_error_response_policy.error_response_rule.override_response_code + - api_field: pathMatchers.defaultCustomErrorResponsePolicy.errorResponseRules.path + field: path_matcher.default_custom_error_response_policy.error_response_rule.path + - api_field: pathMatchers.defaultCustomErrorResponsePolicy.errorService + field: path_matcher.default_custom_error_response_policy.error_service + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowCredentials + field: path_matcher.default_route_action.cors_policy.allow_credentials + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowHeaders + field: path_matcher.default_route_action.cors_policy.allow_headers + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowMethods + field: path_matcher.default_route_action.cors_policy.allow_methods + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowOriginRegexes + field: path_matcher.default_route_action.cors_policy.allow_origin_regexes + - api_field: pathMatchers.defaultRouteAction.corsPolicy.allowOrigins + field: path_matcher.default_route_action.cors_policy.allow_origins + - api_field: pathMatchers.defaultRouteAction.corsPolicy.disabled + field: path_matcher.default_route_action.cors_policy.disabled + - api_field: pathMatchers.defaultRouteAction.corsPolicy.exposeHeaders + field: path_matcher.default_route_action.cors_policy.expose_headers + - api_field: pathMatchers.defaultRouteAction.corsPolicy.maxAge + field: path_matcher.default_route_action.cors_policy.max_age + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.httpStatus + field: path_matcher.default_route_action.fault_injection_policy.abort.http_status + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.abort.percentage + field: path_matcher.default_route_action.fault_injection_policy.abort.percentage + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.nanos + field: path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.nanos + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.fixedDelay.seconds + field: path_matcher.default_route_action.fault_injection_policy.delay.fixed_delay.seconds + - api_field: pathMatchers.defaultRouteAction.faultInjectionPolicy.delay.percentage + field: path_matcher.default_route_action.fault_injection_policy.delay.percentage + - api_field: pathMatchers.defaultRouteAction.maxStreamDuration.nanos + field: path_matcher.default_route_action.max_stream_duration.nanos + - api_field: pathMatchers.defaultRouteAction.maxStreamDuration.seconds + field: path_matcher.default_route_action.max_stream_duration.seconds + - api_field: pathMatchers.defaultRouteAction.requestMirrorPolicy.backendService + field: path_matcher.default_route_action.request_mirror_policy.backend_service + - api_field: pathMatchers.defaultRouteAction.retryPolicy.numRetries + field: path_matcher.default_route_action.retry_policy.num_retries + - api_field: pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.nanos + field: path_matcher.default_route_action.retry_policy.per_try_timeout.nanos + - api_field: pathMatchers.defaultRouteAction.retryPolicy.perTryTimeout.seconds + field: path_matcher.default_route_action.retry_policy.per_try_timeout.seconds + - api_field: pathMatchers.defaultRouteAction.retryPolicy.retryConditions + field: path_matcher.default_route_action.retry_policy.retry_conditions + - api_field: pathMatchers.defaultRouteAction.timeout.nanos + field: path_matcher.default_route_action.timeout.nanos + - api_field: pathMatchers.defaultRouteAction.timeout.seconds + field: path_matcher.default_route_action.timeout.seconds + - api_field: pathMatchers.defaultRouteAction.urlRewrite.hostRewrite + field: path_matcher.default_route_action.url_rewrite.host_rewrite + - api_field: pathMatchers.defaultRouteAction.urlRewrite.pathPrefixRewrite + field: path_matcher.default_route_action.url_rewrite.path_prefix_rewrite + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.backendService + field: path_matcher.default_route_action.weighted_backend_services.backend_service + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_add.replace + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.requestHeadersToRemove + field: path_matcher.default_route_action.weighted_backend_services.header_action.request_headers_to_remove + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_add.replace + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.headerAction.responseHeadersToRemove + field: path_matcher.default_route_action.weighted_backend_services.header_action.response_headers_to_remove + - api_field: pathMatchers.defaultRouteAction.weightedBackendServices.weight + field: path_matcher.default_route_action.weighted_backend_services.weight + - api_field: pathMatchers.defaultService + field: path_matcher.default_service + - api_field: pathMatchers.defaultUrlRedirect.hostRedirect + field: path_matcher.default_url_redirect.host_redirect + - api_field: pathMatchers.defaultUrlRedirect.httpsRedirect + field: path_matcher.default_url_redirect.https_redirect + - api_field: pathMatchers.defaultUrlRedirect.pathRedirect + field: path_matcher.default_url_redirect.path_redirect + - api_field: pathMatchers.defaultUrlRedirect.prefixRedirect + field: path_matcher.default_url_redirect.prefix_redirect + - api_field: pathMatchers.defaultUrlRedirect.redirectResponseCode + field: path_matcher.default_url_redirect.redirect_response_code + - api_field: pathMatchers.defaultUrlRedirect.stripQuery + field: path_matcher.default_url_redirect.strip_query + - api_field: pathMatchers.description + field: path_matcher.description + - api_field: pathMatchers.headerAction.requestHeadersToAdd.headerName + field: path_matcher.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.headerAction.requestHeadersToAdd.replace + field: path_matcher.header_action.request_headers_to_add.replace + - api_field: pathMatchers.headerAction.requestHeadersToRemove + field: path_matcher.header_action.request_headers_to_remove + - api_field: pathMatchers.headerAction.responseHeadersToAdd.headerName + field: path_matcher.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.headerAction.responseHeadersToAdd.replace + field: path_matcher.header_action.response_headers_to_add.replace + - api_field: pathMatchers.headerAction.responseHeadersToRemove + field: path_matcher.header_action.response_headers_to_remove + - api_field: pathMatchers.name + field: path_matcher.name + - api_field: pathMatchers.pathRules.customErrorResponsePolicy.errorResponseRules.matchResponseCodes + field: path_matcher.path_rule.custom_error_response_policy.error_response_rule.match_response_codes + - api_field: pathMatchers.pathRules.customErrorResponsePolicy.errorResponseRules.overrideResponseCode + field: path_matcher.path_rule.custom_error_response_policy.error_response_rule.override_response_code + - api_field: pathMatchers.pathRules.customErrorResponsePolicy.errorResponseRules.path + field: path_matcher.path_rule.custom_error_response_policy.error_response_rule.path + - api_field: pathMatchers.pathRules.customErrorResponsePolicy.errorService + field: path_matcher.path_rule.custom_error_response_policy.error_service + - api_field: pathMatchers.pathRules.paths + field: path_matcher.path_rule.paths + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowCredentials + field: path_matcher.path_rule.route_action.cors_policy.allow_credentials + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowHeaders + field: path_matcher.path_rule.route_action.cors_policy.allow_headers + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowMethods + field: path_matcher.path_rule.route_action.cors_policy.allow_methods + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowOriginRegexes + field: path_matcher.path_rule.route_action.cors_policy.allow_origin_regexes + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.allowOrigins + field: path_matcher.path_rule.route_action.cors_policy.allow_origins + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.disabled + field: path_matcher.path_rule.route_action.cors_policy.disabled + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.exposeHeaders + field: path_matcher.path_rule.route_action.cors_policy.expose_headers + - api_field: pathMatchers.pathRules.routeAction.corsPolicy.maxAge + field: path_matcher.path_rule.route_action.cors_policy.max_age + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.httpStatus + field: path_matcher.path_rule.route_action.fault_injection_policy.abort.http_status + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.abort.percentage + field: path_matcher.path_rule.route_action.fault_injection_policy.abort.percentage + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos + field: path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.nanos + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds + field: path_matcher.path_rule.route_action.fault_injection_policy.delay.fixed_delay.seconds + - api_field: pathMatchers.pathRules.routeAction.faultInjectionPolicy.delay.percentage + field: path_matcher.path_rule.route_action.fault_injection_policy.delay.percentage + - api_field: pathMatchers.pathRules.routeAction.maxStreamDuration.nanos + field: path_matcher.path_rule.route_action.max_stream_duration.nanos + - api_field: pathMatchers.pathRules.routeAction.maxStreamDuration.seconds + field: path_matcher.path_rule.route_action.max_stream_duration.seconds + - api_field: pathMatchers.pathRules.routeAction.requestMirrorPolicy.backendService + field: path_matcher.path_rule.route_action.request_mirror_policy.backend_service + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.numRetries + field: path_matcher.path_rule.route_action.retry_policy.num_retries + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.nanos + field: path_matcher.path_rule.route_action.retry_policy.per_try_timeout.nanos + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.perTryTimeout.seconds + field: path_matcher.path_rule.route_action.retry_policy.per_try_timeout.seconds + - api_field: pathMatchers.pathRules.routeAction.retryPolicy.retryConditions + field: path_matcher.path_rule.route_action.retry_policy.retry_conditions + - api_field: pathMatchers.pathRules.routeAction.timeout.nanos + field: path_matcher.path_rule.route_action.timeout.nanos + - api_field: pathMatchers.pathRules.routeAction.timeout.seconds + field: path_matcher.path_rule.route_action.timeout.seconds + - api_field: pathMatchers.pathRules.routeAction.urlRewrite.hostRewrite + field: path_matcher.path_rule.route_action.url_rewrite.host_rewrite + - api_field: pathMatchers.pathRules.routeAction.urlRewrite.pathPrefixRewrite + field: path_matcher.path_rule.route_action.url_rewrite.path_prefix_rewrite + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.backendService + field: path_matcher.path_rule.route_action.weighted_backend_services.backend_service + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_add.replace + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.request_headers_to_remove + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_add.replace + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove + field: path_matcher.path_rule.route_action.weighted_backend_services.header_action.response_headers_to_remove + - api_field: pathMatchers.pathRules.routeAction.weightedBackendServices.weight + field: path_matcher.path_rule.route_action.weighted_backend_services.weight + - api_field: pathMatchers.pathRules.service + field: path_matcher.path_rule.service + - api_field: pathMatchers.pathRules.urlRedirect.hostRedirect + field: path_matcher.path_rule.url_redirect.host_redirect + - api_field: pathMatchers.pathRules.urlRedirect.httpsRedirect + field: path_matcher.path_rule.url_redirect.https_redirect + - api_field: pathMatchers.pathRules.urlRedirect.pathRedirect + field: path_matcher.path_rule.url_redirect.path_redirect + - api_field: pathMatchers.pathRules.urlRedirect.prefixRedirect + field: path_matcher.path_rule.url_redirect.prefix_redirect + - api_field: pathMatchers.pathRules.urlRedirect.redirectResponseCode + field: path_matcher.path_rule.url_redirect.redirect_response_code + - api_field: pathMatchers.pathRules.urlRedirect.stripQuery + field: path_matcher.path_rule.url_redirect.strip_query + - api_field: pathMatchers.routeRules.customErrorResponsePolicy.errorResponseRules.matchResponseCodes + field: path_matcher.route_rules.custom_error_response_policy.error_response_rule.match_response_codes + - api_field: pathMatchers.routeRules.customErrorResponsePolicy.errorResponseRules.overrideResponseCode + field: path_matcher.route_rules.custom_error_response_policy.error_response_rule.override_response_code + - api_field: pathMatchers.routeRules.customErrorResponsePolicy.errorResponseRules.path + field: path_matcher.route_rules.custom_error_response_policy.error_response_rule.path + - api_field: pathMatchers.routeRules.customErrorResponsePolicy.errorService + field: path_matcher.route_rules.custom_error_response_policy.error_service + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerName + field: path_matcher.route_rules.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.route_rules.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace + field: path_matcher.route_rules.header_action.request_headers_to_add.replace + - api_field: pathMatchers.routeRules.headerAction.requestHeadersToRemove + field: path_matcher.route_rules.header_action.request_headers_to_remove + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerName + field: path_matcher.route_rules.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.route_rules.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace + field: path_matcher.route_rules.header_action.response_headers_to_add.replace + - api_field: pathMatchers.routeRules.headerAction.responseHeadersToRemove + field: path_matcher.route_rules.header_action.response_headers_to_remove + - api_field: pathMatchers.routeRules.matchRules.fullPathMatch + field: path_matcher.route_rules.match_rules.full_path_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.exactMatch + field: path_matcher.route_rules.match_rules.header_matches.exact_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.headerName + field: path_matcher.route_rules.match_rules.header_matches.header_name + - api_field: pathMatchers.routeRules.matchRules.headerMatches.invertMatch + field: path_matcher.route_rules.match_rules.header_matches.invert_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.prefixMatch + field: path_matcher.route_rules.match_rules.header_matches.prefix_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.presentMatch + field: path_matcher.route_rules.match_rules.header_matches.present_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeEnd + field: path_matcher.route_rules.match_rules.header_matches.range_match.range_end + - api_field: pathMatchers.routeRules.matchRules.headerMatches.rangeMatch.rangeStart + field: path_matcher.route_rules.match_rules.header_matches.range_match.range_start + - api_field: pathMatchers.routeRules.matchRules.headerMatches.regexMatch + field: path_matcher.route_rules.match_rules.header_matches.regex_match + - api_field: pathMatchers.routeRules.matchRules.headerMatches.suffixMatch + field: path_matcher.route_rules.match_rules.header_matches.suffix_match + - api_field: pathMatchers.routeRules.matchRules.ignoreCase + field: path_matcher.route_rules.match_rules.ignore_case + - api_field: pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.name + field: path_matcher.route_rules.match_rules.metadata_filters.filter_labels.name + - api_field: pathMatchers.routeRules.matchRules.metadataFilters.filterLabels.value + field: path_matcher.route_rules.match_rules.metadata_filters.filter_labels.value + - api_field: pathMatchers.routeRules.matchRules.metadataFilters.filterMatchCriteria + field: path_matcher.route_rules.match_rules.metadata_filters.filter_match_criteria + - api_field: pathMatchers.routeRules.matchRules.pathTemplateMatch + field: path_matcher.route_rules.match_rules.path_template_match + - api_field: pathMatchers.routeRules.matchRules.prefixMatch + field: path_matcher.route_rules.match_rules.prefix_match + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.exactMatch + field: path_matcher.route_rules.match_rules.query_parameter_matches.exact_match + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.name + field: path_matcher.route_rules.match_rules.query_parameter_matches.name + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.presentMatch + field: path_matcher.route_rules.match_rules.query_parameter_matches.present_match + - api_field: pathMatchers.routeRules.matchRules.queryParameterMatches.regexMatch + field: path_matcher.route_rules.match_rules.query_parameter_matches.regex_match + - api_field: pathMatchers.routeRules.matchRules.regexMatch + field: path_matcher.route_rules.match_rules.regex_match + - api_field: pathMatchers.routeRules.priority + field: path_matcher.route_rules.priority + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowCredentials + field: path_matcher.route_rules.route_action.cors_policy.allow_credentials + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowHeaders + field: path_matcher.route_rules.route_action.cors_policy.allow_headers + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowMethods + field: path_matcher.route_rules.route_action.cors_policy.allow_methods + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowOriginRegexes + field: path_matcher.route_rules.route_action.cors_policy.allow_origin_regexes + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.allowOrigins + field: path_matcher.route_rules.route_action.cors_policy.allow_origins + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.disabled + field: path_matcher.route_rules.route_action.cors_policy.disabled + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.exposeHeaders + field: path_matcher.route_rules.route_action.cors_policy.expose_headers + - api_field: pathMatchers.routeRules.routeAction.corsPolicy.maxAge + field: path_matcher.route_rules.route_action.cors_policy.max_age + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.httpStatus + field: path_matcher.route_rules.route_action.fault_injection_policy.abort.http_status + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.abort.percentage + field: path_matcher.route_rules.route_action.fault_injection_policy.abort.percentage + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.nanos + field: path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.nanos + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.fixedDelay.seconds + field: path_matcher.route_rules.route_action.fault_injection_policy.delay.fixed_delay.seconds + - api_field: pathMatchers.routeRules.routeAction.faultInjectionPolicy.delay.percentage + field: path_matcher.route_rules.route_action.fault_injection_policy.delay.percentage + - api_field: pathMatchers.routeRules.routeAction.maxStreamDuration.nanos + field: path_matcher.route_rules.route_action.max_stream_duration.nanos + - api_field: pathMatchers.routeRules.routeAction.maxStreamDuration.seconds + field: path_matcher.route_rules.route_action.max_stream_duration.seconds + - api_field: pathMatchers.routeRules.routeAction.requestMirrorPolicy.backendService + field: path_matcher.route_rules.route_action.request_mirror_policy.backend_service + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.numRetries + field: path_matcher.route_rules.route_action.retry_policy.num_retries + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.nanos + field: path_matcher.route_rules.route_action.retry_policy.per_try_timeout.nanos + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.perTryTimeout.seconds + field: path_matcher.route_rules.route_action.retry_policy.per_try_timeout.seconds + - api_field: pathMatchers.routeRules.routeAction.retryPolicy.retryConditions + field: path_matcher.route_rules.route_action.retry_policy.retry_conditions + - api_field: pathMatchers.routeRules.routeAction.timeout.nanos + field: path_matcher.route_rules.route_action.timeout.nanos + - api_field: pathMatchers.routeRules.routeAction.timeout.seconds + field: path_matcher.route_rules.route_action.timeout.seconds + - api_field: pathMatchers.routeRules.routeAction.urlRewrite.hostRewrite + field: path_matcher.route_rules.route_action.url_rewrite.host_rewrite + - api_field: pathMatchers.routeRules.routeAction.urlRewrite.pathPrefixRewrite + field: path_matcher.route_rules.route_action.url_rewrite.path_prefix_rewrite + - api_field: pathMatchers.routeRules.routeAction.urlRewrite.pathTemplateRewrite + field: path_matcher.route_rules.route_action.url_rewrite.path_template_rewrite + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.backendService + field: path_matcher.route_rules.route_action.weighted_backend_services.backend_service + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerName + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_name + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.headerValue + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.header_value + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToAdd.replace + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_add.replace + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.requestHeadersToRemove + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.request_headers_to_remove + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerName + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_name + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.headerValue + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.header_value + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToAdd.replace + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_add.replace + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.headerAction.responseHeadersToRemove + field: path_matcher.route_rules.route_action.weighted_backend_services.header_action.response_headers_to_remove + - api_field: pathMatchers.routeRules.routeAction.weightedBackendServices.weight + field: path_matcher.route_rules.route_action.weighted_backend_services.weight + - api_field: pathMatchers.routeRules.service + field: path_matcher.route_rules.service + - api_field: pathMatchers.routeRules.urlRedirect.hostRedirect + field: path_matcher.route_rules.url_redirect.host_redirect + - api_field: pathMatchers.routeRules.urlRedirect.httpsRedirect + field: path_matcher.route_rules.url_redirect.https_redirect + - api_field: pathMatchers.routeRules.urlRedirect.pathRedirect + field: path_matcher.route_rules.url_redirect.path_redirect + - api_field: pathMatchers.routeRules.urlRedirect.prefixRedirect + field: path_matcher.route_rules.url_redirect.prefix_redirect + - api_field: pathMatchers.routeRules.urlRedirect.redirectResponseCode + field: path_matcher.route_rules.url_redirect.redirect_response_code + - api_field: pathMatchers.routeRules.urlRedirect.stripQuery + field: path_matcher.route_rules.url_redirect.strip_query + - api_field: tests.description + field: test.description + - api_field: tests.expectedOutputUrl + field: test.expected_output_url + - api_field: tests.expectedRedirectResponseCode + field: test.expected_redirect_response_code + - api_field: tests.headers.name + field: test.headers.name + - api_field: tests.headers.value + field: test.headers.value + - api_field: tests.host + field: test.host + - api_field: tests.path + field: test.path + - api_field: tests.service + field: test.service + - api_field: selfLink diff --git a/google/services/compute/resource_compute_vpn_gateway_generated_meta.yaml b/google/services/compute/resource_compute_vpn_gateway_generated_meta.yaml index d732b2ef2fd..ee94778027b 100644 --- a/google/services/compute/resource_compute_vpn_gateway_generated_meta.yaml +++ b/google/services/compute/resource_compute_vpn_gateway_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_compute_vpn_gateway' -generation_type: 'mmv1' -source_file: 'products/compute/VpnGateway.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VpnGateway' +resource: google_compute_vpn_gateway +generation_type: mmv1 +source_file: products/compute/VpnGateway.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: VpnGateway fields: - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'id' - field: 'gateway_id' - - api_field: 'name' - - api_field: 'network' - - api_field: 'region' - - api_field: 'selfLink' + - api_field: creationTimestamp + - api_field: description + - api_field: id + field: gateway_id + - api_field: name + - api_field: network + - api_field: region + - api_field: selfLink diff --git a/google/services/compute/resource_compute_vpn_tunnel.go b/google/services/compute/resource_compute_vpn_tunnel.go index 094c8111183..b0a8fe7a82c 100644 --- a/google/services/compute/resource_compute_vpn_tunnel.go +++ b/google/services/compute/resource_compute_vpn_tunnel.go @@ -260,44 +260,40 @@ except the last character, which cannot be a dash.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "dh": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, Description: `Diffie-Hellman groups.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Set: schema.HashString, }, "encryption": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, Description: `Encryption algorithms.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Set: schema.HashString, }, "integrity": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, Description: `Integrity algorithms.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Set: schema.HashString, }, "prf": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, Description: `Pseudo-random functions.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Set: schema.HashString, }, }, }, @@ -311,34 +307,31 @@ except the last character, which cannot be a dash.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "encryption": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, Description: `Encryption algorithms.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Set: schema.HashString, }, "integrity": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, Description: `Integrity algorithms.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Set: schema.HashString, }, "pfs": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, ForceNew: true, Description: `Perfect forward secrecy groups.`, Elem: &schema.Schema{ Type: schema.TypeString, }, - Set: schema.HashString, }, }, }, @@ -1312,31 +1305,19 @@ func flattenComputeVpnTunnelCipherSuitePhase1(v interface{}, d *schema.ResourceD return []interface{}{transformed} } func flattenComputeVpnTunnelCipherSuitePhase1Encryption(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return v - } - return schema.NewSet(schema.HashString, v.([]interface{})) + return v } func flattenComputeVpnTunnelCipherSuitePhase1Integrity(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return v - } - return schema.NewSet(schema.HashString, v.([]interface{})) + return v } func flattenComputeVpnTunnelCipherSuitePhase1Prf(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return v - } - return schema.NewSet(schema.HashString, v.([]interface{})) + return v } func flattenComputeVpnTunnelCipherSuitePhase1Dh(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return v - } - return schema.NewSet(schema.HashString, v.([]interface{})) + return v } func flattenComputeVpnTunnelCipherSuitePhase2(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -1357,24 +1338,15 @@ func flattenComputeVpnTunnelCipherSuitePhase2(v interface{}, d *schema.ResourceD return []interface{}{transformed} } func flattenComputeVpnTunnelCipherSuitePhase2Encryption(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return v - } - return schema.NewSet(schema.HashString, v.([]interface{})) + return v } func flattenComputeVpnTunnelCipherSuitePhase2Integrity(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return v - } - return schema.NewSet(schema.HashString, v.([]interface{})) + return v } func flattenComputeVpnTunnelCipherSuitePhase2Pfs(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - if v == nil { - return v - } - return schema.NewSet(schema.HashString, v.([]interface{})) + return v } func flattenComputeVpnTunnelSharedSecretWoVersion(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -1571,22 +1543,18 @@ func expandComputeVpnTunnelCipherSuitePhase1(v interface{}, d tpgresource.Terraf } func expandComputeVpnTunnelCipherSuitePhase1Encryption(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - v = v.(*schema.Set).List() return v, nil } func expandComputeVpnTunnelCipherSuitePhase1Integrity(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - v = v.(*schema.Set).List() return v, nil } func expandComputeVpnTunnelCipherSuitePhase1Prf(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - v = v.(*schema.Set).List() return v, nil } func expandComputeVpnTunnelCipherSuitePhase1Dh(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - v = v.(*schema.Set).List() return v, nil } @@ -1627,17 +1595,14 @@ func expandComputeVpnTunnelCipherSuitePhase2(v interface{}, d tpgresource.Terraf } func expandComputeVpnTunnelCipherSuitePhase2Encryption(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - v = v.(*schema.Set).List() return v, nil } func expandComputeVpnTunnelCipherSuitePhase2Integrity(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - v = v.(*schema.Set).List() return v, nil } func expandComputeVpnTunnelCipherSuitePhase2Pfs(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - v = v.(*schema.Set).List() return v, nil } diff --git a/google/services/compute/resource_compute_vpn_tunnel_generated_meta.yaml b/google/services/compute/resource_compute_vpn_tunnel_generated_meta.yaml index efb80b3a084..7c24a9302fd 100644 --- a/google/services/compute/resource_compute_vpn_tunnel_generated_meta.yaml +++ b/google/services/compute/resource_compute_vpn_tunnel_generated_meta.yaml @@ -1,45 +1,45 @@ -resource: 'google_compute_vpn_tunnel' -generation_type: 'mmv1' -source_file: 'products/compute/VpnTunnel.yaml' -api_service_name: 'compute.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VpnTunnel' +resource: google_compute_vpn_tunnel +generation_type: mmv1 +source_file: products/compute/VpnTunnel.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: VpnTunnel fields: - - api_field: 'cipherSuite.phase1.dh' - - api_field: 'cipherSuite.phase1.encryption' - - api_field: 'cipherSuite.phase1.integrity' - - api_field: 'cipherSuite.phase1.prf' - - api_field: 'cipherSuite.phase2.encryption' - - api_field: 'cipherSuite.phase2.integrity' - - api_field: 'cipherSuite.phase2.pfs' - - api_field: 'creationTimestamp' - - api_field: 'description' - - api_field: 'detailedStatus' - - field: 'effective_labels' - provider_only: true - - api_field: 'ikeVersion' - - api_field: 'labelFingerprint' - - api_field: 'labels' - - api_field: 'localTrafficSelector' - - api_field: 'name' - - api_field: 'peerExternalGateway' - - api_field: 'peerExternalGatewayInterface' - - api_field: 'peerGcpGateway' - - api_field: 'peerIp' - - api_field: 'region' - - api_field: 'remoteTrafficSelector' - - api_field: 'router' - - api_field: 'sharedSecret' - - api_field: 'sharedSecretHash' - - api_field: 'sharedSecret' - field: 'shared_secret_wo' - - field: 'shared_secret_wo_version' - provider_only: true - - api_field: 'targetVpnGateway' - - field: 'terraform_labels' - provider_only: true - - api_field: 'id' - field: 'tunnel_id' - - api_field: 'vpnGateway' - - api_field: 'vpnGatewayInterface' - - api_field: 'selfLink' + - api_field: cipherSuite.phase1.dh + - api_field: cipherSuite.phase1.encryption + - api_field: cipherSuite.phase1.integrity + - api_field: cipherSuite.phase1.prf + - api_field: cipherSuite.phase2.encryption + - api_field: cipherSuite.phase2.integrity + - api_field: cipherSuite.phase2.pfs + - api_field: creationTimestamp + - api_field: description + - api_field: detailedStatus + - field: effective_labels + provider_only: true + - api_field: ikeVersion + - api_field: labelFingerprint + - api_field: labels + - api_field: localTrafficSelector + - api_field: name + - api_field: peerExternalGateway + - api_field: peerExternalGatewayInterface + - api_field: peerGcpGateway + - api_field: peerIp + - api_field: region + - api_field: remoteTrafficSelector + - api_field: router + - api_field: sharedSecret + - api_field: sharedSecretHash + - api_field: sharedSecret + field: shared_secret_wo + - field: shared_secret_wo_version + provider_only: true + - api_field: targetVpnGateway + - field: terraform_labels + provider_only: true + - api_field: id + field: tunnel_id + - api_field: vpnGateway + - api_field: vpnGatewayInterface + - api_field: selfLink diff --git a/google/services/compute/resource_compute_vpn_tunnel_test.go b/google/services/compute/resource_compute_vpn_tunnel_test.go index 4bb47ff5da8..bb480ecaca9 100644 --- a/google/services/compute/resource_compute_vpn_tunnel_test.go +++ b/google/services/compute/resource_compute_vpn_tunnel_test.go @@ -145,6 +145,99 @@ func TestAccComputeVpnTunnel_defaultTrafficSelectors(t *testing.T) { }) } +// TestAccComputeVpnTunnel_cipherSuite tests the 'cipher_suite' block in the google_compute_vpn_tunnel resource. +func TestAccComputeVpnTunnel_cipherSuite(t *testing.T) { + t.Parallel() + + // A unique name for the test resources + suffix := acctest.RandString(t, 10) + // Other necessary resources like network, gateway, etc. would be defined here. + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckComputeVpnTunnelDestroyProducer(t), + Steps: []resource.TestStep{ + { + // Test case 1: Basic cipher suite configuration + Config: testAccComputeVpnTunnel_basicCipherSuite(suffix), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_compute_vpn_tunnel.test_tunnel", "cipher_suite.0.phase1.0.encryption.0", "AES-GCM-16-128"), + resource.TestCheckResourceAttr("google_compute_vpn_tunnel.test_tunnel", "cipher_suite.0.phase1.0.encryption.1", "AES-GCM-16-192"), + resource.TestCheckResourceAttr("google_compute_vpn_tunnel.test_tunnel", "cipher_suite.0.phase2.0.integrity.0", "HMAC-SHA2-256-128"), + resource.TestCheckResourceAttr("google_compute_vpn_tunnel.test_tunnel", "cipher_suite.0.phase2.0.integrity.1", "HMAC-SHA1-96"), + ), + }, + }, + }) +} + +func testAccComputeVpnTunnel_basicCipherSuite(suffix string) string { + return fmt.Sprintf(` +resource "google_compute_network" "foobar" { + name = "tf-test-network-%[1]s" + auto_create_subnetworks = false +} + +resource "google_compute_subnetwork" "foobar" { + name = "tf-test-subnetwork-%[1]s" + network = google_compute_network.foobar.self_link + ip_cidr_range = "10.0.0.0/16" + region = "us-central1" +} + +resource "google_compute_address" "foobar" { + name = "tf-test-%[1]s" + region = google_compute_subnetwork.foobar.region +} + +resource "google_compute_ha_vpn_gateway" "foobar" { + name = "tf-test-%[1]s" + network = google_compute_network.foobar.self_link + region = google_compute_subnetwork.foobar.region +} + +resource "google_compute_external_vpn_gateway" "external_gateway" { + name = "external-gateway-%[1]s" + redundancy_type = "SINGLE_IP_INTERNALLY_REDUNDANT" + description = "An externally managed VPN gateway" + interface { + id = 0 + ip_address = "8.8.8.8" + } +} + +resource "google_compute_router" "foobar" { + name = "tf-test-router-%[1]s" + region = google_compute_subnetwork.foobar.region + network = google_compute_network.foobar.self_link + bgp { + asn = 64514 + } +} + +resource "google_compute_vpn_tunnel" "test_tunnel" { + name = "tf-test-ha-vpn-tunnel-%[1]s" + region = "us-central1" + vpn_gateway = google_compute_ha_vpn_gateway.foobar.id + peer_external_gateway = google_compute_external_vpn_gateway.external_gateway.id + peer_external_gateway_interface = 0 + shared_secret = "unguessable" + router = google_compute_router.foobar.self_link + vpn_gateway_interface = 0 + + cipher_suite { + phase1 { + encryption = ["AES-GCM-16-128", "AES-GCM-16-192"] + } + phase2 { + integrity = ["HMAC-SHA2-256-128", "HMAC-SHA1-96"] + } + } +} +`, suffix) +} + func testAccComputeVpnTunnel_regionFromGateway(suffix, region string) string { return fmt.Sprintf(` resource "google_compute_network" "foobar" { diff --git a/google/services/compute/resource_compute_wire_group.go b/google/services/compute/resource_compute_wire_group.go new file mode 100644 index 00000000000..266d38f961a --- /dev/null +++ b/google/services/compute/resource_compute_wire_group.go @@ -0,0 +1,1118 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/compute/WireGroup.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package compute + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceComputeWireGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceComputeWireGroupCreate, + Read: resourceComputeWireGroupRead, + Update: resourceComputeWireGroupUpdate, + Delete: resourceComputeWireGroupDelete, + + Importer: &schema.ResourceImporter{ + State: resourceComputeWireGroupImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "cross_site_network": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "cross_site_network": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: tpgresource.CompareResourceNames, + Description: `Required cross site network to which wire group belongs.`, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: verify.ValidateRegexp(`^[a-z]([-a-z0-9]*[a-z0-9])?$`), + Description: `Name of the resource. Provided by the client when the resource is created. The name must be +1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters +long and match the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the first +character must be a lowercase letter, and all following characters must be a dash, +lowercase letter, or digit, except the last character, which cannot be a dash.`, + }, + "admin_enabled": { + Type: schema.TypeBool, + Optional: true, + Description: `Indicates whether the wire group is administratively enabled.`, + Default: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Description: `An optional description of this resource. Provide this property when you create the resource.`, + }, + "endpoints": { + Type: schema.TypeSet, + Optional: true, + Description: `Endpoints grouped by location, each mapping to interconnect configurations.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "endpoint": { + Type: schema.TypeString, + Required: true, + }, + "interconnects": { + Type: schema.TypeSet, + Optional: true, + Description: ``, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "interconnect_name": { + Type: schema.TypeString, + Required: true, + }, + "interconnect": { + Type: schema.TypeString, + Optional: true, + Description: ``, + }, + "vlan_tags": { + Type: schema.TypeList, + Optional: true, + Description: `VLAN tags for the interconnect.`, + Elem: &schema.Schema{ + Type: schema.TypeInt, + }, + }, + }, + }, + }, + }, + }, + }, + "wire_properties": { + Type: schema.TypeList, + Optional: true, + Description: `Default properties for wires within the group.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bandwidth_allocation": { + Type: schema.TypeString, + Required: true, + Description: `The configuration of a wire's bandwidth allocation. +ALLOCATE_PER_WIRE: configures a separate unmetered bandwidth allocation (and associated charges) for each wire in the group. +SHARED_WITH_WIRE_GROUP: this is the default behavior, which configures one unmetered bandwidth allocation for the wire group. The unmetered bandwidth is divided equally across each wire in the group, but dynamic +throttling reallocates unused unmetered bandwidth from unused or underused wires to other wires in the group.`, + }, + "bandwidth_unmetered": { + Type: schema.TypeInt, + Optional: true, + Description: `The unmetered bandwidth setting.`, + }, + "fault_response": { + Type: schema.TypeString, + Optional: true, + Description: `Response when a fault is detected in a pseudowire: +NONE: default. +DISABLE_PORT: set the port line protocol down when inline probes detect a fault. This setting is only permitted on port mode pseudowires.`, + }, + }, + }, + }, + "creation_timestamp": { + Type: schema.TypeString, + Computed: true, + Description: `Creation timestamp in RFC3339 text format.`, + }, + "topology": { + Type: schema.TypeList, + Computed: true, + Description: `Topology details for the wire group configuration.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "endpoints": { + Type: schema.TypeList, + Computed: true, + Description: ``, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "city": { + Type: schema.TypeString, + Computed: true, + Description: ``, + }, + "label": { + Type: schema.TypeString, + Computed: true, + Description: ``, + }, + }, + }, + }, + }, + }, + }, + "wires": { + Type: schema.TypeList, + Computed: true, + Description: `The single/redundant wire(s) managed by the wire group.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "admin_enabled": { + Type: schema.TypeBool, + Computed: true, + Description: ``, + }, + "endpoints": { + Type: schema.TypeList, + Computed: true, + Description: `'Wire endpoints are specific Interconnect connections.'`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "interconnect": { + Type: schema.TypeString, + Computed: true, + Description: ``, + }, + "vlan_tag": { + Type: schema.TypeInt, + Computed: true, + Description: ``, + }, + }, + }, + }, + "label": { + Type: schema.TypeString, + Computed: true, + Description: ``, + }, + "wire_properties": { + Type: schema.TypeList, + Computed: true, + Description: `A nested object resource.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bandwidth_unmetered": { + Type: schema.TypeInt, + Computed: true, + Description: ``, + }, + "fault_response": { + Type: schema.TypeString, + Computed: true, + Description: ``, + }, + }, + }, + }, + }, + }, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceComputeWireGroupCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + descriptionProp, err := expandComputeWireGroupDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + nameProp, err := expandComputeWireGroupName(d.Get("name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("name"); !tpgresource.IsEmptyValue(reflect.ValueOf(nameProp)) && (ok || !reflect.DeepEqual(v, nameProp)) { + obj["name"] = nameProp + } + endpointsProp, err := expandComputeWireGroupEndpoints(d.Get("endpoints"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("endpoints"); !tpgresource.IsEmptyValue(reflect.ValueOf(endpointsProp)) && (ok || !reflect.DeepEqual(v, endpointsProp)) { + obj["endpoints"] = endpointsProp + } + adminEnabledProp, err := expandComputeWireGroupAdminEnabled(d.Get("admin_enabled"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("admin_enabled"); !tpgresource.IsEmptyValue(reflect.ValueOf(adminEnabledProp)) && (ok || !reflect.DeepEqual(v, adminEnabledProp)) { + obj["adminEnabled"] = adminEnabledProp + } + wirePropertiesProp, err := expandComputeWireGroupWireProperties(d.Get("wire_properties"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("wire_properties"); !tpgresource.IsEmptyValue(reflect.ValueOf(wirePropertiesProp)) && (ok || !reflect.DeepEqual(v, wirePropertiesProp)) { + obj["wireProperties"] = wirePropertiesProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new WireGroup: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for WireGroup: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating WireGroup: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if crossSiteNetworkValue, ok := d.GetOk("cross_site_network"); ok && crossSiteNetworkValue.(string) != "" { + if err = identity.Set("cross_site_network", crossSiteNetworkValue.(string)); err != nil { + return fmt.Errorf("Error setting cross_site_network: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + err = ComputeOperationWaitTime( + config, res, project, "Creating WireGroup", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create WireGroup: %s", err) + } + + log.Printf("[DEBUG] Finished creating WireGroup %q: %#v", d.Id(), res) + + return resourceComputeWireGroupRead(d, meta) +} + +func resourceComputeWireGroupRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for WireGroup: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("ComputeWireGroup %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + + if err := d.Set("description", flattenComputeWireGroupDescription(res["description"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + if err := d.Set("creation_timestamp", flattenComputeWireGroupCreationTimestamp(res["creationTimestamp"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + if err := d.Set("name", flattenComputeWireGroupName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + if err := d.Set("endpoints", flattenComputeWireGroupEndpoints(res["endpoints"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + if err := d.Set("admin_enabled", flattenComputeWireGroupAdminEnabled(res["adminEnabled"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + if err := d.Set("wire_properties", flattenComputeWireGroupWireProperties(res["wireProperties"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + if err := d.Set("wires", flattenComputeWireGroupWires(res["wires"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + if err := d.Set("topology", flattenComputeWireGroupTopology(res["topology"], d, config)); err != nil { + return fmt.Errorf("Error reading WireGroup: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("name"); !ok && v == "" { + err = identity.Set("name", d.Get("name").(string)) + if err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if v, ok := identity.GetOk("cross_site_network"); !ok && v == "" { + err = identity.Set("cross_site_network", d.Get("cross_site_network").(string)) + if err != nil { + return fmt.Errorf("Error setting cross_site_network: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceComputeWireGroupUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if crossSiteNetworkValue, ok := d.GetOk("cross_site_network"); ok && crossSiteNetworkValue.(string) != "" { + if err = identity.Set("cross_site_network", crossSiteNetworkValue.(string)); err != nil { + return fmt.Errorf("Error setting cross_site_network: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for WireGroup: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + descriptionProp, err := expandComputeWireGroupDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + nameProp, err := expandComputeWireGroupName(d.Get("name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("name"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, nameProp)) { + obj["name"] = nameProp + } + endpointsProp, err := expandComputeWireGroupEndpoints(d.Get("endpoints"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("endpoints"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, endpointsProp)) { + obj["endpoints"] = endpointsProp + } + adminEnabledProp, err := expandComputeWireGroupAdminEnabled(d.Get("admin_enabled"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("admin_enabled"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, adminEnabledProp)) { + obj["adminEnabled"] = adminEnabledProp + } + wirePropertiesProp, err := expandComputeWireGroupWireProperties(d.Get("wire_properties"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("wire_properties"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, wirePropertiesProp)) { + obj["wireProperties"] = wirePropertiesProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating WireGroup %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + if d.HasChange("description") { + updateMask = append(updateMask, "description") + } + + if d.HasChange("name") { + updateMask = append(updateMask, "name") + } + + if d.HasChange("endpoints") { + updateMask = append(updateMask, "endpoints") + } + + if d.HasChange("admin_enabled") { + updateMask = append(updateMask, "adminEnabled") + } + + if d.HasChange("wire_properties") { + updateMask = append(updateMask, "wireProperties") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating WireGroup %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating WireGroup %q: %#v", d.Id(), res) + } + + err = ComputeOperationWaitTime( + config, res, project, "Updating WireGroup", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + } + + return resourceComputeWireGroupRead(d, meta) +} + +func resourceComputeWireGroupDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for WireGroup: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting WireGroup %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "WireGroup") + } + + err = ComputeOperationWaitTime( + config, res, project, "Deleting WireGroup", userAgent, + d.Timeout(schema.TimeoutDelete)) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Finished deleting WireGroup %q: %#v", d.Id(), res) + return nil +} + +func resourceComputeWireGroupImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/global/crossSiteNetworks/(?P[^/]+)/wireGroups/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenComputeWireGroupDescription(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupCreationTimestamp(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupEndpoints(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.(map[string]interface{}) + transformed := make([]interface{}, 0, len(l)) + for k, raw := range l { + original := raw.(map[string]interface{}) + transformed = append(transformed, map[string]interface{}{ + "endpoint": k, + "interconnects": flattenComputeWireGroupEndpointsInterconnects(original["interconnects"], d, config), + }) + } + return transformed +} +func flattenComputeWireGroupEndpointsInterconnects(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.(map[string]interface{}) + transformed := make([]interface{}, 0, len(l)) + for k, raw := range l { + original := raw.(map[string]interface{}) + transformed = append(transformed, map[string]interface{}{ + "interconnect_name": k, + "interconnect": flattenComputeWireGroupEndpointsInterconnectsInterconnect(original["interconnect"], d, config), + "vlan_tags": flattenComputeWireGroupEndpointsInterconnectsVlanTags(original["vlanTags"], d, config), + }) + } + return transformed +} +func flattenComputeWireGroupEndpointsInterconnectsInterconnect(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupEndpointsInterconnectsVlanTags(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupAdminEnabled(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupWireProperties(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["bandwidth_unmetered"] = + flattenComputeWireGroupWirePropertiesBandwidthUnmetered(original["bandwidthUnmetered"], d, config) + transformed["fault_response"] = + flattenComputeWireGroupWirePropertiesFaultResponse(original["faultResponse"], d, config) + transformed["bandwidth_allocation"] = + flattenComputeWireGroupWirePropertiesBandwidthAllocation(original["bandwidthAllocation"], d, config) + return []interface{}{transformed} +} +func flattenComputeWireGroupWirePropertiesBandwidthUnmetered(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenComputeWireGroupWirePropertiesFaultResponse(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupWirePropertiesBandwidthAllocation(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupWires(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "label": flattenComputeWireGroupWiresLabel(original["label"], d, config), + "endpoints": flattenComputeWireGroupWiresEndpoints(original["endpoints"], d, config), + "wire_properties": flattenComputeWireGroupWiresWireProperties(original["wireProperties"], d, config), + "admin_enabled": flattenComputeWireGroupWiresAdminEnabled(original["adminEnabled"], d, config), + }) + } + return transformed +} +func flattenComputeWireGroupWiresLabel(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupWiresEndpoints(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "interconnect": flattenComputeWireGroupWiresEndpointsInterconnect(original["interconnect"], d, config), + "vlan_tag": flattenComputeWireGroupWiresEndpointsVlanTag(original["vlanTag"], d, config), + }) + } + return transformed +} +func flattenComputeWireGroupWiresEndpointsInterconnect(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupWiresEndpointsVlanTag(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenComputeWireGroupWiresWireProperties(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["bandwidth_unmetered"] = + flattenComputeWireGroupWiresWirePropertiesBandwidthUnmetered(original["bandwidthUnmetered"], d, config) + transformed["fault_response"] = + flattenComputeWireGroupWiresWirePropertiesFaultResponse(original["faultResponse"], d, config) + return []interface{}{transformed} +} +func flattenComputeWireGroupWiresWirePropertiesBandwidthUnmetered(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenComputeWireGroupWiresWirePropertiesFaultResponse(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupWiresAdminEnabled(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupTopology(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["endpoints"] = + flattenComputeWireGroupTopologyEndpoints(original["endpoints"], d, config) + return []interface{}{transformed} +} +func flattenComputeWireGroupTopologyEndpoints(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "label": flattenComputeWireGroupTopologyEndpointsLabel(original["label"], d, config), + "city": flattenComputeWireGroupTopologyEndpointsCity(original["city"], d, config), + }) + } + return transformed +} +func flattenComputeWireGroupTopologyEndpointsLabel(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenComputeWireGroupTopologyEndpointsCity(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandComputeWireGroupDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeWireGroupName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeWireGroupEndpoints(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]interface{}, error) { + if v == nil { + return map[string]interface{}{}, nil + } + m := make(map[string]interface{}) + for _, raw := range v.(*schema.Set).List() { + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedInterconnects, err := expandComputeWireGroupEndpointsInterconnects(original["interconnects"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedInterconnects); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["interconnects"] = transformedInterconnects + } + + transformedEndpoint, err := tpgresource.ExpandString(original["endpoint"], d, config) + if err != nil { + return nil, err + } + m[transformedEndpoint] = transformed + } + return m, nil +} + +func expandComputeWireGroupEndpointsInterconnects(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]interface{}, error) { + if v == nil { + return map[string]interface{}{}, nil + } + m := make(map[string]interface{}) + for _, raw := range v.(*schema.Set).List() { + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedInterconnect, err := expandComputeWireGroupEndpointsInterconnectsInterconnect(original["interconnect"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedInterconnect); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["interconnect"] = transformedInterconnect + } + + transformedVlanTags, err := expandComputeWireGroupEndpointsInterconnectsVlanTags(original["vlan_tags"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedVlanTags); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["vlanTags"] = transformedVlanTags + } + + transformedInterconnectName, err := tpgresource.ExpandString(original["interconnect_name"], d, config) + if err != nil { + return nil, err + } + m[transformedInterconnectName] = transformed + } + return m, nil +} + +func expandComputeWireGroupEndpointsInterconnectsInterconnect(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeWireGroupEndpointsInterconnectsVlanTags(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeWireGroupAdminEnabled(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeWireGroupWireProperties(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedBandwidthUnmetered, err := expandComputeWireGroupWirePropertiesBandwidthUnmetered(original["bandwidth_unmetered"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedBandwidthUnmetered); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["bandwidthUnmetered"] = transformedBandwidthUnmetered + } + + transformedFaultResponse, err := expandComputeWireGroupWirePropertiesFaultResponse(original["fault_response"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedFaultResponse); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["faultResponse"] = transformedFaultResponse + } + + transformedBandwidthAllocation, err := expandComputeWireGroupWirePropertiesBandwidthAllocation(original["bandwidth_allocation"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedBandwidthAllocation); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["bandwidthAllocation"] = transformedBandwidthAllocation + } + + return transformed, nil +} + +func expandComputeWireGroupWirePropertiesBandwidthUnmetered(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeWireGroupWirePropertiesFaultResponse(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandComputeWireGroupWirePropertiesBandwidthAllocation(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} diff --git a/google/services/compute/resource_compute_wire_group_generated_meta.yaml b/google/services/compute/resource_compute_wire_group_generated_meta.yaml new file mode 100644 index 00000000000..f546febf9a8 --- /dev/null +++ b/google/services/compute/resource_compute_wire_group_generated_meta.yaml @@ -0,0 +1,32 @@ +resource: google_compute_wire_group +generation_type: mmv1 +source_file: products/compute/WireGroup.yaml +api_service_name: compute.googleapis.com +api_version: v1 +api_resource_type_kind: WireGroup +fields: + - api_field: adminEnabled + - api_field: creationTimestamp + - field: cross_site_network + provider_only: true + - api_field: description + - api_field: endpoints.key + field: endpoints.endpoint + - api_field: endpoints.value.interconnects.key + field: endpoints.interconnects.interconnect_name + - api_field: endpoints.value.interconnects.value.interconnect + field: endpoints.interconnects.interconnect + - api_field: endpoints.value.interconnects.value.vlanTags + field: endpoints.interconnects.vlan_tags + - api_field: name + - api_field: topology.endpoints.city + - api_field: topology.endpoints.label + - api_field: wireProperties.bandwidthAllocation + - api_field: wireProperties.bandwidthUnmetered + - api_field: wireProperties.faultResponse + - api_field: wires.adminEnabled + - api_field: wires.endpoints.interconnect + - api_field: wires.endpoints.vlanTag + - api_field: wires.label + - api_field: wires.wireProperties.bandwidthUnmetered + - api_field: wires.wireProperties.faultResponse diff --git a/google/services/discoveryengine/resource_discovery_engine_cmek_config_generated_test.go b/google/services/compute/resource_compute_wire_group_generated_test.go similarity index 59% rename from google/services/discoveryengine/resource_discovery_engine_cmek_config_generated_test.go rename to google/services/compute/resource_compute_wire_group_generated_test.go index 1874b9994bc..e48b7308eb5 100644 --- a/google/services/discoveryengine/resource_discovery_engine_cmek_config_generated_test.go +++ b/google/services/compute/resource_compute_wire_group_generated_test.go @@ -15,7 +15,7 @@ // // ---------------------------------------------------------------------------- -package discoveryengine_test +package compute_test import ( "fmt" @@ -50,30 +50,30 @@ var ( _ = googleapi.Error{} ) -func TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample(t *testing.T) { +func TestAccComputeWireGroup_computeWireGroupBasicExample(t *testing.T) { t.Parallel() context := map[string]interface{}{ - "kms_key_name": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us", "tftest-shared-key-5").CryptoKey.Name, + "project": envvar.GetTestProjectFromEnv(), "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), - CheckDestroy: testAccCheckDiscoveryEngineCmekConfigDestroyProducer(t), + CheckDestroy: testAccCheckComputeWireGroupDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample(context), + Config: testAccComputeWireGroup_computeWireGroupBasicExample(context), }, { - ResourceName: "google_discovery_engine_cmek_config.default", + ResourceName: "google_compute_wire_group.example-test-wire-group", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"cmek_config_id", "location", "project", "set_default"}, + ImportStateVerifyIgnore: []string{"cross_site_network"}, }, { - ResourceName: "google_discovery_engine_cmek_config.default", + ResourceName: "google_compute_wire_group.example-test-wire-group", RefreshState: true, ExpectNonEmptyPlan: true, ImportStateKind: resource.ImportBlockWithResourceIdentity, @@ -82,29 +82,37 @@ func TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample(t }) } -func testAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample(context map[string]interface{}) string { +func testAccComputeWireGroup_computeWireGroupBasicExample(context map[string]interface{}) string { return acctest.Nprintf(` -resource "google_discovery_engine_cmek_config" "default" { - location = "us" - cmek_config_id = "tf-test-cmek-config-id%{random_suffix}" - kms_key = "%{kms_key_name}" - depends_on = [google_kms_crypto_key_iam_member.crypto_key] +data "google_project" "project" { } -data "google_project" "project" {} +resource "google_compute_cross_site_network" "example-cross-site-network" { + name = "tf-test-test-cross-site-network%{random_suffix}" + description = "Example cross site network" +} -resource "google_kms_crypto_key_iam_member" "crypto_key" { - crypto_key_id = "%{kms_key_name}" - role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" - member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-discoveryengine.iam.gserviceaccount.com" +resource "google_compute_wire_group" "example-test-wire-group" { + name = "tf-test-test-wire-group%{random_suffix}" + description = "Example Wire Group%{random_suffix}" + cross_site_network = "tf-test-test-cross-site-network%{random_suffix}" + depends_on = [ + google_compute_cross_site_network.example-cross-site-network + ] + wire_properties { + bandwidth_unmetered = 10 + fault_response = "NONE" + bandwidth_allocation = "ALLOCATE_PER_WIRE" + } + admin_enabled = true } `, context) } -func testAccCheckDiscoveryEngineCmekConfigDestroyProducer(t *testing.T) func(s *terraform.State) error { +func testAccCheckComputeWireGroupDestroyProducer(t *testing.T) func(s *terraform.State) error { return func(s *terraform.State) error { for name, rs := range s.RootModule().Resources { - if rs.Type != "google_discovery_engine_cmek_config" { + if rs.Type != "google_compute_wire_group" { continue } if strings.HasPrefix(name, "data.") { @@ -113,7 +121,7 @@ func testAccCheckDiscoveryEngineCmekConfigDestroyProducer(t *testing.T) func(s * config := acctest.GoogleProviderConfig(t) - url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{DiscoveryEngineBasePath}}projects/{{project}}/locations/{{location}}/cmekConfigs/{{cmek_config_id}}") + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{ComputeBasePath}}projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}") if err != nil { return err } @@ -132,7 +140,7 @@ func testAccCheckDiscoveryEngineCmekConfigDestroyProducer(t *testing.T) func(s * UserAgent: config.UserAgent, }) if err == nil { - return fmt.Errorf("DiscoveryEngineCmekConfig still exists at %s", url) + return fmt.Errorf("ComputeWireGroup still exists at %s", url) } } diff --git a/google/services/compute/resource_compute_wire_group_test.go b/google/services/compute/resource_compute_wire_group_test.go index bc3fc0874c6..61bf79595b4 100644 --- a/google/services/compute/resource_compute_wire_group_test.go +++ b/google/services/compute/resource_compute_wire_group_test.go @@ -8,10 +8,115 @@ // // This code is generated by Magic Modules using the following: // -// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/resource_compute_wire_group_test.go.tmpl +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/resource_compute_wire_group_test.go // // DO NOT EDIT this file directly. Any changes made to this file will be // overwritten during the next generation cycle. // // ---------------------------------------------------------------------------- package compute_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" +) + +func TestAccComputeWireGroup_update(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckComputeWireGroupDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccComputeWireGroup_basic(context), + }, + { + ResourceName: "google_compute_wire_group.example-test-wire-group", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cross_site_network"}, + }, + { + Config: testAccComputeWireGroup_update(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_compute_wire_group.example-test-wire-group", plancheck.ResourceActionUpdate), + }, + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_compute_wire_group.example-test-wire-group", "description", "Example Wire Group Updated"+context["random_suffix"].(string)), + ), + }, + { + ResourceName: "google_compute_wire_group.example-test-wire-group", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"cross_site_network"}, + }, + }, + }) +} + +func testAccComputeWireGroup_basic(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" { +} + +resource "google_compute_cross_site_network" "example-cross-site-network" { + name = "tf-test-cross-site-network%{random_suffix}" + description = "Example cross site network" +} + +resource "google_compute_wire_group" "example-test-wire-group" { + name = "tf-test-test-wire-group%{random_suffix}" + description = "Example Wire Group%{random_suffix}" + cross_site_network = google_compute_cross_site_network.example-cross-site-network.name + depends_on = [ + google_compute_cross_site_network.example-cross-site-network + ] + wire_properties { + bandwidth_unmetered = 1000 + bandwidth_allocation = "ALLOCATE_PER_WIRE" + } + admin_enabled = true +} +`, context) +} + +func testAccComputeWireGroup_update(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" { +} + +resource "google_compute_cross_site_network" "example-cross-site-network" { + name = "tf-test-cross-site-network%{random_suffix}" + description = "Example cross site network" +} + +resource "google_compute_wire_group" "example-test-wire-group" { + name = "tf-test-test-wire-group%{random_suffix}" + description = "Example Wire Group Updated%{random_suffix}" + cross_site_network = google_compute_cross_site_network.example-cross-site-network.name + depends_on = [ + google_compute_cross_site_network.example-cross-site-network + ] + wire_properties { + bandwidth_unmetered = 1000 + bandwidth_allocation = "ALLOCATE_PER_WIRE" + } + admin_enabled = true +} +`, context) +} diff --git a/google/services/compute/security_policy_association_utils.go b/google/services/compute/security_policy_association_utils.go index 2adb0da5b98..17dbb1cbb9a 100644 --- a/google/services/compute/security_policy_association_utils.go +++ b/google/services/compute/security_policy_association_utils.go @@ -8,10 +8,35 @@ // // This code is generated by Magic Modules using the following: // -// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/security_policy_association_utils.go.tmpl +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/compute/security_policy_association_utils.go // // DO NOT EDIT this file directly. Any changes made to this file will be // overwritten during the next generation cycle. // // ---------------------------------------------------------------------------- package compute + +import ( + "log" + "strings" + + "github.com/hashicorp/errwrap" + "google.golang.org/api/googleapi" +) + +func transformSecurityPolicyAssociationReadError(err error) error { + if gErr, ok := errwrap.GetType(err, &googleapi.Error{}).(*googleapi.Error); ok { + if gErr.Code == 400 && strings.Contains(gErr.Message, "An association with that name does not exist") { + // This error occurs when attempting a GET after deleting the security policy association. It leads to to + // inconsistent behavior as HandleNotFoundError(...) expects an error code of 404 when a resource does not + // exist. To get the desired behavior from HandleNotFoundError, modify the return code to 404 so that + // HandleNotFoundError(...) will treat this as a NotFound error + gErr.Code = 404 + } + + log.Printf("[DEBUG] Transformed security policy association error") + return gErr + } + + return err +} diff --git a/google/services/contactcenterinsights/resource_contact_center_insights_analysis_rule_generated_meta.yaml b/google/services/contactcenterinsights/resource_contact_center_insights_analysis_rule_generated_meta.yaml index dd3ce1cffd8..09b288c2bcb 100644 --- a/google/services/contactcenterinsights/resource_contact_center_insights_analysis_rule_generated_meta.yaml +++ b/google/services/contactcenterinsights/resource_contact_center_insights_analysis_rule_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_contact_center_insights_analysis_rule' -generation_type: 'mmv1' -source_file: 'products/contactcenterinsights/AnalysisRule.yaml' -api_service_name: 'contactcenterinsights.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AnalysisRule' +resource: google_contact_center_insights_analysis_rule +generation_type: mmv1 +source_file: products/contactcenterinsights/AnalysisRule.yaml +api_service_name: contactcenterinsights.googleapis.com +api_version: v1 +api_resource_type_kind: AnalysisRule autogen_status: true fields: - - api_field: 'active' - - api_field: 'analysisPercentage' - - api_field: 'annotatorSelector.issueModels' - - api_field: 'annotatorSelector.phraseMatchers' - - api_field: 'annotatorSelector.qaConfig.scorecardList.qaScorecardRevisions' - - api_field: 'annotatorSelector.runEntityAnnotator' - - api_field: 'annotatorSelector.runIntentAnnotator' - - api_field: 'annotatorSelector.runInterruptionAnnotator' - - api_field: 'annotatorSelector.runIssueModelAnnotator' - - api_field: 'annotatorSelector.runPhraseMatcherAnnotator' - - api_field: 'annotatorSelector.runQaAnnotator' - - api_field: 'annotatorSelector.runSentimentAnnotator' - - api_field: 'annotatorSelector.runSilenceAnnotator' - - api_field: 'annotatorSelector.runSummarizationAnnotator' - - api_field: 'annotatorSelector.summarizationConfig.conversationProfile' - - api_field: 'annotatorSelector.summarizationConfig.summarizationModel' - - api_field: 'conversationFilter' - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' + - api_field: active + - api_field: analysisPercentage + - api_field: annotatorSelector.issueModels + - api_field: annotatorSelector.phraseMatchers + - api_field: annotatorSelector.qaConfig.scorecardList.qaScorecardRevisions + - api_field: annotatorSelector.runEntityAnnotator + - api_field: annotatorSelector.runIntentAnnotator + - api_field: annotatorSelector.runInterruptionAnnotator + - api_field: annotatorSelector.runIssueModelAnnotator + - api_field: annotatorSelector.runPhraseMatcherAnnotator + - api_field: annotatorSelector.runQaAnnotator + - api_field: annotatorSelector.runSentimentAnnotator + - api_field: annotatorSelector.runSilenceAnnotator + - api_field: annotatorSelector.runSummarizationAnnotator + - api_field: annotatorSelector.summarizationConfig.conversationProfile + - api_field: annotatorSelector.summarizationConfig.summarizationModel + - api_field: conversationFilter + - api_field: createTime + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - api_field: updateTime diff --git a/google/services/contactcenterinsights/resource_contact_center_insights_view_generated_meta.yaml b/google/services/contactcenterinsights/resource_contact_center_insights_view_generated_meta.yaml index 3a226e0be79..c9b452311f8 100644 --- a/google/services/contactcenterinsights/resource_contact_center_insights_view_generated_meta.yaml +++ b/google/services/contactcenterinsights/resource_contact_center_insights_view_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_contact_center_insights_view' -generation_type: 'mmv1' -source_file: 'products/contactcenterinsights/View.yaml' -api_service_name: 'contactcenterinsights.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'View' +resource: google_contact_center_insights_view +generation_type: mmv1 +source_file: products/contactcenterinsights/View.yaml +api_service_name: contactcenterinsights.googleapis.com +api_version: v1 +api_resource_type_kind: View autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' - - api_field: 'value' + - api_field: createTime + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - api_field: updateTime + - api_field: value diff --git a/google/services/container/node_config.go b/google/services/container/node_config.go index 0a1e3477346..d0aa7bfff30 100644 --- a/google/services/container/node_config.go +++ b/google/services/container/node_config.go @@ -49,6 +49,7 @@ func schemaContainerdConfig() *schema.Schema { return &schema.Schema{ Type: schema.TypeList, Optional: true, + Computed: true, Description: "Parameters for containerd configuration.", MaxItems: 1, Elem: &schema.Resource{Schema: map[string]*schema.Schema{ @@ -106,6 +107,111 @@ func schemaContainerdConfig() *schema.Schema { }, }, }, + "registry_hosts": { + Type: schema.TypeList, + Optional: true, + Description: "Configures containerd registry host configuration. Each registry_hosts entry represents a hosts.toml file.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "server": { + Type: schema.TypeString, + Required: true, + Description: "Defines the host name of the registry server.", + }, + "hosts": { + Type: schema.TypeList, + Optional: true, + Description: "Configures a list of host-specific configurations for the server.", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "host": { + Type: schema.TypeString, + Required: true, + Description: "Configures the registry host/mirror.", + }, + "capabilities": { + Type: schema.TypeList, + Optional: true, + Description: "Represent the capabilities of the registry host, specifying what operations a host is capable of performing.", + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "override_path": { + Type: schema.TypeBool, + Optional: true, + Description: "Indicate the host's API root endpoint is defined in the URL path rather than by the API specification.", + }, + "dial_timeout": { + Type: schema.TypeString, + Optional: true, + Description: "Specifies the maximum duration allowed for a connection attempt to complete.", + }, + "header": { + Type: schema.TypeList, + Optional: true, + Description: "Configures the registry host headers.", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "key": { + Type: schema.TypeString, + Required: true, + Description: "Configures the header key.", + }, + "value": { + Type: schema.TypeList, + Required: true, + Description: "Configures the header value.", + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }}, + }, + "ca": { + Type: schema.TypeList, + Optional: true, + Description: "Configures the registry host certificate.", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "gcp_secret_manager_secret_uri": { + Type: schema.TypeString, + Optional: true, + Description: "URI for the Secret Manager secret that hosts the certificate.", + }, + }}, + }, + "client": { + Type: schema.TypeList, + Optional: true, + Description: "Configures the registry host client certificate and key.", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "cert": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Description: "Configures the client certificate.", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "gcp_secret_manager_secret_uri": { + Type: schema.TypeString, + Optional: true, + Description: "URI for the Secret Manager secret that hosts the client certificate.", + }, + }}, + }, + "key": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Description: "Configures the client private key.", + Elem: &schema.Resource{Schema: map[string]*schema.Schema{ + "gcp_secret_manager_secret_uri": { + Type: schema.TypeString, + Optional: true, + Description: "URI for the Secret Manager secret that hosts the private key.", + }, + }}, + }, + }}, + }, + }, + }, + }, + }}, + }, }}, } } @@ -1984,6 +2090,7 @@ func expandContainerdConfig(v interface{}) *container.ContainerdConfig { cc := &container.ContainerdConfig{} cc.PrivateRegistryAccessConfig = expandPrivateRegistryAccessConfig(cfg["private_registry_access_config"]) cc.WritableCgroups = expandWritableCgroups(cfg["writable_cgroups"]) + cc.RegistryHosts = expandRegistryHosts(cfg["registry_hosts"]) return cc } @@ -2075,6 +2182,122 @@ func expandWritableCgroups(v interface{}) *container.WritableCgroups { return wcg } +func expandRegistryHosts(v interface{}) []*container.RegistryHostConfig { + if v == nil { + return nil + } + ls := v.([]interface{}) + if len(ls) == 0 { + return nil + } + registryHosts := make([]*container.RegistryHostConfig, 0, len(ls)) + for _, raw := range ls { + data := raw.(map[string]interface{}) + rh := &container.RegistryHostConfig{ + Server: data["server"].(string), + } + if v, ok := data["hosts"]; ok { + hosts := v.([]interface{}) + rh.Hosts = make([]*container.HostConfig, 0, len(hosts)) + for _, rawHost := range hosts { + hostData := rawHost.(map[string]interface{}) + h := &container.HostConfig{ + Host: hostData["host"].(string), + } + if v, ok := hostData["override_path"]; ok { + h.OverridePath = v.(bool) + } + if v, ok := hostData["dial_timeout"]; ok { + h.DialTimeout = v.(string) + } + if v, ok := hostData["capabilities"]; ok { + cap := v.([]interface{}) + h.Capabilities = make([]string, len(cap)) + for i, c := range cap { + h.Capabilities[i] = c.(string) + } + } + if v, ok := hostData["header"]; ok { + headers := v.([]interface{}) + h.Header = make([]*container.RegistryHeader, len(headers)) + for i, headerRaw := range headers { + h.Header[i] = expandRegistryHeader(headerRaw) + } + } + if v, ok := hostData["ca"]; ok { + ca := v.([]interface{}) + h.Ca = make([]*container.CertificateConfig, len(ca)) + for i, caRaw := range ca { + h.Ca[i] = expandRegistryCertificateConfig(caRaw) + } + } + if v, ok := hostData["client"]; ok { + client := v.([]interface{}) + h.Client = make([]*container.CertificateConfigPair, len(client)) + for i, clientRaw := range client { + h.Client[i] = expandRegistryCertificateConfigPair(clientRaw) + } + } + rh.Hosts = append(rh.Hosts, h) + } + } + registryHosts = append(registryHosts, rh) + } + return registryHosts +} + +func expandRegistryHeader(v interface{}) *container.RegistryHeader { + header := &container.RegistryHeader{} + if v == nil { + return header + } + ls := v.(map[string]interface{}) + if val, ok := ls["key"]; ok { + header.Key = val.(string) + } + if val, ok := ls["value"]; ok { + headerVal := val.([]interface{}) + header.Value = make([]string, len(headerVal)) + for i, hv := range headerVal { + header.Value[i] = hv.(string) + } + } + return header +} + +func expandRegistryCertificateConfig(v interface{}) *container.CertificateConfig { + cfg := &container.CertificateConfig{} + if v == nil { + return cfg + } + ls := v.(map[string]interface{}) + if val, ok := ls["gcp_secret_manager_secret_uri"]; ok { + cfg.GcpSecretManagerSecretUri = val.(string) + } + return cfg +} + +func expandRegistryCertificateConfigPair(v interface{}) *container.CertificateConfigPair { + cfg := &container.CertificateConfigPair{} + if v == nil { + return cfg + } + ls := v.(map[string]interface{}) + if val, ok := ls["cert"]; ok { + certRaw := val.([]interface{}) + if len(certRaw) > 0 { + cfg.Cert = expandRegistryCertificateConfig(certRaw[0]) + } + } + if val, ok := ls["key"]; ok { + keyRaw := val.([]interface{}) + if len(keyRaw) > 0 { + cfg.Key = expandRegistryCertificateConfig(keyRaw[0]) + } + } + return cfg +} + func expandSoleTenantConfig(v interface{}) *container.SoleTenantConfig { if v == nil { return nil @@ -2595,9 +2818,89 @@ func flattenContainerdConfig(c *container.ContainerdConfig) []map[string]interfa if c.WritableCgroups != nil { r["writable_cgroups"] = flattenWritableCgroups(c.WritableCgroups) } + if c.RegistryHosts != nil { + r["registry_hosts"] = flattenRegistryHosts(c.RegistryHosts) + } return append(result, r) } +func flattenRegistryHosts(registryHosts []*container.RegistryHostConfig) []map[string]interface{} { + items := []map[string]interface{}{} + if len(registryHosts) == 0 { + return items + } + + for _, host := range registryHosts { + item := make(map[string]interface{}) + item["server"] = host.Server + item["hosts"] = flattenHostInRegistryHosts(host.Hosts) + items = append(items, item) + } + return items +} + +func flattenHostInRegistryHosts(hosts []*container.HostConfig) []map[string]interface{} { + items := make([]map[string]interface{}, 0, len(hosts)) + if len(hosts) == 0 { + return items + } + for _, h := range hosts { + item := make(map[string]interface{}) + item["host"] = h.Host + item["capabilities"] = h.Capabilities + item["override_path"] = h.OverridePath + item["dial_timeout"] = h.DialTimeout + + if h.Header != nil { + tmp := make([]interface{}, len(h.Header)) + for i, val := range h.Header { + tmp[i] = map[string]interface{}{ + "key": val.Key, + "value": val.Value, + } + } + item["header"] = tmp + } + + if h.Ca != nil { + tmp := make([]interface{}, len(h.Ca)) + for i, val := range h.Ca { + if val != nil && val.GcpSecretManagerSecretUri != "" { + tmp[i] = map[string]interface{}{ + "gcp_secret_manager_secret_uri": val.GcpSecretManagerSecretUri, + } + } + } + item["ca"] = tmp + } + + if h.Client != nil { + tmp := make([]interface{}, len(h.Client)) + for i, val := range h.Client { + currentClient := map[string]interface{}{} + if val != nil && val.Cert != nil && val.Cert.GcpSecretManagerSecretUri != "" { + currentClient["cert"] = []interface{}{ + map[string]interface{}{ + "gcp_secret_manager_secret_uri": val.Cert.GcpSecretManagerSecretUri, + }, + } + } + if val != nil && val.Key != nil && val.Key.GcpSecretManagerSecretUri != "" { + currentClient["key"] = []interface{}{ + map[string]interface{}{ + "gcp_secret_manager_secret_uri": val.Key.GcpSecretManagerSecretUri, + }, + } + } + tmp[i] = currentClient + } + item["client"] = tmp + } + items = append(items, item) + } + return items +} + func flattenPrivateRegistryAccessConfig(c *container.PrivateRegistryAccessConfig) []map[string]interface{} { result := []map[string]interface{}{} if c == nil { diff --git a/google/services/container/resource_container_cluster_meta.yaml b/google/services/container/resource_container_cluster_meta.yaml index 392a04030d9..c594f655f1f 100644 --- a/google/services/container/resource_container_cluster_meta.yaml +++ b/google/services/container/resource_container_cluster_meta.yaml @@ -177,13 +177,15 @@ fields: - field: 'maintenance_policy.daily_maintenance_window.start_time' api_field: 'maintenancePolicy.window.dailyMaintenanceWindow.startTime' - field: 'maintenance_policy.maintenance_exclusion.end_time' - api_field: 'maintenance_policy.window.maintenance_exclusion.end_time' + api_field: 'maintenancePolicy.window.maintenanceExclusions.value.endTime' - field: 'maintenance_policy.maintenance_exclusion.exclusion_name' - api_field: 'maintenance_policy.window.maintenance_exclusion.exclusion_name' + api_field: 'maintenancePolicy.window.maintenanceExclusions.key' + - field: 'maintenance_policy.maintenance_exclusion.exclusion_options.end_time_behavior' + api_field: 'maintenancePolicy.window.maintenanceExclusions.value.maintenanceExclusionOptions.endTimeBehavior' - field: 'maintenance_policy.maintenance_exclusion.exclusion_options.scope' - api_field: 'maintenance_policy.window.maintenance_exclusion.exclusion_options.scope' + api_field: 'maintenancePolicy.window.maintenanceExclusions.value.maintenanceExclusionOptions.scope' - field: 'maintenance_policy.maintenance_exclusion.start_time' - api_field: 'maintenance_policy.window.maintenance_exclusion.start_time' + api_field: 'maintenancePolicy.window.maintenanceExclusions.value.startTime' - field: 'maintenance_policy.recurring_window.end_time' api_field: 'maintenancePolicy.window.recurringWindow.window.endTime' - field: 'maintenance_policy.recurring_window.recurrence' @@ -234,6 +236,16 @@ fields: - api_field: 'nodeConfig.containerdConfig.privateRegistryAccessConfig.certificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig.secretUri' - api_field: 'nodeConfig.containerdConfig.privateRegistryAccessConfig.enabled' - api_field: 'nodeConfig.containerdConfig.writableCgroups.enabled' + - api_field: 'nodeConfig.containerdConfig.registryHosts.server' + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.host' + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.capabilities + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.overridePath + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.header.key + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.header.value + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.ca.gcpSecretManagerSecretUri + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.client.cert.gcpSecretManagerSecretUri + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.client.key.gcpSecretManagerSecretUri + - api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.dialTimeout - api_field: 'nodeConfig.diskSizeGb' - api_field: 'nodeConfig.diskType' - field: 'node_config.effective_taints.effect' @@ -305,6 +317,7 @@ fields: api_field: 'nodeConfig.linuxNodeConfig.hugepages.hugepageSize1g' - field: 'node_config.linux_node_config.hugepages_config.hugepage_size_2m' api_field: 'nodeConfig.linuxNodeConfig.hugepages.hugepageSize2m' + - api_field: 'nodeConfig.linuxNodeConfig.nodeKernelModuleLoading.policy' - api_field: 'nodeConfig.linuxNodeConfig.sysctls' - api_field: 'nodeConfig.linuxNodeConfig.transparentHugepageDefrag' - api_field: 'nodeConfig.linuxNodeConfig.transparentHugepageEnabled' @@ -428,6 +441,8 @@ fields: api_field: 'nodePools.config.containerdConfig.privateRegistryAccessConfig.certificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig.secretUri' - field: 'node_pool.node_config.containerd_config.private_registry_access_config.enabled' api_field: 'nodePools.config.containerdConfig.privateRegistryAccessConfig.enabled' + - field: 'node_pool.node_config.containerd_config.writable_cgroups.enabled' + api_field: 'nodePools.config.containerdConfig.writableCgroups.enabled' - field: 'node_pool.node_config.disk_size_gb' api_field: 'nodePools.config.diskSizeGb' - field: 'node_pool.node_config.disk_type' @@ -548,6 +563,8 @@ fields: api_field: 'nodePools.config.linuxNodeConfig.hugepages.hugepageSize1g' - field: 'node_pool.node_config.linux_node_config.hugepages_config.hugepage_size_2m' api_field: 'nodePools.config.linuxNodeConfig.hugepages.hugepageSize2m' + - field: 'node_pool.node_config.linux_node_config.node_kernel_module_loading.policy' + api_field: 'nodePools.config.linuxNodeConfig.nodeKernelModuleLoading.policy' - field: 'node_pool.node_config.linux_node_config.sysctls' api_field: 'nodePools.config.linuxNodeConfig.sysctls' - field: 'node_pool.node_config.linux_node_config.transparent_hugepage_defrag' @@ -649,6 +666,7 @@ fields: - field: 'node_pool.version' api_field: 'nodePools.version' - api_field: 'nodePoolAutoConfig.linuxNodeConfig.cgroupMode' + - api_field: 'nodePoolAutoConfig.linuxNodeConfig.nodeKernelModuleLoading.policy' - api_field: 'nodePoolAutoConfig.networkTags.tags' - api_field: 'nodePoolAutoConfig.nodeKubeletConfig.insecureKubeletReadonlyPortEnabled' - field: 'node_pool_auto_config.resource_manager_tags' @@ -657,6 +675,16 @@ fields: - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.privateRegistryAccessConfig.certificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig.secretUri' - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.privateRegistryAccessConfig.enabled' - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.writableCgroups.enabled' + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.server' + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.host' + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.capabilities + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.overridePath + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.header.key + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.header.value + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.ca.gcpSecretManagerSecretUri + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.client.cert.gcpSecretManagerSecretUri + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.client.key.gcpSecretManagerSecretUri + - api_field: 'nodePoolDefaults.nodeConfigDefaults.containerdConfig.registryHosts.hosts.dialTimeout - api_field: 'nodePoolDefaults.nodeConfigDefaults.gcfsConfig.enabled' - field: 'node_pool_defaults.node_config_defaults.insecure_kubelet_readonly_port_enabled' api_field: 'nodePoolDefaults.nodeConfigDefaults.nodeKubeletConfig.insecureKubeletReadonlyPortEnabled' diff --git a/google/services/container/resource_container_cluster_test.go b/google/services/container/resource_container_cluster_test.go index ce1e83db816..cfa3efae8c1 100644 --- a/google/services/container/resource_container_cluster_test.go +++ b/google/services/container/resource_container_cluster_test.go @@ -193,6 +193,9 @@ func TestAccContainerCluster_resourceManagerTags(t *testing.T) { func TestAccContainerCluster_networkingModeRoutes(t *testing.T) { t.Parallel() + // separate shared network name because test requests a specific CIDR + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster-moderoutes") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster-moderoutes", networkName) firstClusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) secondClusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) acctest.VcrTest(t, resource.TestCase{ @@ -201,7 +204,7 @@ func TestAccContainerCluster_networkingModeRoutes(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerCluster_networkingModeRoutes(firstClusterName, secondClusterName), + Config: testAccContainerCluster_networkingModeRoutes(firstClusterName, secondClusterName, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_cluster.primary", "networking_mode", "ROUTES"), resource.TestCheckResourceAttr("google_container_cluster.secondary", "networking_mode", "ROUTES")), @@ -790,6 +793,10 @@ func TestAccContainerCluster_inTransitEncryptionConfig(t *testing.T) { func TestAccContainerCluster_networkPerformanceConfig(t *testing.T) { t.Parallel() + // Skip in VCR until the test issue is resolved + // https://github.com/hashicorp/terraform-provider-google/issues/24850 + acctest.SkipIfVcr(t) + clusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) @@ -2058,25 +2065,10 @@ func TestAccContainerCluster_withNodeConfigLinuxNodeConfig(t *testing.T) { ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"}, }, // Lastly, update the setting in-place. V1 since UNSPECIFIED is default + // From version 1.35+, cgroup mode v1 will be blocked. { - Config: testAccContainerCluster_withNodeConfigLinuxNodeConfig(clusterName, networkName, subnetworkName, "CGROUP_MODE_V1", false, ""), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "google_container_cluster.with_linux_node_config", - "node_config.0.linux_node_config.0.cgroup_mode", "CGROUP_MODE_V1", - ), - ), - ConfigPlanChecks: resource.ConfigPlanChecks{ - PreApply: []plancheck.PlanCheck{ - acctest.ExpectNoDelete(), - }, - }, - }, - { - ResourceName: "google_container_cluster.with_linux_node_config", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"}, + Config: testAccContainerCluster_withNodeConfigLinuxNodeConfig(clusterName, networkName, subnetworkName, "CGROUP_MODE_V1", false, ""), + ExpectError: regexp.MustCompile("Node pools with cgroupv1 is not supported"), }, // Update linux config transparent hugepage { @@ -6933,13 +6925,15 @@ resource "google_container_cluster" "primary" { `, projectID, name, networkName, subnetworkName) } -func testAccContainerCluster_networkingModeRoutes(firstName, secondName string) string { +func testAccContainerCluster_networkingModeRoutes(firstName, secondName, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "primary" { name = "%s" location = "us-central1-a" initial_node_count = 1 networking_mode = "ROUTES" + network = "%s" + subnetwork = "%s" deletion_protection = false } @@ -6947,10 +6941,12 @@ resource "google_container_cluster" "secondary" { name = "%s" location = "us-central1-a" initial_node_count = 1 + network = "%s" + subnetwork = "%s" cluster_ipv4_cidr = "10.96.0.0/14" deletion_protection = false } -`, firstName, secondName) +`, firstName, networkName, subnetworkName, secondName, networkName, subnetworkName) } func testAccContainerCluster_misc(name, networkName, subnetworkName string) string { @@ -13144,6 +13140,328 @@ resource "google_container_cluster" "primary" { `, secretID, clusterName, customDomain, networkName, subnetworkName) } +func TestAccContainerCluster_registryHosts(t *testing.T) { + // This test also checks containerd_config and its updates + t.Parallel() + + clusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) + nodePoolName := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + secretID := fmt.Sprintf("tf-test-secret-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccContainerCluster_registryHosts(secretID, clusterName, networkName, subnetworkName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + "google_container_cluster.primary", + "node_pool_defaults.0.node_config_defaults.0.containerd_config.0.registry_hosts.0.server", + "custom.example.com", + ), + resource.TestCheckResourceAttr( + "google_container_cluster.primary", + "node_pool_defaults.0.node_config_defaults.0.containerd_config.0.registry_hosts.0.hosts.0.host", + "custom.mirror.com", + ), + ), + }, + { + ResourceName: "google_container_cluster.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection", "min_master_version"}, + }, + // The above tests the default for _new_ node pools; this tests the configuration for default-pool if + // defined within the `container_cluster` resource + { + Config: testAccContainerCluster_withNodeConfigRegistryHosts(secretID, clusterName, networkName, subnetworkName, "foo.example.com", "foo.mirror.com"), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + acctest.ExpectNoDelete(), + }, + }, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + "google_container_cluster.primary", + "node_config.0.containerd_config.0.registry_hosts.0.server", + "foo.example.com", + ), + resource.TestCheckResourceAttr( + "google_container_cluster.primary", + "node_config.0.containerd_config.0.registry_hosts.0.hosts.0.host", + "foo.mirror.com", + ), + ), + }, + // We're already testing going from no `node_config` to having one in the previous step, but test updating + // anyway. + { + Config: testAccContainerCluster_withNodeConfigRegistryHosts(secretID, clusterName, networkName, subnetworkName, "bar.example.org", "bar.mirror.org"), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + acctest.ExpectNoDelete(), + }, + }, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + "google_container_cluster.primary", + "node_config.0.containerd_config.0.registry_hosts.0.server", + "bar.example.org", + ), + resource.TestCheckResourceAttr( + "google_container_cluster.primary", + "node_config.0.containerd_config.0.registry_hosts.0.hosts.0.host", + "bar.mirror.org", + ), + ), + }, + { + ResourceName: "google_container_cluster.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection", "min_master_version"}, + }, + // This last test *will* force recreation, and tests a (named) node pool defined in + // `google_container_cluster.node_pool`. Deletions are expected here too. + { + Config: testAccContainerCluster_withNodePoolRegistryHosts(secretID, clusterName, nodePoolName, networkName, subnetworkName), + }, + { + ResourceName: "google_container_cluster.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection", "min_master_version"}, + }, + }, + }) +} + +func testAccContainerCluster_registryHosts(secretID, clusterName, networkName, subnetworkName string) string { + return fmt.Sprintf(` +data "google_project" "test_project" {} + +data "google_container_engine_versions" "central1a" { + location = "us-central1-a" +} + +resource "google_secret_manager_secret" "secret_basic" { + secret_id = "%s" + replication { + user_managed { + replicas { + location = "us-central1" + } + } + } +} + +resource "google_secret_manager_secret_version" "secret_version_basic" { + secret = google_secret_manager_secret.secret_basic.id + secret_data = "dummypassword" +} + +resource "google_secret_manager_secret_iam_member" "secret_iam" { + secret_id = google_secret_manager_secret.secret_basic.id + role = "roles/secretmanager.admin" + member = "serviceAccount:${data.google_project.test_project.number}-compute@developer.gserviceaccount.com" + depends_on = [google_secret_manager_secret_version.secret_version_basic] +} + +resource "google_container_cluster" "primary" { + name = "%s" + location = "us-central1-a" + initial_node_count = 1 + deletion_protection = false + network = "%s" + subnetwork = "%s" + min_master_version = data.google_container_engine_versions.central1a.latest_master_version + + node_config { + oauth_scopes = [ + "https://www.googleapis.com/auth/cloud-platform", + ] + } + node_pool_defaults { + node_config_defaults { + containerd_config { + registry_hosts { + server = "custom.example.com" + hosts { + host = "custom.mirror.com" + capabilities = ["HOST_CAPABILITY_PULL","HOST_CAPABILITY_RESOLVE"] + override_path = false + dial_timeout = "30s" + header { + key = "header_key" + value = ["header_value_1","header_value_2"] + } + ca { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret_version_basic.name + } + } + } + } + } + } +} +`, secretID, clusterName, networkName, subnetworkName) +} + +func testAccContainerCluster_withNodePoolRegistryHosts(secretID, clusterName, nodePoolName, networkName, subnetworkName string) string { + return fmt.Sprintf(` +data "google_project" "test_project" {} + +data "google_container_engine_versions" "central1a" { + location = "us-central1-a" +} + +resource "google_secret_manager_secret" "secret_basic" { + secret_id = "%s" + replication { + user_managed { + replicas { + location = "us-central1" + } + } + } +} +resource "google_secret_manager_secret_version" "secret_version_basic" { + secret = google_secret_manager_secret.secret_basic.id + secret_data = "dummypassword" +} + +resource "google_secret_manager_secret_iam_member" "secret_iam" { + secret_id = google_secret_manager_secret.secret_basic.id + role = "roles/secretmanager.admin" + member = "serviceAccount:${data.google_project.test_project.number}-compute@developer.gserviceaccount.com" + depends_on = [google_secret_manager_secret_version.secret_version_basic] +} +resource "google_container_cluster" "primary" { + name = "%s" + location = "us-central1-a" + min_master_version = data.google_container_engine_versions.central1a.latest_master_version + + node_pool { + name = "%s" + initial_node_count = 1 + node_config { + oauth_scopes = [ + "https://www.googleapis.com/auth/cloud-platform", + ] + containerd_config { + registry_hosts { + server = "custom.example.com" + hosts { + host = "custom.mirror.com" + capabilities = ["HOST_CAPABILITY_PULL","HOST_CAPABILITY_PUSH"] + override_path = true + dial_timeout = "30s" + header { + key = "header_key" + value = ["header_value_1","header_value_2"] + } + ca { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret_version_basic.name + } + client { + cert { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret_version_basic.name + } + key { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret_version_basic.name + } + } + } + } + } + } + } + network = "%s" + subnetwork = "%s" + + deletion_protection = false +} +`, secretID, clusterName, nodePoolName, networkName, subnetworkName) +} + +func testAccContainerCluster_withNodeConfigRegistryHosts(secretID, clusterName, networkName, subnetworkName, customServer, customMirror string) string { + return fmt.Sprintf(` +data "google_project" "test_project" {} + +data "google_container_engine_versions" "central1a" { + location = "us-central1-a" +} + +resource "google_secret_manager_secret" "secret_basic" { + secret_id = "%s" + replication { + user_managed { + replicas { + location = "us-central1" + } + } + } +} +resource "google_secret_manager_secret_version" "secret_version_basic" { + secret = google_secret_manager_secret.secret_basic.id + secret_data = "dummypassword" +} + +resource "google_secret_manager_secret_iam_member" "secret_iam" { + secret_id = google_secret_manager_secret.secret_basic.id + role = "roles/secretmanager.admin" + member = "serviceAccount:${data.google_project.test_project.number}-compute@developer.gserviceaccount.com" + depends_on = [google_secret_manager_secret_version.secret_version_basic] +} +resource "google_container_cluster" "primary" { + name = "%s" + location = "us-central1-a" + initial_node_count = 1 + min_master_version = data.google_container_engine_versions.central1a.latest_master_version + + node_config { + oauth_scopes = [ + "https://www.googleapis.com/auth/cloud-platform", + ] + containerd_config { + registry_hosts { + server = "%s" + hosts { + host = "%s" + capabilities = ["HOST_CAPABILITY_PULL","HOST_CAPABILITY_PUSH"] + override_path = true + dial_timeout = "30s" + header { + key = "header_key" + value = ["header_value_1","header_value_2"] + } + ca { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret_version_basic.name + } + client { + cert { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret_version_basic.name + } + key { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret_version_basic.name + } + } + } + } + } + } + network = "%s" + subnetwork = "%s" + + deletion_protection = false +} +`, secretID, clusterName, customServer, customMirror, networkName, subnetworkName) +} + func TestAccContainerCluster_writableCgroups(t *testing.T) { t.Parallel() diff --git a/google/services/container/resource_container_node_pool_meta.yaml b/google/services/container/resource_container_node_pool_meta.yaml index 9ace3ab5d04..8d91c801fce 100644 --- a/google/services/container/resource_container_node_pool_meta.yaml +++ b/google/services/container/resource_container_node_pool_meta.yaml @@ -62,6 +62,28 @@ fields: api_field: 'config.containerdConfig.privateRegistryAccessConfig.certificateAuthorityDomainConfig.gcpSecretManagerCertificateConfig.secretUri' - field: 'node_config.containerd_config.private_registry_access_config.enabled' api_field: 'config.containerdConfig.privateRegistryAccessConfig.enabled' + - field: 'node_config.containerd_config.writable_cgroups.enabled' + api_field: 'config.containerdConfig.writableCgroups.enabled' + - field: 'node_config.containerd_config.registry_hosts.server' + api_field: 'nodeConfig.containerdConfig.registryHosts.server' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.host' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.host' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.capabilities' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.capabilities' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.override_path' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.overridePath' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.header.key' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.header.key' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.header.value' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.header.value' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.ca.gcp_secret_manager_secret_uri' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.ca.gcpSecretManagerSecretUri' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.client.cert.gcp_secret_manager_secret_uri' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.client.cert.gcpSecretManagerSecretUri' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts.client.key.gcp_secret_manager_secret_uri' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.client.key.gcpSecretManagerSecretUri' + - field: 'nodeConfig.containerd_config.registry_hosts.hosts..dial_timeout' + api_field: 'nodeConfig.containerdConfig.registryHosts.hosts.dialTimeout' - field: 'node_config.disk_size_gb' api_field: 'config.diskSizeGb' - field: 'node_config.disk_type' @@ -182,6 +204,8 @@ fields: api_field: 'config.linuxNodeConfig.hugepages.hugepageSize1g' - field: 'node_config.linux_node_config.hugepages_config.hugepage_size_2m' api_field: 'config.linuxNodeConfig.hugepages.hugepageSize2m' + - field: 'node_config.linux_node_config.node_kernel_module_loading.policy' + api_field: 'config.linuxNodeConfig.nodeKernelModuleLoading.policy' - field: 'node_config.linux_node_config.sysctls' api_field: 'config.linuxNodeConfig.sysctls' - field: 'node_config.linux_node_config.transparent_hugepage_defrag' diff --git a/google/services/container/resource_container_node_pool_test.go b/google/services/container/resource_container_node_pool_test.go index 4847bdabaf9..26217044b71 100644 --- a/google/services/container/resource_container_node_pool_test.go +++ b/google/services/container/resource_container_node_pool_test.go @@ -2213,6 +2213,10 @@ resource "google_container_node_pool" "np" { func TestAccContainerNodePool_secondaryBootDisks(t *testing.T) { t.Parallel() + // Skip in VCR until the test issue is resolved + // https://github.com/hashicorp/terraform-provider-google/issues/23855 + acctest.SkipIfVcr(t) + cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") @@ -5816,6 +5820,143 @@ resource "google_container_node_pool" "np" { `, cluster, network, subnetwork, nodepool) } +func TestAccContainerNodePool_registryHosts(t *testing.T) { + t.Parallel() + + cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) + nodepool := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + secretID := fmt.Sprintf("tf-test-secret-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccContainerNodePool_registryHosts(secretID, cluster, nodepool, networkName, subnetworkName, "custom.example.com", "custom.mirror.com"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + "google_container_node_pool.np", + "node_config.0.containerd_config.0.registry_hosts.0.server", + "custom.example.com", + ), + resource.TestCheckResourceAttr( + "google_container_node_pool.np", + "node_config.0.containerd_config.0.registry_hosts.0.hosts.0.host", + "custom.mirror.com", + ), + ), + }, + { + // Make sure in-place updates work + Config: testAccContainerNodePool_registryHosts(secretID, cluster, nodepool, networkName, subnetworkName, "foo.example.org", "foo.mirror.org"), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + acctest.ExpectNoDelete(), + }, + }, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr( + "google_container_node_pool.np", + "node_config.0.containerd_config.0.registry_hosts.0.server", + "foo.example.org", + ), + resource.TestCheckResourceAttr( + "google_container_node_pool.np", + "node_config.0.containerd_config.0.registry_hosts.0.hosts.0.host", + "foo.mirror.org", + ), + ), + }, + }, + }) +} + +func testAccContainerNodePool_registryHosts(secretID, cluster, nodepool, network, subnetwork, customServer, customMirror string) string { + return fmt.Sprintf(` +data "google_project" "test_project" {} + +data "google_container_engine_versions" "central1a" { + location = "us-central1-a" +} + +resource "google_secret_manager_secret" "secret-basic" { + secret_id = "%s" + replication { + user_managed { + replicas { + location = "us-central1" + } + } + } +} + +resource "google_secret_manager_secret_version" "secret-version-basic" { + secret = google_secret_manager_secret.secret-basic.id + secret_data = "dummypassword" +} + +resource "google_secret_manager_secret_iam_member" "secret_iam" { + secret_id = google_secret_manager_secret.secret-basic.id + role = "roles/secretmanager.admin" + member = "serviceAccount:${data.google_project.test_project.number}-compute@developer.gserviceaccount.com" + depends_on = [google_secret_manager_secret_version.secret-version-basic] +} + +resource "google_container_cluster" "cluster" { + name = "%s" + location = "us-central1-a" + initial_node_count = 1 + deletion_protection = false + network = "%s" + subnetwork = "%s" + min_master_version = data.google_container_engine_versions.central1a.latest_master_version +} + +resource "google_container_node_pool" "np" { + name = "%s" + location = "us-central1-a" + cluster = google_container_cluster.cluster.name + initial_node_count = 1 + + node_config { + oauth_scopes = [ + "https://www.googleapis.com/auth/cloud-platform", + ] + image_type = "COS_CONTAINERD" + containerd_config { + registry_hosts { + server = "%s" + hosts { + host = "%s" + capabilities = ["HOST_CAPABILITY_PULL","HOST_CAPABILITY_RESOLVE"] + override_path = false + dial_timeout = "30s" + header { + key = "header_key" + value = ["header_value_1","header_value_2"] + } + ca { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret-version-basic.name + } + client { + cert { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret-version-basic.name + } + key { + gcp_secret_manager_secret_uri = google_secret_manager_secret_version.secret-version-basic.name + } + } + } + } + } + } +} +`, secretID, cluster, network, subnetwork, nodepool, customServer, customMirror) +} + func TestAccContainerNodePool_defaultDriverInstallation(t *testing.T) { t.Parallel() diff --git a/google/services/containeranalysis/iam_container_analysis_note_generated_test.go b/google/services/containeranalysis/iam_container_analysis_note_generated_test.go index addc19a34cb..a4c8a0ee126 100644 --- a/google/services/containeranalysis/iam_container_analysis_note_generated_test.go +++ b/google/services/containeranalysis/iam_container_analysis_note_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccContainerAnalysisNoteIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_container_analysis_note_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/notes/%s roles/containeranalysis.notes.occurrences.viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-attestor-note%s", context["random_suffix"])), + ImportStateIdFunc: generateContainerAnalysisNoteIAMBindingStateID("google_container_analysis_note_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccContainerAnalysisNoteIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_container_analysis_note_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/notes/%s roles/containeranalysis.notes.occurrences.viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-attestor-note%s", context["random_suffix"])), + ImportStateIdFunc: generateContainerAnalysisNoteIAMBindingStateID("google_container_analysis_note_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccContainerAnalysisNoteIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_container_analysis_note_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/notes/%s roles/containeranalysis.notes.occurrences.viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-attestor-note%s", context["random_suffix"])), + ImportStateIdFunc: generateContainerAnalysisNoteIAMMemberStateID("google_container_analysis_note_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccContainerAnalysisNoteIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_container_analysis_note_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/notes/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-attestor-note%s", context["random_suffix"])), + ImportStateIdFunc: generateContainerAnalysisNoteIAMPolicyStateID("google_container_analysis_note_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccContainerAnalysisNoteIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_container_analysis_note_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/notes/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-attestor-note%s", context["random_suffix"])), + ImportStateIdFunc: generateContainerAnalysisNoteIAMPolicyStateID("google_container_analysis_note_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -249,3 +250,54 @@ resource "google_container_analysis_note_iam_binding" "foo" { } `, context) } + +func generateContainerAnalysisNoteIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + note := tpgresource.GetResourceNameFromSelfLink(rawState["note"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/notes/%s", project, note), "", "", rawState["condition.0.title"]), nil + } +} + +func generateContainerAnalysisNoteIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + note := tpgresource.GetResourceNameFromSelfLink(rawState["note"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/notes/%s", project, note), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateContainerAnalysisNoteIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + note := tpgresource.GetResourceNameFromSelfLink(rawState["note"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/notes/%s", project, note), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/containeranalysis/resource_container_analysis_note_generated_meta.yaml b/google/services/containeranalysis/resource_container_analysis_note_generated_meta.yaml index caf96261992..283a0139b67 100644 --- a/google/services/containeranalysis/resource_container_analysis_note_generated_meta.yaml +++ b/google/services/containeranalysis/resource_container_analysis_note_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_container_analysis_note' -generation_type: 'mmv1' -source_file: 'products/containeranalysis/Note.yaml' -api_service_name: 'containeranalysis.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Note' +resource: google_container_analysis_note +generation_type: mmv1 +source_file: products/containeranalysis/Note.yaml +api_service_name: containeranalysis.googleapis.com +api_version: v1 +api_resource_type_kind: Note fields: - - api_field: 'attestationAuthority.hint.humanReadableName' - - api_field: 'createTime' - - api_field: 'expirationTime' - - api_field: 'kind' - - api_field: 'longDescription' - - api_field: 'name' - - api_field: 'relatedNoteNames' - - api_field: 'relatedUrl.label' - - api_field: 'relatedUrl.url' - - api_field: 'shortDescription' - - api_field: 'updateTime' + - api_field: attestationAuthority.hint.humanReadableName + - api_field: createTime + - api_field: expirationTime + - api_field: kind + - api_field: longDescription + - api_field: name + - api_field: relatedNoteNames + - api_field: relatedUrl.label + - api_field: relatedUrl.url + - api_field: shortDescription + - api_field: updateTime diff --git a/google/services/containeranalysis/resource_container_analysis_occurrence_generated_meta.yaml b/google/services/containeranalysis/resource_container_analysis_occurrence_generated_meta.yaml index 38f7b5d7c61..996a25b06ab 100644 --- a/google/services/containeranalysis/resource_container_analysis_occurrence_generated_meta.yaml +++ b/google/services/containeranalysis/resource_container_analysis_occurrence_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_container_analysis_occurrence' -generation_type: 'mmv1' -source_file: 'products/containeranalysis/Occurrence.yaml' -api_service_name: 'containeranalysis.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Occurrence' +resource: google_container_analysis_occurrence +generation_type: mmv1 +source_file: products/containeranalysis/Occurrence.yaml +api_service_name: containeranalysis.googleapis.com +api_version: v1 +api_resource_type_kind: Occurrence fields: - - api_field: 'attestation.serializedPayload' - - api_field: 'attestation.signatures.publicKeyId' - - api_field: 'attestation.signatures.signature' - - api_field: 'createTime' - - api_field: 'kind' - - api_field: 'name' - - api_field: 'noteName' - - api_field: 'remediation' - - api_field: 'resourceUri' - - api_field: 'updateTime' + - api_field: attestation.serializedPayload + - api_field: attestation.signatures.publicKeyId + - api_field: attestation.signatures.signature + - api_field: createTime + - api_field: kind + - api_field: name + - api_field: noteName + - api_field: remediation + - api_field: resourceUri + - api_field: updateTime diff --git a/google/services/containerattached/resource_container_attached_cluster_generated_meta.yaml b/google/services/containerattached/resource_container_attached_cluster_generated_meta.yaml index a140cb86b14..801f0050795 100644 --- a/google/services/containerattached/resource_container_attached_cluster_generated_meta.yaml +++ b/google/services/containerattached/resource_container_attached_cluster_generated_meta.yaml @@ -1,41 +1,41 @@ -resource: 'google_container_attached_cluster' -generation_type: 'mmv1' -source_file: 'products/containerattached/Cluster.yaml' -api_service_name: 'gkemulticloud.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AttachedCluster' +resource: google_container_attached_cluster +generation_type: mmv1 +source_file: products/containerattached/Cluster.yaml +api_service_name: gkemulticloud.googleapis.com +api_version: v1 +api_resource_type_kind: AttachedCluster fields: - - api_field: 'annotations' - - api_field: 'authorization.adminGroups' - - api_field: 'authorization.adminUsers' - - api_field: 'binaryAuthorization.evaluationMode' - - api_field: 'clusterRegion' - - api_field: 'createTime' - - field: 'deletion_policy' - provider_only: true - - api_field: 'description' - - api_field: 'distribution' - - field: 'effective_annotations' - provider_only: true - - api_field: 'errors.message' - - api_field: 'fleet.membership' - - api_field: 'fleet.project' - - api_field: 'kubernetesVersion' - - field: 'location' - provider_only: true - - api_field: 'loggingConfig.componentConfig.enableComponents' - - api_field: 'monitoringConfig.managedPrometheusConfig.enabled' - - api_field: 'name' - - api_field: 'oidcConfig.issuerUrl' - - api_field: 'oidcConfig.jwks' - - api_field: 'platformVersion' - - api_field: 'proxyConfig.kubernetesSecret.name' - - api_field: 'proxyConfig.kubernetesSecret.namespace' - - api_field: 'reconciling' - - api_field: 'securityPostureConfig.vulnerabilityMode' - - api_field: 'state' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'workloadIdentityConfig.identityProvider' - - api_field: 'workloadIdentityConfig.issuerUri' - - api_field: 'workloadIdentityConfig.workloadPool' + - api_field: annotations + - api_field: authorization.adminGroups + - api_field: authorization.adminUsers + - api_field: binaryAuthorization.evaluationMode + - api_field: clusterRegion + - api_field: createTime + - field: deletion_policy + provider_only: true + - api_field: description + - api_field: distribution + - field: effective_annotations + provider_only: true + - api_field: errors.message + - api_field: fleet.membership + - api_field: fleet.project + - api_field: kubernetesVersion + - field: location + provider_only: true + - api_field: loggingConfig.componentConfig.enableComponents + - api_field: monitoringConfig.managedPrometheusConfig.enabled + - api_field: name + - api_field: oidcConfig.issuerUrl + - api_field: oidcConfig.jwks + - api_field: platformVersion + - api_field: proxyConfig.kubernetesSecret.name + - api_field: proxyConfig.kubernetesSecret.namespace + - api_field: reconciling + - api_field: securityPostureConfig.vulnerabilityMode + - api_field: state + - api_field: uid + - api_field: updateTime + - api_field: workloadIdentityConfig.identityProvider + - api_field: workloadIdentityConfig.issuerUri + - api_field: workloadIdentityConfig.workloadPool diff --git a/google/services/corebilling/resource_billing_project_info_generated_meta.yaml b/google/services/corebilling/resource_billing_project_info_generated_meta.yaml index c123b163650..e5958b30965 100644 --- a/google/services/corebilling/resource_billing_project_info_generated_meta.yaml +++ b/google/services/corebilling/resource_billing_project_info_generated_meta.yaml @@ -1,9 +1,9 @@ -resource: 'google_billing_project_info' -generation_type: 'mmv1' -source_file: 'products/billing/ProjectInfo.yaml' -api_service_name: 'cloudbilling.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ProjectBillingInfo' -cai_asset_name_format: '//cloudbilling.googleapis.com/projects/{{project}}/billingInfo' +resource: google_billing_project_info +generation_type: mmv1 +source_file: products/billing/ProjectInfo.yaml +api_service_name: cloudbilling.googleapis.com +api_version: v1 +api_resource_type_kind: ProjectBillingInfo +cai_asset_name_format: //cloudbilling.googleapis.com/projects/{{project}}/billingInfo fields: - - api_field: 'billing_account' + - api_field: billing_account diff --git a/google/services/databasemigrationservice/resource_database_migration_service_connection_profile_generated_meta.yaml b/google/services/databasemigrationservice/resource_database_migration_service_connection_profile_generated_meta.yaml index bded1d2c12e..51fc97e463a 100644 --- a/google/services/databasemigrationservice/resource_database_migration_service_connection_profile_generated_meta.yaml +++ b/google/services/databasemigrationservice/resource_database_migration_service_connection_profile_generated_meta.yaml @@ -1,101 +1,101 @@ -resource: 'google_database_migration_service_connection_profile' -generation_type: 'mmv1' -source_file: 'products/databasemigrationservice/ConnectionProfile.yaml' -api_service_name: 'datamigration.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ConnectionProfile' +resource: google_database_migration_service_connection_profile +generation_type: mmv1 +source_file: products/databasemigrationservice/ConnectionProfile.yaml +api_service_name: datamigration.googleapis.com +api_version: v1 +api_resource_type_kind: ConnectionProfile fields: - - api_field: 'alloydb.clusterId' - - api_field: 'alloydb.settings.initialUser.password' - - api_field: 'alloydb.settings.initialUser.passwordSet' - - api_field: 'alloydb.settings.initialUser.user' - - api_field: 'alloydb.settings.labels' - - api_field: 'alloydb.settings.primaryInstanceSettings.databaseFlags' - - api_field: 'alloydb.settings.primaryInstanceSettings.id' - - api_field: 'alloydb.settings.primaryInstanceSettings.labels' - - api_field: 'alloydb.settings.primaryInstanceSettings.machineConfig.cpuCount' - - api_field: 'alloydb.settings.primaryInstanceSettings.privateIp' - - api_field: 'alloydb.settings.vpcNetwork' - - api_field: 'cloudsql.cloudSqlId' - - api_field: 'cloudsql.privateIp' - - api_field: 'cloudsql.publicIp' - - api_field: 'cloudsql.settings.activationPolicy' - - api_field: 'cloudsql.settings.autoStorageIncrease' - - api_field: 'cloudsql.settings.cmekKeyName' - - api_field: 'cloudsql.settings.collation' - - api_field: 'cloudsql.settings.dataDiskSizeGb' - - api_field: 'cloudsql.settings.dataDiskType' - - api_field: 'cloudsql.settings.databaseFlags' - - api_field: 'cloudsql.settings.databaseVersion' - - api_field: 'cloudsql.settings.edition' - - api_field: 'cloudsql.settings.ipConfig.authorizedNetworks.expireTime' - - api_field: 'cloudsql.settings.ipConfig.authorizedNetworks.label' - - api_field: 'cloudsql.settings.ipConfig.authorizedNetworks.ttl' - - api_field: 'cloudsql.settings.ipConfig.authorizedNetworks.value' - - api_field: 'cloudsql.settings.ipConfig.enableIpv4' - - api_field: 'cloudsql.settings.ipConfig.privateNetwork' - - api_field: 'cloudsql.settings.ipConfig.requireSsl' - - api_field: 'cloudsql.settings.rootPassword' - - api_field: 'cloudsql.settings.rootPasswordSet' - - api_field: 'cloudsql.settings.sourceId' - - api_field: 'cloudsql.settings.storageAutoResizeLimit' - - api_field: 'cloudsql.settings.tier' - - api_field: 'cloudsql.settings.userLabels' - - api_field: 'cloudsql.settings.zone' - - field: 'connection_profile_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'provider' - field: 'dbprovider' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'error.code' - - api_field: 'error.details' - - api_field: 'error.message' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mysql.cloudSqlId' - - api_field: 'mysql.host' - - api_field: 'mysql.password' - - api_field: 'mysql.passwordSet' - - api_field: 'mysql.port' - - api_field: 'mysql.ssl.caCertificate' - - api_field: 'mysql.ssl.clientCertificate' - - api_field: 'mysql.ssl.clientKey' - - api_field: 'mysql.ssl.type' - - api_field: 'mysql.username' - - api_field: 'name' - - api_field: 'oracle.databaseService' - - api_field: 'oracle.forwardSshConnectivity.hostname' - - api_field: 'oracle.forwardSshConnectivity.password' - - api_field: 'oracle.forwardSshConnectivity.port' - - api_field: 'oracle.forwardSshConnectivity.privateKey' - - api_field: 'oracle.forwardSshConnectivity.username' - - api_field: 'oracle.host' - - api_field: 'oracle.password' - - api_field: 'oracle.passwordSet' - - api_field: 'oracle.port' - - api_field: 'oracle.privateConnectivity.privateConnection' - - api_field: 'oracle.ssl.caCertificate' - - api_field: 'oracle.ssl.clientCertificate' - - api_field: 'oracle.ssl.clientKey' - - api_field: 'oracle.ssl.type' - - api_field: 'oracle.staticServiceIpConnectivity' - - api_field: 'oracle.username' - - api_field: 'postgresql.alloydbClusterId' - - api_field: 'postgresql.cloudSqlId' - - api_field: 'postgresql.host' - - api_field: 'postgresql.networkArchitecture' - - api_field: 'postgresql.password' - - api_field: 'postgresql.passwordSet' - - api_field: 'postgresql.port' - - api_field: 'postgresql.ssl.caCertificate' - - api_field: 'postgresql.ssl.clientCertificate' - - api_field: 'postgresql.ssl.clientKey' - - api_field: 'postgresql.ssl.type' - - api_field: 'postgresql.username' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: alloydb.clusterId + - api_field: alloydb.settings.initialUser.password + - api_field: alloydb.settings.initialUser.passwordSet + - api_field: alloydb.settings.initialUser.user + - api_field: alloydb.settings.labels + - api_field: alloydb.settings.primaryInstanceSettings.databaseFlags + - api_field: alloydb.settings.primaryInstanceSettings.id + - api_field: alloydb.settings.primaryInstanceSettings.labels + - api_field: alloydb.settings.primaryInstanceSettings.machineConfig.cpuCount + - api_field: alloydb.settings.primaryInstanceSettings.privateIp + - api_field: alloydb.settings.vpcNetwork + - api_field: cloudsql.cloudSqlId + - api_field: cloudsql.privateIp + - api_field: cloudsql.publicIp + - api_field: cloudsql.settings.activationPolicy + - api_field: cloudsql.settings.autoStorageIncrease + - api_field: cloudsql.settings.cmekKeyName + - api_field: cloudsql.settings.collation + - api_field: cloudsql.settings.dataDiskSizeGb + - api_field: cloudsql.settings.dataDiskType + - api_field: cloudsql.settings.databaseFlags + - api_field: cloudsql.settings.databaseVersion + - api_field: cloudsql.settings.edition + - api_field: cloudsql.settings.ipConfig.authorizedNetworks.expireTime + - api_field: cloudsql.settings.ipConfig.authorizedNetworks.label + - api_field: cloudsql.settings.ipConfig.authorizedNetworks.ttl + - api_field: cloudsql.settings.ipConfig.authorizedNetworks.value + - api_field: cloudsql.settings.ipConfig.enableIpv4 + - api_field: cloudsql.settings.ipConfig.privateNetwork + - api_field: cloudsql.settings.ipConfig.requireSsl + - api_field: cloudsql.settings.rootPassword + - api_field: cloudsql.settings.rootPasswordSet + - api_field: cloudsql.settings.sourceId + - api_field: cloudsql.settings.storageAutoResizeLimit + - api_field: cloudsql.settings.tier + - api_field: cloudsql.settings.userLabels + - api_field: cloudsql.settings.zone + - field: connection_profile_id + provider_only: true + - api_field: createTime + - api_field: provider + field: dbprovider + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: error.code + - api_field: error.details + - api_field: error.message + - api_field: labels + - field: location + provider_only: true + - api_field: mysql.cloudSqlId + - api_field: mysql.host + - api_field: mysql.password + - api_field: mysql.passwordSet + - api_field: mysql.port + - api_field: mysql.ssl.caCertificate + - api_field: mysql.ssl.clientCertificate + - api_field: mysql.ssl.clientKey + - api_field: mysql.ssl.type + - api_field: mysql.username + - api_field: name + - api_field: oracle.databaseService + - api_field: oracle.forwardSshConnectivity.hostname + - api_field: oracle.forwardSshConnectivity.password + - api_field: oracle.forwardSshConnectivity.port + - api_field: oracle.forwardSshConnectivity.privateKey + - api_field: oracle.forwardSshConnectivity.username + - api_field: oracle.host + - api_field: oracle.password + - api_field: oracle.passwordSet + - api_field: oracle.port + - api_field: oracle.privateConnectivity.privateConnection + - api_field: oracle.ssl.caCertificate + - api_field: oracle.ssl.clientCertificate + - api_field: oracle.ssl.clientKey + - api_field: oracle.ssl.type + - api_field: oracle.staticServiceIpConnectivity + - api_field: oracle.username + - api_field: postgresql.alloydbClusterId + - api_field: postgresql.cloudSqlId + - api_field: postgresql.host + - api_field: postgresql.networkArchitecture + - api_field: postgresql.password + - api_field: postgresql.passwordSet + - api_field: postgresql.port + - api_field: postgresql.ssl.caCertificate + - api_field: postgresql.ssl.clientCertificate + - api_field: postgresql.ssl.clientKey + - api_field: postgresql.ssl.type + - api_field: postgresql.username + - api_field: state + - field: terraform_labels + provider_only: true diff --git a/google/services/databasemigrationservice/resource_database_migration_service_migration_job_generated_meta.yaml b/google/services/databasemigrationservice/resource_database_migration_service_migration_job_generated_meta.yaml index bcdf7aa5dfc..ed4290ec0b4 100644 --- a/google/services/databasemigrationservice/resource_database_migration_service_migration_job_generated_meta.yaml +++ b/google/services/databasemigrationservice/resource_database_migration_service_migration_job_generated_meta.yaml @@ -1,38 +1,38 @@ -resource: 'google_database_migration_service_migration_job' -generation_type: 'mmv1' -source_file: 'products/databasemigrationservice/MigrationJob.yaml' -api_service_name: 'datamigration.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MigrationJob' +resource: google_database_migration_service_migration_job +generation_type: mmv1 +source_file: products/databasemigrationservice/MigrationJob.yaml +api_service_name: datamigration.googleapis.com +api_version: v1 +api_resource_type_kind: MigrationJob fields: - - api_field: 'createTime' - - api_field: 'destination' - - api_field: 'displayName' - - api_field: 'dumpFlags.dumpFlags.name' - - api_field: 'dumpFlags.dumpFlags.value' - - api_field: 'dumpPath' - - api_field: 'dumpType' - - field: 'effective_labels' - provider_only: true - - api_field: 'error.code' - - api_field: 'error.details' - - api_field: 'error.message' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'migration_job_id' - provider_only: true - - api_field: 'name' - - api_field: 'performanceConfig.dumpParallelLevel' - - api_field: 'phase' - - api_field: 'reverseSshConnectivity.vm' - - api_field: 'reverseSshConnectivity.vmIp' - - api_field: 'reverseSshConnectivity.vmPort' - - api_field: 'reverseSshConnectivity.vpc' - - api_field: 'source' - - api_field: 'state' - - api_field: 'staticIpConnectivity' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'vpcPeeringConnectivity.vpc' + - api_field: createTime + - api_field: destination + - api_field: displayName + - api_field: dumpFlags.dumpFlags.name + - api_field: dumpFlags.dumpFlags.value + - api_field: dumpPath + - api_field: dumpType + - field: effective_labels + provider_only: true + - api_field: error.code + - api_field: error.details + - api_field: error.message + - api_field: labels + - field: location + provider_only: true + - field: migration_job_id + provider_only: true + - api_field: name + - api_field: performanceConfig.dumpParallelLevel + - api_field: phase + - api_field: reverseSshConnectivity.vm + - api_field: reverseSshConnectivity.vmIp + - api_field: reverseSshConnectivity.vmPort + - api_field: reverseSshConnectivity.vpc + - api_field: source + - api_field: state + - api_field: staticIpConnectivity + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: vpcPeeringConnectivity.vpc diff --git a/google/services/databasemigrationservice/resource_database_migration_service_private_connection_generated_meta.yaml b/google/services/databasemigrationservice/resource_database_migration_service_private_connection_generated_meta.yaml index 073140707f5..1921b7da875 100644 --- a/google/services/databasemigrationservice/resource_database_migration_service_private_connection_generated_meta.yaml +++ b/google/services/databasemigrationservice/resource_database_migration_service_private_connection_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_database_migration_service_private_connection' -generation_type: 'mmv1' -source_file: 'products/databasemigrationservice/PrivateConnection.yaml' -api_service_name: 'datamigration.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PrivateConnection' +resource: google_database_migration_service_private_connection +generation_type: mmv1 +source_file: products/databasemigrationservice/PrivateConnection.yaml +api_service_name: datamigration.googleapis.com +api_version: v1 +api_resource_type_kind: PrivateConnection fields: - - field: 'create_without_validation' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'error.details' - - api_field: 'error.message' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'private_connection_id' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'vpcPeeringConfig.subnet' - - api_field: 'vpcPeeringConfig.vpcName' + - field: create_without_validation + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: error.details + - api_field: error.message + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: private_connection_id + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: vpcPeeringConfig.subnet + - api_field: vpcPeeringConfig.vpcName diff --git a/google/services/datacatalog/iam_data_catalog_entry_group_generated_test.go b/google/services/datacatalog/iam_data_catalog_entry_group_generated_test.go index 1031141dfc2..dfb3bd59b57 100644 --- a/google/services/datacatalog/iam_data_catalog_entry_group_generated_test.go +++ b/google/services/datacatalog/iam_data_catalog_entry_group_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccDataCatalogEntryGroupIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_entry_group_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_group%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogEntryGroupIAMBindingStateID("google_data_catalog_entry_group_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccDataCatalogEntryGroupIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_entry_group_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_group%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogEntryGroupIAMBindingStateID("google_data_catalog_entry_group_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccDataCatalogEntryGroupIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_entry_group_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_group%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogEntryGroupIAMMemberStateID("google_data_catalog_entry_group_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccDataCatalogEntryGroupIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_entry_group_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_group%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogEntryGroupIAMPolicyStateID("google_data_catalog_entry_group_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccDataCatalogEntryGroupIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_entry_group_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_group%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogEntryGroupIAMPolicyStateID("google_data_catalog_entry_group_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -218,3 +219,57 @@ resource "google_data_catalog_entry_group_iam_binding" "foo" { } `, context) } + +func generateDataCatalogEntryGroupIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + entry_group := tpgresource.GetResourceNameFromSelfLink(rawState["entry_group"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", project, region, entry_group), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogEntryGroupIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + entry_group := tpgresource.GetResourceNameFromSelfLink(rawState["entry_group"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", project, region, entry_group), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogEntryGroupIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + entry_group := tpgresource.GetResourceNameFromSelfLink(rawState["entry_group"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", project, region, entry_group), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/datacatalog/iam_data_catalog_policy_tag_generated_test.go b/google/services/datacatalog/iam_data_catalog_policy_tag_generated_test.go index caff667c789..cf309e6dfe9 100644 --- a/google/services/datacatalog/iam_data_catalog_policy_tag_generated_test.go +++ b/google/services/datacatalog/iam_data_catalog_policy_tag_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -228,3 +229,51 @@ resource "google_data_catalog_policy_tag_iam_binding" "foo" { } `, context) } + +func generateDataCatalogPolicyTagIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + policy_tag := rawState["policy_tag"] + return acctest.BuildIAMImportId(fmt.Sprintf("%s", policy_tag), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogPolicyTagIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + policy_tag := rawState["policy_tag"] + return acctest.BuildIAMImportId(fmt.Sprintf("%s", policy_tag), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogPolicyTagIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + policy_tag := rawState["policy_tag"] + return acctest.BuildIAMImportId(fmt.Sprintf("%s", policy_tag), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/datacatalog/iam_data_catalog_tag_template_generated_test.go b/google/services/datacatalog/iam_data_catalog_tag_template_generated_test.go index 292415a34d7..810ca5a22d4 100644 --- a/google/services/datacatalog/iam_data_catalog_tag_template_generated_test.go +++ b/google/services/datacatalog/iam_data_catalog_tag_template_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDataCatalogTagTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_tag_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_template%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogTagTemplateIAMBindingStateID("google_data_catalog_tag_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDataCatalogTagTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_tag_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_template%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogTagTemplateIAMBindingStateID("google_data_catalog_tag_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDataCatalogTagTemplateIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_tag_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_template%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogTagTemplateIAMMemberStateID("google_data_catalog_tag_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDataCatalogTagTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_tag_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_template%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogTagTemplateIAMPolicyStateID("google_data_catalog_tag_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDataCatalogTagTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_data_catalog_tag_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf_test_my_template%s", context["random_suffix"])), + ImportStateIdFunc: generateDataCatalogTagTemplateIAMPolicyStateID("google_data_catalog_tag_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -416,3 +417,57 @@ resource "google_data_catalog_tag_template_iam_binding" "foo" { } `, context) } + +func generateDataCatalogTagTemplateIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + tag_template := tpgresource.GetResourceNameFromSelfLink(rawState["tag_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s", project, region, tag_template), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogTagTemplateIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + tag_template := tpgresource.GetResourceNameFromSelfLink(rawState["tag_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s", project, region, tag_template), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogTagTemplateIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + tag_template := tpgresource.GetResourceNameFromSelfLink(rawState["tag_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/tagTemplates/%s", project, region, tag_template), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/datacatalog/iam_data_catalog_taxonomy_generated_test.go b/google/services/datacatalog/iam_data_catalog_taxonomy_generated_test.go index 445859a9af4..4fbd75ff988 100644 --- a/google/services/datacatalog/iam_data_catalog_taxonomy_generated_test.go +++ b/google/services/datacatalog/iam_data_catalog_taxonomy_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -198,3 +199,57 @@ resource "google_data_catalog_taxonomy_iam_binding" "foo" { } `, context) } + +func generateDataCatalogTaxonomyIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + taxonomy := tpgresource.GetResourceNameFromSelfLink(rawState["taxonomy"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/taxonomies/%s", project, region, taxonomy), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogTaxonomyIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + taxonomy := tpgresource.GetResourceNameFromSelfLink(rawState["taxonomy"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/taxonomies/%s", project, region, taxonomy), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataCatalogTaxonomyIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + taxonomy := tpgresource.GetResourceNameFromSelfLink(rawState["taxonomy"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/taxonomies/%s", project, region, taxonomy), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/datacatalog/resource_data_catalog_entry_generated_meta.yaml b/google/services/datacatalog/resource_data_catalog_entry_generated_meta.yaml index e3e3b0e4af3..c9efa5c7818 100644 --- a/google/services/datacatalog/resource_data_catalog_entry_generated_meta.yaml +++ b/google/services/datacatalog/resource_data_catalog_entry_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_data_catalog_entry' -generation_type: 'mmv1' -source_file: 'products/datacatalog/Entry.yaml' -api_service_name: 'datacatalog.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Entry' +resource: google_data_catalog_entry +generation_type: mmv1 +source_file: products/datacatalog/Entry.yaml +api_service_name: datacatalog.googleapis.com +api_version: v1 +api_resource_type_kind: Entry fields: - - api_field: 'bigqueryDateShardedSpec.dataset' - - api_field: 'bigqueryDateShardedSpec.shardCount' - - api_field: 'bigqueryDateShardedSpec.tablePrefix' - - api_field: 'bigqueryTableSpec.tableSourceType' - - api_field: 'bigqueryTableSpec.tableSpec.groupedEntry' - - api_field: 'bigqueryTableSpec.viewSpec.viewQuery' - - api_field: 'description' - - api_field: 'displayName' - - field: 'entry_group' - provider_only: true - - field: 'entry_id' - provider_only: true - - api_field: 'gcsFilesetSpec.filePatterns' - - api_field: 'gcsFilesetSpec.sampleGcsFileSpecs.filePath' - - api_field: 'gcsFilesetSpec.sampleGcsFileSpecs.sizeBytes' - - api_field: 'integratedSystem' - - api_field: 'linkedResource' - - api_field: 'name' - - api_field: 'schema' - json: true - - api_field: 'type' - - api_field: 'userSpecifiedSystem' - - api_field: 'userSpecifiedType' + - api_field: bigqueryDateShardedSpec.dataset + - api_field: bigqueryDateShardedSpec.shardCount + - api_field: bigqueryDateShardedSpec.tablePrefix + - api_field: bigqueryTableSpec.tableSourceType + - api_field: bigqueryTableSpec.tableSpec.groupedEntry + - api_field: bigqueryTableSpec.viewSpec.viewQuery + - api_field: description + - api_field: displayName + - field: entry_group + provider_only: true + - field: entry_id + provider_only: true + - api_field: gcsFilesetSpec.filePatterns + - api_field: gcsFilesetSpec.sampleGcsFileSpecs.filePath + - api_field: gcsFilesetSpec.sampleGcsFileSpecs.sizeBytes + - api_field: integratedSystem + - api_field: linkedResource + - api_field: name + - api_field: schema + json: true + - api_field: type + - api_field: userSpecifiedSystem + - api_field: userSpecifiedType diff --git a/google/services/datacatalog/resource_data_catalog_entry_group_generated_meta.yaml b/google/services/datacatalog/resource_data_catalog_entry_group_generated_meta.yaml index cfec320b211..c7c20f751cd 100644 --- a/google/services/datacatalog/resource_data_catalog_entry_group_generated_meta.yaml +++ b/google/services/datacatalog/resource_data_catalog_entry_group_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_data_catalog_entry_group' -generation_type: 'mmv1' -source_file: 'products/datacatalog/EntryGroup.yaml' -api_service_name: 'datacatalog.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EntryGroup' +resource: google_data_catalog_entry_group +generation_type: mmv1 +source_file: products/datacatalog/EntryGroup.yaml +api_service_name: datacatalog.googleapis.com +api_version: v1 +api_resource_type_kind: EntryGroup fields: - - api_field: 'description' - - api_field: 'displayName' - - field: 'entry_group_id' - provider_only: true - - api_field: 'name' - - field: 'region' - provider_only: true + - api_field: description + - api_field: displayName + - field: entry_group_id + provider_only: true + - api_field: name + - field: region + provider_only: true diff --git a/google/services/datacatalog/resource_data_catalog_policy_tag_generated_meta.yaml b/google/services/datacatalog/resource_data_catalog_policy_tag_generated_meta.yaml index 61dd4fdf9a6..a02c6980fbb 100644 --- a/google/services/datacatalog/resource_data_catalog_policy_tag_generated_meta.yaml +++ b/google/services/datacatalog/resource_data_catalog_policy_tag_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_data_catalog_policy_tag' -generation_type: 'mmv1' -source_file: 'products/datacatalog/PolicyTag.yaml' -api_service_name: 'datacatalog.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PolicyTag' +resource: google_data_catalog_policy_tag +generation_type: mmv1 +source_file: products/datacatalog/PolicyTag.yaml +api_service_name: datacatalog.googleapis.com +api_version: v1 +api_resource_type_kind: PolicyTag fields: - - api_field: 'childPolicyTags' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'name' - - api_field: 'parentPolicyTag' - - field: 'taxonomy' - provider_only: true + - api_field: childPolicyTags + - api_field: description + - api_field: displayName + - api_field: name + - api_field: parentPolicyTag + - field: taxonomy + provider_only: true diff --git a/google/services/datacatalog/resource_data_catalog_tag.go b/google/services/datacatalog/resource_data_catalog_tag.go index 8cf3d5f64b5..b185038cdcd 100644 --- a/google/services/datacatalog/resource_data_catalog_tag.go +++ b/google/services/datacatalog/resource_data_catalog_tag.go @@ -552,7 +552,7 @@ func flattenNestedDataCatalogTagFields(v interface{}, d *schema.ResourceData, co original := raw.(map[string]interface{}) transformed = append(transformed, map[string]interface{}{ "field_name": k, - "display_name": flattenNestedDataCatalogTagFieldsDisplayName(original["display_name"], d, config), + "display_name": flattenNestedDataCatalogTagFieldsDisplayName(original["displayName"], d, config), "order": flattenNestedDataCatalogTagFieldsOrder(original["order"], d, config), "double_value": flattenNestedDataCatalogTagFieldsDoubleValue(original["doubleValue"], d, config), "string_value": flattenNestedDataCatalogTagFieldsStringValue(original["stringValue"], d, config), @@ -629,7 +629,7 @@ func expandNestedDataCatalogTagFields(v interface{}, d tpgresource.TerraformReso if err != nil { return nil, err } else if val := reflect.ValueOf(transformedDisplayName); val.IsValid() && !tpgresource.IsEmptyValue(val) { - transformed["display_name"] = transformedDisplayName + transformed["displayName"] = transformedDisplayName } transformedOrder, err := expandNestedDataCatalogTagFieldsOrder(original["order"], d, config) diff --git a/google/services/datacatalog/resource_data_catalog_tag_generated_meta.yaml b/google/services/datacatalog/resource_data_catalog_tag_generated_meta.yaml index 534963e9612..672580a2079 100644 --- a/google/services/datacatalog/resource_data_catalog_tag_generated_meta.yaml +++ b/google/services/datacatalog/resource_data_catalog_tag_generated_meta.yaml @@ -1,20 +1,28 @@ -resource: 'google_data_catalog_tag' -generation_type: 'mmv1' -source_file: 'products/datacatalog/Tag.yaml' -api_service_name: 'datacatalog.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Tag' +resource: google_data_catalog_tag +generation_type: mmv1 +source_file: products/datacatalog/Tag.yaml +api_service_name: datacatalog.googleapis.com +api_version: v1 +api_resource_type_kind: Tag fields: - - api_field: 'column' - - api_field: 'fields.field_value.boolValue' - - api_field: 'fields.field_value.display_name' - - api_field: 'fields.field_value.doubleValue' - - api_field: 'fields.field_value.order' - - api_field: 'fields.field_value.stringValue' - - api_field: 'fields.field_value.timestampValue' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'template' - - api_field: 'templateDisplayName' - field: 'template_displayname' + - api_field: column + - api_field: fields.key + field: fields.field_name + - api_field: fields.value.boolValue + field: fields.bool_value + - api_field: fields.value.displayName + field: fields.display_name + - api_field: fields.value.doubleValue + field: fields.double_value + - api_field: fields.value.order + field: fields.order + - api_field: fields.value.stringValue + field: fields.string_value + - api_field: fields.value.timestampValue + field: fields.timestamp_value + - api_field: name + - field: parent + provider_only: true + - api_field: template + - api_field: templateDisplayName + field: template_displayname diff --git a/google/services/datacatalog/resource_data_catalog_tag_template_generated_meta.yaml b/google/services/datacatalog/resource_data_catalog_tag_template_generated_meta.yaml index fbfd64b3a5a..f6c03e281fa 100644 --- a/google/services/datacatalog/resource_data_catalog_tag_template_generated_meta.yaml +++ b/google/services/datacatalog/resource_data_catalog_tag_template_generated_meta.yaml @@ -1,22 +1,31 @@ -resource: 'google_data_catalog_tag_template' -generation_type: 'mmv1' -source_file: 'products/datacatalog/TagTemplate.yaml' -api_service_name: 'datacatalog.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TagTemplate' +resource: google_data_catalog_tag_template +generation_type: mmv1 +source_file: products/datacatalog/TagTemplate.yaml +api_service_name: datacatalog.googleapis.com +api_version: v1 +api_resource_type_kind: TagTemplate fields: - - api_field: 'displayName' - - api_field: 'fields.field.description' - - api_field: 'fields.field.displayName' - - api_field: 'fields.field.isRequired' - - api_field: 'fields.field.name' - - api_field: 'fields.field.order' - - api_field: 'fields.field.type.enumType.allowedValues.displayName' - - api_field: 'fields.field.type.primitiveType' - - field: 'force_delete' - provider_only: true - - api_field: 'name' - - field: 'region' - provider_only: true - - field: 'tag_template_id' - provider_only: true + - api_field: displayName + - api_field: fields.key + field: fields.field_id + - api_field: fields.value.description + field: fields.description + - api_field: fields.value.displayName + field: fields.display_name + - api_field: fields.value.isRequired + field: fields.is_required + - api_field: fields.value.name + field: fields.name + - api_field: fields.value.order + field: fields.order + - api_field: fields.value.type.enumType.allowedValues.displayName + field: fields.type.enum_type.allowed_values.display_name + - api_field: fields.value.type.primitiveType + field: fields.type.primitive_type + - field: force_delete + provider_only: true + - api_field: name + - field: region + provider_only: true + - field: tag_template_id + provider_only: true diff --git a/google/services/datacatalog/resource_data_catalog_taxonomy_generated_meta.yaml b/google/services/datacatalog/resource_data_catalog_taxonomy_generated_meta.yaml index e35ff62c623..6b169e504f8 100644 --- a/google/services/datacatalog/resource_data_catalog_taxonomy_generated_meta.yaml +++ b/google/services/datacatalog/resource_data_catalog_taxonomy_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_data_catalog_taxonomy' -generation_type: 'mmv1' -source_file: 'products/datacatalog/Taxonomy.yaml' -api_service_name: 'datacatalog.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Taxonomy' +resource: google_data_catalog_taxonomy +generation_type: mmv1 +source_file: products/datacatalog/Taxonomy.yaml +api_service_name: datacatalog.googleapis.com +api_version: v1 +api_resource_type_kind: Taxonomy fields: - - api_field: 'activatedPolicyTypes' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'name' - - field: 'region' - provider_only: true + - api_field: activatedPolicyTypes + - api_field: description + - api_field: displayName + - api_field: name + - field: region + provider_only: true diff --git a/google/services/datafusion/iam_data_fusion_instance.go b/google/services/datafusion/iam_data_fusion_instance.go index a37bf0d0519..b8d28ee8449 100644 --- a/google/services/datafusion/iam_data_fusion_instance.go +++ b/google/services/datafusion/iam_data_fusion_instance.go @@ -91,7 +91,7 @@ func DataFusionInstanceIamUpdaterProducer(d tpgresource.TerraformResourceData, c } // We may have gotten either a long or short name, so attempt to parse long name if possible - m, err := tpgresource.GetImportIdQualifiers([]string{"projects/(?P[^/]+)/locations/(?P[^/]+)/instances/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config, d.Get("name").(string)) + m, err := tpgresource.GetImportIdQualifiers([]string{"projects/(?P[^/]+)/locations/(?P[^/]+)/instances/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config, d.Get("name").(string)) if err != nil { return nil, err } @@ -134,7 +134,7 @@ func DataFusionInstanceIdParseFunc(d *schema.ResourceData, config *transport_tpg values["region"] = region } - m, err := tpgresource.GetImportIdQualifiers([]string{"projects/(?P[^/]+)/locations/(?P[^/]+)/instances/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config, d.Id()) + m, err := tpgresource.GetImportIdQualifiers([]string{"projects/(?P[^/]+)/locations/(?P[^/]+)/instances/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)/(?P[^/]+)", "(?P[^/]+)"}, d, config, d.Id()) if err != nil { return err } diff --git a/google/services/datafusion/iam_data_fusion_instance_generated_test.go b/google/services/datafusion/iam_data_fusion_instance_generated_test.go index c133a786429..69daca4a86c 100644 --- a/google/services/datafusion/iam_data_fusion_instance_generated_test.go +++ b/google/services/datafusion/iam_data_fusion_instance_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDataFusionInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_data_fusion_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateDataFusionInstanceIAMBindingStateID("google_data_fusion_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDataFusionInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_data_fusion_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateDataFusionInstanceIAMBindingStateID("google_data_fusion_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDataFusionInstanceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_data_fusion_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateDataFusionInstanceIAMMemberStateID("google_data_fusion_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDataFusionInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_data_fusion_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateDataFusionInstanceIAMPolicyStateID("google_data_fusion_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDataFusionInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_data_fusion_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateDataFusionInstanceIAMPolicyStateID("google_data_fusion_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -248,3 +249,57 @@ resource "google_data_fusion_instance_iam_binding" "foo" { } `, context) } + +func generateDataFusionInstanceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, region, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataFusionInstanceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, region, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataFusionInstanceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, region, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/datafusion/resource_data_fusion_instance_generated_meta.yaml b/google/services/datafusion/resource_data_fusion_instance_generated_meta.yaml index 18331a0c04b..127a7158d2e 100644 --- a/google/services/datafusion/resource_data_fusion_instance_generated_meta.yaml +++ b/google/services/datafusion/resource_data_fusion_instance_generated_meta.yaml @@ -1,47 +1,47 @@ -resource: 'google_data_fusion_instance' -generation_type: 'mmv1' -source_file: 'products/datafusion/Instance.yaml' -api_service_name: 'datafusion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_data_fusion_instance +generation_type: mmv1 +source_file: products/datafusion/Instance.yaml +api_service_name: datafusion.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'accelerators.acceleratorType' - - api_field: 'accelerators.state' - - api_field: 'apiEndpoint' - - api_field: 'createTime' - - api_field: 'cryptoKeyConfig.keyReference' - - api_field: 'dataprocServiceAccount' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableRbac' - - api_field: 'enableStackdriverLogging' - - api_field: 'enableStackdriverMonitoring' - - api_field: 'eventPublishConfig.enabled' - - api_field: 'eventPublishConfig.topic' - - api_field: 'gcsBucket' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'networkConfig.connectionType' - - api_field: 'networkConfig.ipAllocation' - - api_field: 'networkConfig.network' - - api_field: 'networkConfig.privateServiceConnectConfig.effectiveUnreachableCidrBlock' - - api_field: 'networkConfig.privateServiceConnectConfig.networkAttachment' - - api_field: 'networkConfig.privateServiceConnectConfig.unreachableCidrBlock' - - api_field: 'options' - - api_field: 'p4ServiceAccount' - - api_field: 'privateInstance' - - field: 'region' - provider_only: true - - api_field: 'serviceEndpoint' - - api_field: 'state' - - api_field: 'stateMessage' - - api_field: 'tags' - - api_field: 'tenantProjectId' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' - - api_field: 'version' - - api_field: 'zone' + - api_field: accelerators.acceleratorType + - api_field: accelerators.state + - api_field: apiEndpoint + - api_field: createTime + - api_field: cryptoKeyConfig.keyReference + - api_field: dataprocServiceAccount + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: enableRbac + - api_field: enableStackdriverLogging + - api_field: enableStackdriverMonitoring + - api_field: eventPublishConfig.enabled + - api_field: eventPublishConfig.topic + - api_field: gcsBucket + - api_field: labels + - api_field: name + - api_field: networkConfig.connectionType + - api_field: networkConfig.ipAllocation + - api_field: networkConfig.network + - api_field: networkConfig.privateServiceConnectConfig.effectiveUnreachableCidrBlock + - api_field: networkConfig.privateServiceConnectConfig.networkAttachment + - api_field: networkConfig.privateServiceConnectConfig.unreachableCidrBlock + - api_field: options + - api_field: p4ServiceAccount + - api_field: privateInstance + - field: region + provider_only: true + - api_field: serviceEndpoint + - api_field: state + - api_field: stateMessage + - api_field: tags + - api_field: tenantProjectId + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: updateTime + - api_field: version + - api_field: zone diff --git a/google/services/datalossprevention/resource_data_loss_prevention_deidentify_template_generated_meta.yaml b/google/services/datalossprevention/resource_data_loss_prevention_deidentify_template_generated_meta.yaml index ebb61e483ed..e7316871885 100644 --- a/google/services/datalossprevention/resource_data_loss_prevention_deidentify_template_generated_meta.yaml +++ b/google/services/datalossprevention/resource_data_loss_prevention_deidentify_template_generated_meta.yaml @@ -1,366 +1,366 @@ -resource: 'google_data_loss_prevention_deidentify_template' -generation_type: 'mmv1' -source_file: 'products/dlp/DeidentifyTemplate.yaml' -api_service_name: 'dlp.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'DeidentifyTemplate' +resource: google_data_loss_prevention_deidentify_template +generation_type: mmv1 +source_file: products/dlp/DeidentifyTemplate.yaml +api_service_name: dlp.googleapis.com +api_version: v2 +api_resource_type_kind: DeidentifyTemplate fields: - - api_field: 'createTime' - - api_field: 'deidentifyConfig.imageTransformations.transforms.allInfoTypes' - - api_field: 'deidentifyConfig.imageTransformations.transforms.allText' - - api_field: 'deidentifyConfig.imageTransformations.transforms.redactionColor.blue' - - api_field: 'deidentifyConfig.imageTransformations.transforms.redactionColor.green' - - api_field: 'deidentifyConfig.imageTransformations.transforms.redactionColor.red' - - api_field: 'deidentifyConfig.imageTransformations.transforms.selectedInfoTypes.infoTypes.name' - - api_field: 'deidentifyConfig.imageTransformations.transforms.selectedInfoTypes.infoTypes.sensitivityScore.score' - - api_field: 'deidentifyConfig.imageTransformations.transforms.selectedInfoTypes.infoTypes.version' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.infoTypes.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.infoTypes.sensitivityScore.score' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.infoTypes.version' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.day' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.month' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.year' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dayOfWeekValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.floatValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.integerValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.stringValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.hours' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.minutes' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.nanos' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.seconds' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timestampValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.day' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.month' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.year' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dayOfWeekValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.floatValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.integerValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.stringValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.hours' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.minutes' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.nanos' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.seconds' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timestampValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.day' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.month' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.year' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dayOfWeekValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.floatValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.integerValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.stringValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.hours' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.minutes' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.nanos' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.seconds' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timestampValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.charactersToSkip' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.commonCharactersToIgnore' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.maskingCharacter' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.numberToMask' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.reverseOrder' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.context.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.sensitivityScore.score' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.version' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.commonAlphabet' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.context.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.customAlphabet' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.radix' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.sensitivityScore.score' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.version' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.context.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.lowerBoundDays' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.upperBoundDays' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.bucketSize' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.floatValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.integerValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.floatValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.integerValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.redactConfig' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.booleanValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.day' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.month' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.year' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dayOfWeekValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.floatValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.integerValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.stringValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.hours' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.minutes' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.nanos' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.seconds' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timestampValue' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceDictionaryConfig.wordList.words' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceWithInfoTypeConfig' - - api_field: 'deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.timePartConfig.partToExtract' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.field.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.operator' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.logicalOperator' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.fields.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.infoTypes.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.infoTypes.sensitivityScore.score' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.infoTypes.version' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.charactersToSkip' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.commonCharactersToIgnore' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.maskingCharacter' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.numberToMask' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.reverseOrder' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.context.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.sensitivityScore.score' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.version' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.commonAlphabet' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.context.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.customAlphabet' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.radix' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.sensitivityScore.score' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.version' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.context.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.lowerBoundDays' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.upperBoundDays' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.bucketSize' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.redactConfig' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceDictionaryConfig.wordList.words' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceWithInfoTypeConfig' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.timePartConfig.partToExtract' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.charactersToSkip' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.commonCharactersToIgnore' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.maskingCharacter' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.numberToMask' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.reverseOrder' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.context.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.sensitivityScore.score' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.version' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.commonAlphabet' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.context.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.customAlphabet' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.radix' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.sensitivityScore.score' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.version' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.context.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.cryptoKeyName' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.wrappedKey' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.transient.name' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.unwrapped.key' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.lowerBoundDays' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.upperBoundDays' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.bucketSize' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.redactConfig' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceDictionaryConfig.wordList.words' - - api_field: 'deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.timePartConfig.partToExtract' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.field.name' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.operator' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.booleanValue' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dateValue.day' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dateValue.month' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dateValue.year' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dayOfWeekValue' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.floatValue' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.integerValue' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.stringValue' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.hours' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.minutes' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.nanos' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.seconds' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timestampValue' - - api_field: 'deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.logicalOperator' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'name' - - field: 'parent' - provider_only: true - - field: 'template_id' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: deidentifyConfig.imageTransformations.transforms.allInfoTypes + - api_field: deidentifyConfig.imageTransformations.transforms.allText + - api_field: deidentifyConfig.imageTransformations.transforms.redactionColor.blue + - api_field: deidentifyConfig.imageTransformations.transforms.redactionColor.green + - api_field: deidentifyConfig.imageTransformations.transforms.redactionColor.red + - api_field: deidentifyConfig.imageTransformations.transforms.selectedInfoTypes.infoTypes.name + - api_field: deidentifyConfig.imageTransformations.transforms.selectedInfoTypes.infoTypes.sensitivityScore.score + - api_field: deidentifyConfig.imageTransformations.transforms.selectedInfoTypes.infoTypes.version + - api_field: deidentifyConfig.infoTypeTransformations.transformations.infoTypes.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.infoTypes.sensitivityScore.score + - api_field: deidentifyConfig.infoTypeTransformations.transformations.infoTypes.version + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.day + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.month + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.year + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dayOfWeekValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.floatValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.integerValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.stringValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.hours + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.minutes + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.nanos + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.seconds + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timestampValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.day + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.month + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.year + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dayOfWeekValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.floatValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.integerValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.stringValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.hours + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.minutes + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.nanos + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.seconds + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timestampValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.day + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.month + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.year + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dayOfWeekValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.floatValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.integerValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.stringValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.hours + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.minutes + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.nanos + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.seconds + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timestampValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.charactersToSkip + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.commonCharactersToIgnore + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.maskingCharacter + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.numberToMask + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.reverseOrder + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.context.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.sensitivityScore.score + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.version + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.commonAlphabet + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.context.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.customAlphabet + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.radix + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.sensitivityScore.score + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.version + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.context.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.lowerBoundDays + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.upperBoundDays + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.bucketSize + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.floatValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.integerValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.floatValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.integerValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.redactConfig + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.booleanValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.day + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.month + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.year + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dayOfWeekValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.floatValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.integerValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.stringValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.hours + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.minutes + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.nanos + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.seconds + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timestampValue + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceDictionaryConfig.wordList.words + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.replaceWithInfoTypeConfig + - api_field: deidentifyConfig.infoTypeTransformations.transformations.primitiveTransformation.timePartConfig.partToExtract + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.field.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.operator + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.conditions.conditions.value.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.condition.expressions.logicalOperator + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.fields.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.infoTypes.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.infoTypes.sensitivityScore.score + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.infoTypes.version + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.max.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.min.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.charactersToSkip + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.commonCharactersToIgnore + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.maskingCharacter + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.numberToMask + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.characterMaskConfig.reverseOrder + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.context.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.sensitivityScore.score + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.version + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoHashConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.commonAlphabet + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.context.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.customAlphabet + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.radix + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.sensitivityScore.score + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.version + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.context.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.lowerBoundDays + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.dateShiftConfig.upperBoundDays + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.bucketSize + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.redactConfig + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceConfig.newValue.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceDictionaryConfig.wordList.words + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.replaceWithInfoTypeConfig + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.infoTypeTransformations.transformations.primitiveTransformation.timePartConfig.partToExtract + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.max.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.min.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.bucketingConfig.buckets.replacementValue.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.charactersToSkip + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.charactersToIgnore.commonCharactersToIgnore + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.maskingCharacter + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.numberToMask + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.characterMaskConfig.reverseOrder + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.context.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.sensitivityScore.score + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoDeterministicConfig.surrogateInfoType.version + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoHashConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.commonAlphabet + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.context.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.customAlphabet + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.radix + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.sensitivityScore.score + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.cryptoReplaceFfxFpeConfig.surrogateInfoType.version + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.context.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.cryptoKeyName + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.kmsWrapped.wrappedKey + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.transient.name + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.cryptoKey.unwrapped.key + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.lowerBoundDays + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.dateShiftConfig.upperBoundDays + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.bucketSize + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.lowerBound.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.fixedSizeBucketingConfig.upperBound.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.redactConfig + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.booleanValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dateValue.day + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dateValue.month + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dateValue.year + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.floatValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.integerValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.stringValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceConfig.newValue.timestampValue + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.replaceDictionaryConfig.wordList.words + - api_field: deidentifyConfig.recordTransformations.fieldTransformations.primitiveTransformation.timePartConfig.partToExtract + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.field.name + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.operator + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.booleanValue + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dateValue.day + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dateValue.month + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dateValue.year + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.dayOfWeekValue + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.floatValue + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.integerValue + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.stringValue + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.hours + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.minutes + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.nanos + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timeValue.seconds + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.conditions.conditions.value.timestampValue + - api_field: deidentifyConfig.recordTransformations.recordSuppressions.condition.expressions.logicalOperator + - api_field: description + - api_field: displayName + - api_field: name + - field: parent + provider_only: true + - field: template_id + provider_only: true + - api_field: updateTime diff --git a/google/services/datalossprevention/resource_data_loss_prevention_discovery_config_generated_meta.yaml b/google/services/datalossprevention/resource_data_loss_prevention_discovery_config_generated_meta.yaml index 6e332880aa1..e4ee85ff740 100644 --- a/google/services/datalossprevention/resource_data_loss_prevention_discovery_config_generated_meta.yaml +++ b/google/services/datalossprevention/resource_data_loss_prevention_discovery_config_generated_meta.yaml @@ -1,99 +1,99 @@ -resource: 'google_data_loss_prevention_discovery_config' -generation_type: 'mmv1' -source_file: 'products/dlp/DiscoveryConfig.yaml' -api_service_name: 'dlp.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'DiscoveryConfig' +resource: google_data_loss_prevention_discovery_config +generation_type: mmv1 +source_file: products/dlp/DiscoveryConfig.yaml +api_service_name: dlp.googleapis.com +api_version: v2 +api_resource_type_kind: DiscoveryConfig fields: - - api_field: 'actions.exportData.profileTable.datasetId' - - api_field: 'actions.exportData.profileTable.projectId' - - api_field: 'actions.exportData.profileTable.tableId' - - api_field: 'actions.pubSubNotification.detailOfMessage' - - api_field: 'actions.pubSubNotification.event' - - api_field: 'actions.pubSubNotification.pubsubCondition.expressions.conditions.minimumRiskScore' - - api_field: 'actions.pubSubNotification.pubsubCondition.expressions.conditions.minimumSensitivityScore' - - api_field: 'actions.pubSubNotification.pubsubCondition.expressions.logicalOperator' - - api_field: 'actions.pubSubNotification.topic' - - api_field: 'actions.publishToDataplexCatalog' - - api_field: 'actions.tagResources.lowerDataRiskToLow' - - api_field: 'actions.tagResources.profileGenerationsToTag' - - api_field: 'actions.tagResources.tagConditions.sensitivityScore.score' - - api_field: 'actions.tagResources.tagConditions.tag.namespacedValue' - - api_field: 'createTime' - - api_field: 'displayName' - - api_field: 'errors.details.code' - - api_field: 'errors.details.details' - - api_field: 'errors.details.message' - - api_field: 'errors.timestamp' - - api_field: 'inspectTemplates' - - api_field: 'lastRunTime' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'orgConfig.location.folderId' - - api_field: 'orgConfig.location.organizationId' - - api_field: 'orgConfig.projectId' - - api_field: 'otherCloudStartingLocation.awsLocation.accountId' - - api_field: 'otherCloudStartingLocation.awsLocation.allAssetInventoryAssets' - - field: 'parent' - provider_only: true - - api_field: 'status' - - api_field: 'targets.bigQueryTarget.cadence.inspectTemplateModifiedCadence.frequency' - - api_field: 'targets.bigQueryTarget.cadence.schemaModifiedCadence.frequency' - - api_field: 'targets.bigQueryTarget.cadence.schemaModifiedCadence.types' - - api_field: 'targets.bigQueryTarget.cadence.tableModifiedCadence.frequency' - - api_field: 'targets.bigQueryTarget.cadence.tableModifiedCadence.types' - - api_field: 'targets.bigQueryTarget.conditions.createdAfter' - - api_field: 'targets.bigQueryTarget.conditions.orConditions.minAge' - - api_field: 'targets.bigQueryTarget.conditions.orConditions.minRowCount' - - api_field: 'targets.bigQueryTarget.conditions.typeCollection' - - api_field: 'targets.bigQueryTarget.conditions.types.types' - - api_field: 'targets.bigQueryTarget.disabled' - - api_field: 'targets.bigQueryTarget.filter.otherTables' - - api_field: 'targets.bigQueryTarget.filter.tableReference.datasetId' - - api_field: 'targets.bigQueryTarget.filter.tableReference.tableId' - - api_field: 'targets.bigQueryTarget.filter.tables.includeRegexes.patterns.datasetIdRegex' - - api_field: 'targets.bigQueryTarget.filter.tables.includeRegexes.patterns.projectIdRegex' - - api_field: 'targets.bigQueryTarget.filter.tables.includeRegexes.patterns.tableIdRegex' - - api_field: 'targets.cloudSqlTarget.conditions.databaseEngines' - - api_field: 'targets.cloudSqlTarget.conditions.types' - - api_field: 'targets.cloudSqlTarget.disabled' - - api_field: 'targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.databaseRegex' - - api_field: 'targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.databaseResourceNameRegex' - - api_field: 'targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.instanceRegex' - - api_field: 'targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.projectIdRegex' - - api_field: 'targets.cloudSqlTarget.filter.databaseResourceReference.database' - - api_field: 'targets.cloudSqlTarget.filter.databaseResourceReference.databaseResource' - - api_field: 'targets.cloudSqlTarget.filter.databaseResourceReference.instance' - - api_field: 'targets.cloudSqlTarget.filter.databaseResourceReference.projectId' - - api_field: 'targets.cloudSqlTarget.filter.others' - - api_field: 'targets.cloudSqlTarget.generationCadence.inspectTemplateModifiedCadence.frequency' - - api_field: 'targets.cloudSqlTarget.generationCadence.refreshFrequency' - - api_field: 'targets.cloudSqlTarget.generationCadence.schemaModifiedCadence.frequency' - - api_field: 'targets.cloudSqlTarget.generationCadence.schemaModifiedCadence.types' - - api_field: 'targets.cloudStorageTarget.conditions.cloudStorageConditions.includedBucketAttributes' - - api_field: 'targets.cloudStorageTarget.conditions.cloudStorageConditions.includedObjectAttributes' - - api_field: 'targets.cloudStorageTarget.conditions.createdAfter' - - api_field: 'targets.cloudStorageTarget.conditions.minAge' - - api_field: 'targets.cloudStorageTarget.disabled' - - api_field: 'targets.cloudStorageTarget.filter.cloudStorageResourceReference.bucketName' - - api_field: 'targets.cloudStorageTarget.filter.cloudStorageResourceReference.projectId' - - api_field: 'targets.cloudStorageTarget.filter.collection.includeRegexes.patterns.cloudStorageRegex.bucketNameRegex' - - api_field: 'targets.cloudStorageTarget.filter.collection.includeRegexes.patterns.cloudStorageRegex.projectIdRegex' - - api_field: 'targets.cloudStorageTarget.filter.others' - - api_field: 'targets.cloudStorageTarget.generationCadence.inspectTemplateModifiedCadence.frequency' - - api_field: 'targets.cloudStorageTarget.generationCadence.refreshFrequency' - - api_field: 'targets.otherCloudTarget.conditions.amazonS3BucketConditions.bucketTypes' - - api_field: 'targets.otherCloudTarget.conditions.amazonS3BucketConditions.objectStorageClasses' - - api_field: 'targets.otherCloudTarget.conditions.minAge' - - api_field: 'targets.otherCloudTarget.dataSourceType.dataSource' - - api_field: 'targets.otherCloudTarget.disabled' - - api_field: 'targets.otherCloudTarget.filter.collection.includeRegexes.patterns.amazonS3BucketRegex.awsAccountRegex.accountIdRegex' - - api_field: 'targets.otherCloudTarget.filter.collection.includeRegexes.patterns.amazonS3BucketRegex.bucketNameRegex' - - api_field: 'targets.otherCloudTarget.filter.others' - - api_field: 'targets.otherCloudTarget.filter.singleResource.amazonS3Bucket.awsAccount.accountId' - - api_field: 'targets.otherCloudTarget.filter.singleResource.amazonS3Bucket.bucketName' - - api_field: 'targets.otherCloudTarget.generationCadence.inspectTemplateModifiedCadence.frequency' - - api_field: 'targets.otherCloudTarget.generationCadence.refreshFrequency' - - api_field: 'targets.secretsTarget' - - api_field: 'updateTime' + - api_field: actions.exportData.profileTable.datasetId + - api_field: actions.exportData.profileTable.projectId + - api_field: actions.exportData.profileTable.tableId + - api_field: actions.pubSubNotification.detailOfMessage + - api_field: actions.pubSubNotification.event + - api_field: actions.pubSubNotification.pubsubCondition.expressions.conditions.minimumRiskScore + - api_field: actions.pubSubNotification.pubsubCondition.expressions.conditions.minimumSensitivityScore + - api_field: actions.pubSubNotification.pubsubCondition.expressions.logicalOperator + - api_field: actions.pubSubNotification.topic + - api_field: actions.publishToDataplexCatalog + - api_field: actions.tagResources.lowerDataRiskToLow + - api_field: actions.tagResources.profileGenerationsToTag + - api_field: actions.tagResources.tagConditions.sensitivityScore.score + - api_field: actions.tagResources.tagConditions.tag.namespacedValue + - api_field: createTime + - api_field: displayName + - api_field: errors.details.code + - api_field: errors.details.details + - api_field: errors.details.message + - api_field: errors.timestamp + - api_field: inspectTemplates + - api_field: lastRunTime + - field: location + provider_only: true + - api_field: name + - api_field: orgConfig.location.folderId + - api_field: orgConfig.location.organizationId + - api_field: orgConfig.projectId + - api_field: otherCloudStartingLocation.awsLocation.accountId + - api_field: otherCloudStartingLocation.awsLocation.allAssetInventoryAssets + - field: parent + provider_only: true + - api_field: status + - api_field: targets.bigQueryTarget.cadence.inspectTemplateModifiedCadence.frequency + - api_field: targets.bigQueryTarget.cadence.schemaModifiedCadence.frequency + - api_field: targets.bigQueryTarget.cadence.schemaModifiedCadence.types + - api_field: targets.bigQueryTarget.cadence.tableModifiedCadence.frequency + - api_field: targets.bigQueryTarget.cadence.tableModifiedCadence.types + - api_field: targets.bigQueryTarget.conditions.createdAfter + - api_field: targets.bigQueryTarget.conditions.orConditions.minAge + - api_field: targets.bigQueryTarget.conditions.orConditions.minRowCount + - api_field: targets.bigQueryTarget.conditions.typeCollection + - api_field: targets.bigQueryTarget.conditions.types.types + - api_field: targets.bigQueryTarget.disabled + - api_field: targets.bigQueryTarget.filter.otherTables + - api_field: targets.bigQueryTarget.filter.tableReference.datasetId + - api_field: targets.bigQueryTarget.filter.tableReference.tableId + - api_field: targets.bigQueryTarget.filter.tables.includeRegexes.patterns.datasetIdRegex + - api_field: targets.bigQueryTarget.filter.tables.includeRegexes.patterns.projectIdRegex + - api_field: targets.bigQueryTarget.filter.tables.includeRegexes.patterns.tableIdRegex + - api_field: targets.cloudSqlTarget.conditions.databaseEngines + - api_field: targets.cloudSqlTarget.conditions.types + - api_field: targets.cloudSqlTarget.disabled + - api_field: targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.databaseRegex + - api_field: targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.databaseResourceNameRegex + - api_field: targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.instanceRegex + - api_field: targets.cloudSqlTarget.filter.collection.includeRegexes.patterns.projectIdRegex + - api_field: targets.cloudSqlTarget.filter.databaseResourceReference.database + - api_field: targets.cloudSqlTarget.filter.databaseResourceReference.databaseResource + - api_field: targets.cloudSqlTarget.filter.databaseResourceReference.instance + - api_field: targets.cloudSqlTarget.filter.databaseResourceReference.projectId + - api_field: targets.cloudSqlTarget.filter.others + - api_field: targets.cloudSqlTarget.generationCadence.inspectTemplateModifiedCadence.frequency + - api_field: targets.cloudSqlTarget.generationCadence.refreshFrequency + - api_field: targets.cloudSqlTarget.generationCadence.schemaModifiedCadence.frequency + - api_field: targets.cloudSqlTarget.generationCadence.schemaModifiedCadence.types + - api_field: targets.cloudStorageTarget.conditions.cloudStorageConditions.includedBucketAttributes + - api_field: targets.cloudStorageTarget.conditions.cloudStorageConditions.includedObjectAttributes + - api_field: targets.cloudStorageTarget.conditions.createdAfter + - api_field: targets.cloudStorageTarget.conditions.minAge + - api_field: targets.cloudStorageTarget.disabled + - api_field: targets.cloudStorageTarget.filter.cloudStorageResourceReference.bucketName + - api_field: targets.cloudStorageTarget.filter.cloudStorageResourceReference.projectId + - api_field: targets.cloudStorageTarget.filter.collection.includeRegexes.patterns.cloudStorageRegex.bucketNameRegex + - api_field: targets.cloudStorageTarget.filter.collection.includeRegexes.patterns.cloudStorageRegex.projectIdRegex + - api_field: targets.cloudStorageTarget.filter.others + - api_field: targets.cloudStorageTarget.generationCadence.inspectTemplateModifiedCadence.frequency + - api_field: targets.cloudStorageTarget.generationCadence.refreshFrequency + - api_field: targets.otherCloudTarget.conditions.amazonS3BucketConditions.bucketTypes + - api_field: targets.otherCloudTarget.conditions.amazonS3BucketConditions.objectStorageClasses + - api_field: targets.otherCloudTarget.conditions.minAge + - api_field: targets.otherCloudTarget.dataSourceType.dataSource + - api_field: targets.otherCloudTarget.disabled + - api_field: targets.otherCloudTarget.filter.collection.includeRegexes.patterns.amazonS3BucketRegex.awsAccountRegex.accountIdRegex + - api_field: targets.otherCloudTarget.filter.collection.includeRegexes.patterns.amazonS3BucketRegex.bucketNameRegex + - api_field: targets.otherCloudTarget.filter.others + - api_field: targets.otherCloudTarget.filter.singleResource.amazonS3Bucket.awsAccount.accountId + - api_field: targets.otherCloudTarget.filter.singleResource.amazonS3Bucket.bucketName + - api_field: targets.otherCloudTarget.generationCadence.inspectTemplateModifiedCadence.frequency + - api_field: targets.otherCloudTarget.generationCadence.refreshFrequency + - api_field: targets.secretsTarget + - api_field: updateTime diff --git a/google/services/datalossprevention/resource_data_loss_prevention_inspect_template_generated_meta.yaml b/google/services/datalossprevention/resource_data_loss_prevention_inspect_template_generated_meta.yaml index a006062530f..757a5112651 100644 --- a/google/services/datalossprevention/resource_data_loss_prevention_inspect_template_generated_meta.yaml +++ b/google/services/datalossprevention/resource_data_loss_prevention_inspect_template_generated_meta.yaml @@ -1,60 +1,60 @@ -resource: 'google_data_loss_prevention_inspect_template' -generation_type: 'mmv1' -source_file: 'products/dlp/InspectTemplate.yaml' -api_service_name: 'dlp.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'InspectTemplate' +resource: google_data_loss_prevention_inspect_template +generation_type: mmv1 +source_file: products/dlp/InspectTemplate.yaml +api_service_name: dlp.googleapis.com +api_version: v2 +api_resource_type_kind: InspectTemplate fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'inspectConfig.contentOptions' - - api_field: 'inspectConfig.customInfoTypes.dictionary.cloudStoragePath.path' - - api_field: 'inspectConfig.customInfoTypes.dictionary.wordList.words' - - api_field: 'inspectConfig.customInfoTypes.exclusionType' - - api_field: 'inspectConfig.customInfoTypes.infoType.name' - - api_field: 'inspectConfig.customInfoTypes.infoType.sensitivityScore.score' - - api_field: 'inspectConfig.customInfoTypes.infoType.version' - - api_field: 'inspectConfig.customInfoTypes.likelihood' - - api_field: 'inspectConfig.customInfoTypes.regex.groupIndexes' - - api_field: 'inspectConfig.customInfoTypes.regex.pattern' - - api_field: 'inspectConfig.customInfoTypes.sensitivityScore.score' - - api_field: 'inspectConfig.customInfoTypes.storedType.name' - - api_field: 'inspectConfig.customInfoTypes.surrogateType' - - api_field: 'inspectConfig.excludeInfoTypes' - - api_field: 'inspectConfig.includeQuote' - - api_field: 'inspectConfig.infoTypes.name' - - api_field: 'inspectConfig.infoTypes.sensitivityScore.score' - - api_field: 'inspectConfig.infoTypes.version' - - api_field: 'inspectConfig.limits.maxFindingsPerInfoType.infoType.name' - - api_field: 'inspectConfig.limits.maxFindingsPerInfoType.infoType.sensitivityScore.score' - - api_field: 'inspectConfig.limits.maxFindingsPerInfoType.infoType.version' - - api_field: 'inspectConfig.limits.maxFindingsPerInfoType.maxFindings' - - api_field: 'inspectConfig.limits.maxFindingsPerItem' - - api_field: 'inspectConfig.limits.maxFindingsPerRequest' - - api_field: 'inspectConfig.minLikelihood' - - api_field: 'inspectConfig.ruleSet.infoTypes.name' - - api_field: 'inspectConfig.ruleSet.infoTypes.sensitivityScore.score' - - api_field: 'inspectConfig.ruleSet.infoTypes.version' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.dictionary.cloudStoragePath.path' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.dictionary.wordList.words' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.groupIndexes' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.pattern' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowAfter' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowBefore' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.name' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.sensitivityScore.score' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.version' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.matchingType' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.regex.groupIndexes' - - api_field: 'inspectConfig.ruleSet.rules.exclusionRule.regex.pattern' - - api_field: 'inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.groupIndexes' - - api_field: 'inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.pattern' - - api_field: 'inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.fixedLikelihood' - - api_field: 'inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.relativeLikelihood' - - api_field: 'inspectConfig.ruleSet.rules.hotwordRule.proximity.windowAfter' - - api_field: 'inspectConfig.ruleSet.rules.hotwordRule.proximity.windowBefore' - - api_field: 'name' - - field: 'parent' - provider_only: true - - field: 'template_id' - provider_only: true + - api_field: description + - api_field: displayName + - api_field: inspectConfig.contentOptions + - api_field: inspectConfig.customInfoTypes.dictionary.cloudStoragePath.path + - api_field: inspectConfig.customInfoTypes.dictionary.wordList.words + - api_field: inspectConfig.customInfoTypes.exclusionType + - api_field: inspectConfig.customInfoTypes.infoType.name + - api_field: inspectConfig.customInfoTypes.infoType.sensitivityScore.score + - api_field: inspectConfig.customInfoTypes.infoType.version + - api_field: inspectConfig.customInfoTypes.likelihood + - api_field: inspectConfig.customInfoTypes.regex.groupIndexes + - api_field: inspectConfig.customInfoTypes.regex.pattern + - api_field: inspectConfig.customInfoTypes.sensitivityScore.score + - api_field: inspectConfig.customInfoTypes.storedType.name + - api_field: inspectConfig.customInfoTypes.surrogateType + - api_field: inspectConfig.excludeInfoTypes + - api_field: inspectConfig.includeQuote + - api_field: inspectConfig.infoTypes.name + - api_field: inspectConfig.infoTypes.sensitivityScore.score + - api_field: inspectConfig.infoTypes.version + - api_field: inspectConfig.limits.maxFindingsPerInfoType.infoType.name + - api_field: inspectConfig.limits.maxFindingsPerInfoType.infoType.sensitivityScore.score + - api_field: inspectConfig.limits.maxFindingsPerInfoType.infoType.version + - api_field: inspectConfig.limits.maxFindingsPerInfoType.maxFindings + - api_field: inspectConfig.limits.maxFindingsPerItem + - api_field: inspectConfig.limits.maxFindingsPerRequest + - api_field: inspectConfig.minLikelihood + - api_field: inspectConfig.ruleSet.infoTypes.name + - api_field: inspectConfig.ruleSet.infoTypes.sensitivityScore.score + - api_field: inspectConfig.ruleSet.infoTypes.version + - api_field: inspectConfig.ruleSet.rules.exclusionRule.dictionary.cloudStoragePath.path + - api_field: inspectConfig.ruleSet.rules.exclusionRule.dictionary.wordList.words + - api_field: inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.groupIndexes + - api_field: inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.pattern + - api_field: inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowAfter + - api_field: inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowBefore + - api_field: inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.name + - api_field: inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.sensitivityScore.score + - api_field: inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.version + - api_field: inspectConfig.ruleSet.rules.exclusionRule.matchingType + - api_field: inspectConfig.ruleSet.rules.exclusionRule.regex.groupIndexes + - api_field: inspectConfig.ruleSet.rules.exclusionRule.regex.pattern + - api_field: inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.groupIndexes + - api_field: inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.pattern + - api_field: inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.fixedLikelihood + - api_field: inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.relativeLikelihood + - api_field: inspectConfig.ruleSet.rules.hotwordRule.proximity.windowAfter + - api_field: inspectConfig.ruleSet.rules.hotwordRule.proximity.windowBefore + - api_field: name + - field: parent + provider_only: true + - field: template_id + provider_only: true diff --git a/google/services/datalossprevention/resource_data_loss_prevention_job_trigger_generated_meta.yaml b/google/services/datalossprevention/resource_data_loss_prevention_job_trigger_generated_meta.yaml index 7330ff62c1d..cd9db4a0f26 100644 --- a/google/services/datalossprevention/resource_data_loss_prevention_job_trigger_generated_meta.yaml +++ b/google/services/datalossprevention/resource_data_loss_prevention_job_trigger_generated_meta.yaml @@ -1,115 +1,115 @@ -resource: 'google_data_loss_prevention_job_trigger' -generation_type: 'mmv1' -source_file: 'products/dlp/JobTrigger.yaml' -api_service_name: 'dlp.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'JobTrigger' +resource: google_data_loss_prevention_job_trigger +generation_type: mmv1 +source_file: products/dlp/JobTrigger.yaml +api_service_name: dlp.googleapis.com +api_version: v2 +api_resource_type_kind: JobTrigger fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'inspectJob.actions.deidentify.cloudStorageOutput' - - api_field: 'inspectJob.actions.deidentify.fileTypesToTransform' - - api_field: 'inspectJob.actions.deidentify.transformationConfig.deidentifyTemplate' - - api_field: 'inspectJob.actions.deidentify.transformationConfig.imageRedactTemplate' - - api_field: 'inspectJob.actions.deidentify.transformationConfig.structuredDeidentifyTemplate' - - api_field: 'inspectJob.actions.deidentify.transformationDetailsStorageConfig.table.datasetId' - - api_field: 'inspectJob.actions.deidentify.transformationDetailsStorageConfig.table.projectId' - - api_field: 'inspectJob.actions.deidentify.transformationDetailsStorageConfig.table.tableId' - - api_field: 'inspectJob.actions.jobNotificationEmails' - - api_field: 'inspectJob.actions.pubSub.topic' - - api_field: 'inspectJob.actions.publishFindingsToCloudDataCatalog' - - api_field: 'inspectJob.actions.publishFindingsToDataplexCatalog' - - api_field: 'inspectJob.actions.publishSummaryToCscc' - - api_field: 'inspectJob.actions.publishToStackdriver' - - api_field: 'inspectJob.actions.saveFindings.outputConfig.outputSchema' - - api_field: 'inspectJob.actions.saveFindings.outputConfig.storagePath.path' - - api_field: 'inspectJob.actions.saveFindings.outputConfig.table.datasetId' - - api_field: 'inspectJob.actions.saveFindings.outputConfig.table.projectId' - - api_field: 'inspectJob.actions.saveFindings.outputConfig.table.tableId' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.dictionary.cloudStoragePath.path' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.dictionary.wordList.words' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.exclusionType' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.infoType.name' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.infoType.sensitivityScore.score' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.infoType.version' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.likelihood' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.regex.groupIndexes' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.regex.pattern' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.sensitivityScore.score' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.storedType.createTime' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.storedType.name' - - api_field: 'inspectJob.inspectConfig.customInfoTypes.surrogateType' - - api_field: 'inspectJob.inspectConfig.excludeInfoTypes' - - api_field: 'inspectJob.inspectConfig.includeQuote' - - api_field: 'inspectJob.inspectConfig.infoTypes.name' - - api_field: 'inspectJob.inspectConfig.infoTypes.sensitivityScore.score' - - api_field: 'inspectJob.inspectConfig.infoTypes.version' - - api_field: 'inspectJob.inspectConfig.limits.maxFindingsPerInfoType.infoType.name' - - api_field: 'inspectJob.inspectConfig.limits.maxFindingsPerInfoType.infoType.sensitivityScore.score' - - api_field: 'inspectJob.inspectConfig.limits.maxFindingsPerInfoType.infoType.version' - - api_field: 'inspectJob.inspectConfig.limits.maxFindingsPerInfoType.maxFindings' - - api_field: 'inspectJob.inspectConfig.limits.maxFindingsPerItem' - - api_field: 'inspectJob.inspectConfig.limits.maxFindingsPerRequest' - - api_field: 'inspectJob.inspectConfig.minLikelihood' - - api_field: 'inspectJob.inspectConfig.ruleSet.infoTypes.name' - - api_field: 'inspectJob.inspectConfig.ruleSet.infoTypes.sensitivityScore.score' - - api_field: 'inspectJob.inspectConfig.ruleSet.infoTypes.version' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.dictionary.cloudStoragePath.path' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.dictionary.wordList.words' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.groupIndexes' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.pattern' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowAfter' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowBefore' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.name' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.sensitivityScore.score' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.version' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.matchingType' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.regex.groupIndexes' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.exclusionRule.regex.pattern' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.groupIndexes' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.pattern' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.fixedLikelihood' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.relativeLikelihood' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.hotwordRule.proximity.windowAfter' - - api_field: 'inspectJob.inspectConfig.ruleSet.rules.hotwordRule.proximity.windowBefore' - - api_field: 'inspectJob.inspectTemplateName' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.excludedFields.name' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.identifyingFields.name' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.includedFields.name' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.rowsLimit' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.rowsLimitPercent' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.sampleMethod' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.tableReference.datasetId' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.tableReference.projectId' - - api_field: 'inspectJob.storageConfig.bigQueryOptions.tableReference.tableId' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.bytesLimitPerFile' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.bytesLimitPerFilePercent' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.fileSet.regexFileSet.bucketName' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.fileSet.regexFileSet.excludeRegex' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.fileSet.regexFileSet.includeRegex' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.fileSet.url' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.fileTypes' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.filesLimitPercent' - - api_field: 'inspectJob.storageConfig.cloudStorageOptions.sampleMethod' - - api_field: 'inspectJob.storageConfig.datastoreOptions.kind.name' - - api_field: 'inspectJob.storageConfig.datastoreOptions.partitionId.namespaceId' - - api_field: 'inspectJob.storageConfig.datastoreOptions.partitionId.projectId' - - api_field: 'inspectJob.storageConfig.hybridOptions.description' - - api_field: 'inspectJob.storageConfig.hybridOptions.labels' - - api_field: 'inspectJob.storageConfig.hybridOptions.requiredFindingLabelKeys' - - api_field: 'inspectJob.storageConfig.hybridOptions.tableOptions.identifyingFields.name' - - api_field: 'inspectJob.storageConfig.timespanConfig.enableAutoPopulationOfTimespanConfig' - - api_field: 'inspectJob.storageConfig.timespanConfig.endTime' - - api_field: 'inspectJob.storageConfig.timespanConfig.startTime' - - api_field: 'inspectJob.storageConfig.timespanConfig.timestampField.name' - - api_field: 'lastRunTime' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'status' - - field: 'trigger_id' - provider_only: true - - api_field: 'triggers.manual' - - api_field: 'triggers.schedule.recurrencePeriodDuration' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: inspectJob.actions.deidentify.cloudStorageOutput + - api_field: inspectJob.actions.deidentify.fileTypesToTransform + - api_field: inspectJob.actions.deidentify.transformationConfig.deidentifyTemplate + - api_field: inspectJob.actions.deidentify.transformationConfig.imageRedactTemplate + - api_field: inspectJob.actions.deidentify.transformationConfig.structuredDeidentifyTemplate + - api_field: inspectJob.actions.deidentify.transformationDetailsStorageConfig.table.datasetId + - api_field: inspectJob.actions.deidentify.transformationDetailsStorageConfig.table.projectId + - api_field: inspectJob.actions.deidentify.transformationDetailsStorageConfig.table.tableId + - api_field: inspectJob.actions.jobNotificationEmails + - api_field: inspectJob.actions.pubSub.topic + - api_field: inspectJob.actions.publishFindingsToCloudDataCatalog + - api_field: inspectJob.actions.publishFindingsToDataplexCatalog + - api_field: inspectJob.actions.publishSummaryToCscc + - api_field: inspectJob.actions.publishToStackdriver + - api_field: inspectJob.actions.saveFindings.outputConfig.outputSchema + - api_field: inspectJob.actions.saveFindings.outputConfig.storagePath.path + - api_field: inspectJob.actions.saveFindings.outputConfig.table.datasetId + - api_field: inspectJob.actions.saveFindings.outputConfig.table.projectId + - api_field: inspectJob.actions.saveFindings.outputConfig.table.tableId + - api_field: inspectJob.inspectConfig.customInfoTypes.dictionary.cloudStoragePath.path + - api_field: inspectJob.inspectConfig.customInfoTypes.dictionary.wordList.words + - api_field: inspectJob.inspectConfig.customInfoTypes.exclusionType + - api_field: inspectJob.inspectConfig.customInfoTypes.infoType.name + - api_field: inspectJob.inspectConfig.customInfoTypes.infoType.sensitivityScore.score + - api_field: inspectJob.inspectConfig.customInfoTypes.infoType.version + - api_field: inspectJob.inspectConfig.customInfoTypes.likelihood + - api_field: inspectJob.inspectConfig.customInfoTypes.regex.groupIndexes + - api_field: inspectJob.inspectConfig.customInfoTypes.regex.pattern + - api_field: inspectJob.inspectConfig.customInfoTypes.sensitivityScore.score + - api_field: inspectJob.inspectConfig.customInfoTypes.storedType.createTime + - api_field: inspectJob.inspectConfig.customInfoTypes.storedType.name + - api_field: inspectJob.inspectConfig.customInfoTypes.surrogateType + - api_field: inspectJob.inspectConfig.excludeInfoTypes + - api_field: inspectJob.inspectConfig.includeQuote + - api_field: inspectJob.inspectConfig.infoTypes.name + - api_field: inspectJob.inspectConfig.infoTypes.sensitivityScore.score + - api_field: inspectJob.inspectConfig.infoTypes.version + - api_field: inspectJob.inspectConfig.limits.maxFindingsPerInfoType.infoType.name + - api_field: inspectJob.inspectConfig.limits.maxFindingsPerInfoType.infoType.sensitivityScore.score + - api_field: inspectJob.inspectConfig.limits.maxFindingsPerInfoType.infoType.version + - api_field: inspectJob.inspectConfig.limits.maxFindingsPerInfoType.maxFindings + - api_field: inspectJob.inspectConfig.limits.maxFindingsPerItem + - api_field: inspectJob.inspectConfig.limits.maxFindingsPerRequest + - api_field: inspectJob.inspectConfig.minLikelihood + - api_field: inspectJob.inspectConfig.ruleSet.infoTypes.name + - api_field: inspectJob.inspectConfig.ruleSet.infoTypes.sensitivityScore.score + - api_field: inspectJob.inspectConfig.ruleSet.infoTypes.version + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.dictionary.cloudStoragePath.path + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.dictionary.wordList.words + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.groupIndexes + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.hotwordRegex.pattern + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowAfter + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeByHotword.proximity.windowBefore + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.name + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.sensitivityScore.score + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.excludeInfoTypes.infoTypes.version + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.matchingType + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.regex.groupIndexes + - api_field: inspectJob.inspectConfig.ruleSet.rules.exclusionRule.regex.pattern + - api_field: inspectJob.inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.groupIndexes + - api_field: inspectJob.inspectConfig.ruleSet.rules.hotwordRule.hotwordRegex.pattern + - api_field: inspectJob.inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.fixedLikelihood + - api_field: inspectJob.inspectConfig.ruleSet.rules.hotwordRule.likelihoodAdjustment.relativeLikelihood + - api_field: inspectJob.inspectConfig.ruleSet.rules.hotwordRule.proximity.windowAfter + - api_field: inspectJob.inspectConfig.ruleSet.rules.hotwordRule.proximity.windowBefore + - api_field: inspectJob.inspectTemplateName + - api_field: inspectJob.storageConfig.bigQueryOptions.excludedFields.name + - api_field: inspectJob.storageConfig.bigQueryOptions.identifyingFields.name + - api_field: inspectJob.storageConfig.bigQueryOptions.includedFields.name + - api_field: inspectJob.storageConfig.bigQueryOptions.rowsLimit + - api_field: inspectJob.storageConfig.bigQueryOptions.rowsLimitPercent + - api_field: inspectJob.storageConfig.bigQueryOptions.sampleMethod + - api_field: inspectJob.storageConfig.bigQueryOptions.tableReference.datasetId + - api_field: inspectJob.storageConfig.bigQueryOptions.tableReference.projectId + - api_field: inspectJob.storageConfig.bigQueryOptions.tableReference.tableId + - api_field: inspectJob.storageConfig.cloudStorageOptions.bytesLimitPerFile + - api_field: inspectJob.storageConfig.cloudStorageOptions.bytesLimitPerFilePercent + - api_field: inspectJob.storageConfig.cloudStorageOptions.fileSet.regexFileSet.bucketName + - api_field: inspectJob.storageConfig.cloudStorageOptions.fileSet.regexFileSet.excludeRegex + - api_field: inspectJob.storageConfig.cloudStorageOptions.fileSet.regexFileSet.includeRegex + - api_field: inspectJob.storageConfig.cloudStorageOptions.fileSet.url + - api_field: inspectJob.storageConfig.cloudStorageOptions.fileTypes + - api_field: inspectJob.storageConfig.cloudStorageOptions.filesLimitPercent + - api_field: inspectJob.storageConfig.cloudStorageOptions.sampleMethod + - api_field: inspectJob.storageConfig.datastoreOptions.kind.name + - api_field: inspectJob.storageConfig.datastoreOptions.partitionId.namespaceId + - api_field: inspectJob.storageConfig.datastoreOptions.partitionId.projectId + - api_field: inspectJob.storageConfig.hybridOptions.description + - api_field: inspectJob.storageConfig.hybridOptions.labels + - api_field: inspectJob.storageConfig.hybridOptions.requiredFindingLabelKeys + - api_field: inspectJob.storageConfig.hybridOptions.tableOptions.identifyingFields.name + - api_field: inspectJob.storageConfig.timespanConfig.enableAutoPopulationOfTimespanConfig + - api_field: inspectJob.storageConfig.timespanConfig.endTime + - api_field: inspectJob.storageConfig.timespanConfig.startTime + - api_field: inspectJob.storageConfig.timespanConfig.timestampField.name + - api_field: lastRunTime + - api_field: name + - field: parent + provider_only: true + - api_field: status + - field: trigger_id + provider_only: true + - api_field: triggers.manual + - api_field: triggers.schedule.recurrencePeriodDuration + - api_field: updateTime diff --git a/google/services/datalossprevention/resource_data_loss_prevention_stored_info_type_generated_meta.yaml b/google/services/datalossprevention/resource_data_loss_prevention_stored_info_type_generated_meta.yaml index cebe0d66acc..6300d40ee0e 100644 --- a/google/services/datalossprevention/resource_data_loss_prevention_stored_info_type_generated_meta.yaml +++ b/google/services/datalossprevention/resource_data_loss_prevention_stored_info_type_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_data_loss_prevention_stored_info_type' -generation_type: 'mmv1' -source_file: 'products/dlp/StoredInfoType.yaml' -api_service_name: 'dlp.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'StoredInfoType' +resource: google_data_loss_prevention_stored_info_type +generation_type: mmv1 +source_file: products/dlp/StoredInfoType.yaml +api_service_name: dlp.googleapis.com +api_version: v2 +api_resource_type_kind: StoredInfoType fields: - - api_field: 'description' - - api_field: 'dictionary.cloudStoragePath.path' - - api_field: 'dictionary.wordList.words' - - api_field: 'displayName' - - api_field: 'largeCustomDictionary.bigQueryField.field.name' - - api_field: 'largeCustomDictionary.bigQueryField.table.datasetId' - - api_field: 'largeCustomDictionary.bigQueryField.table.projectId' - - api_field: 'largeCustomDictionary.bigQueryField.table.tableId' - - api_field: 'largeCustomDictionary.cloudStorageFileSet.url' - - api_field: 'largeCustomDictionary.outputPath.path' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'regex.groupIndexes' - - api_field: 'regex.pattern' - - field: 'stored_info_type_id' - provider_only: true + - api_field: description + - api_field: dictionary.cloudStoragePath.path + - api_field: dictionary.wordList.words + - api_field: displayName + - api_field: largeCustomDictionary.bigQueryField.field.name + - api_field: largeCustomDictionary.bigQueryField.table.datasetId + - api_field: largeCustomDictionary.bigQueryField.table.projectId + - api_field: largeCustomDictionary.bigQueryField.table.tableId + - api_field: largeCustomDictionary.cloudStorageFileSet.url + - api_field: largeCustomDictionary.outputPath.path + - api_field: name + - field: parent + provider_only: true + - api_field: regex.groupIndexes + - api_field: regex.pattern + - field: stored_info_type_id + provider_only: true diff --git a/google/services/datapipeline/resource_data_pipeline_pipeline_generated_meta.yaml b/google/services/datapipeline/resource_data_pipeline_pipeline_generated_meta.yaml index 5e04d6d7108..e04247e04fa 100644 --- a/google/services/datapipeline/resource_data_pipeline_pipeline_generated_meta.yaml +++ b/google/services/datapipeline/resource_data_pipeline_pipeline_generated_meta.yaml @@ -1,70 +1,70 @@ -resource: 'google_data_pipeline_pipeline' -generation_type: 'mmv1' -source_file: 'products/datapipeline/Pipeline.yaml' -api_service_name: 'datapipelines.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Pipeline' +resource: google_data_pipeline_pipeline +generation_type: mmv1 +source_file: products/datapipeline/Pipeline.yaml +api_service_name: datapipelines.googleapis.com +api_version: v1 +api_resource_type_kind: Pipeline fields: - - api_field: 'createTime' - - api_field: 'displayName' - - api_field: 'jobCount' - - api_field: 'lastUpdateTime' - - api_field: 'name' - - api_field: 'pipelineSources' - - field: 'region' - provider_only: true - - api_field: 'scheduleInfo.nextJobTime' - - api_field: 'scheduleInfo.schedule' - - api_field: 'scheduleInfo.timeZone' - - api_field: 'schedulerServiceAccountEmail' - - api_field: 'state' - - api_field: 'type' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.containerSpecGcsPath' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.additionalExperiments' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.additionalUserLabels' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.enableStreamingEngine' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.flexrsGoal' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.ipConfiguration' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.kmsKeyName' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.machineType' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.maxWorkers' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.network' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.numWorkers' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.serviceAccountEmail' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.subnetwork' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.tempLocation' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.workerRegion' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.workerZone' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.environment.zone' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.jobName' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.launchOptions' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.parameters' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.transformNameMappings' - - api_field: 'workload.dataflowFlexTemplateRequest.launchParameter.update' - - api_field: 'workload.dataflowFlexTemplateRequest.location' - - api_field: 'workload.dataflowFlexTemplateRequest.projectId' - - api_field: 'workload.dataflowFlexTemplateRequest.validateOnly' - - api_field: 'workload.dataflowLaunchTemplateRequest.gcsPath' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.additionalExperiments' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.additionalUserLabels' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.bypassTempDirValidation' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.enableStreamingEngine' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.ipConfiguration' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.kmsKeyName' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.machineType' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.maxWorkers' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.network' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.numWorkers' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.serviceAccountEmail' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.subnetwork' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.tempLocation' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.workerRegion' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.workerZone' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.environment.zone' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.jobName' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.parameters' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.transformNameMapping' - - api_field: 'workload.dataflowLaunchTemplateRequest.launchParameters.update' - - api_field: 'workload.dataflowLaunchTemplateRequest.location' - - api_field: 'workload.dataflowLaunchTemplateRequest.projectId' - - api_field: 'workload.dataflowLaunchTemplateRequest.validateOnly' + - api_field: createTime + - api_field: displayName + - api_field: jobCount + - api_field: lastUpdateTime + - api_field: name + - api_field: pipelineSources + - field: region + provider_only: true + - api_field: scheduleInfo.nextJobTime + - api_field: scheduleInfo.schedule + - api_field: scheduleInfo.timeZone + - api_field: schedulerServiceAccountEmail + - api_field: state + - api_field: type + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.containerSpecGcsPath + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.additionalExperiments + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.additionalUserLabels + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.enableStreamingEngine + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.flexrsGoal + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.ipConfiguration + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.kmsKeyName + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.machineType + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.maxWorkers + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.network + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.numWorkers + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.serviceAccountEmail + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.subnetwork + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.tempLocation + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.workerRegion + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.workerZone + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.environment.zone + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.jobName + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.launchOptions + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.parameters + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.transformNameMappings + - api_field: workload.dataflowFlexTemplateRequest.launchParameter.update + - api_field: workload.dataflowFlexTemplateRequest.location + - api_field: workload.dataflowFlexTemplateRequest.projectId + - api_field: workload.dataflowFlexTemplateRequest.validateOnly + - api_field: workload.dataflowLaunchTemplateRequest.gcsPath + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.additionalExperiments + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.additionalUserLabels + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.bypassTempDirValidation + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.enableStreamingEngine + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.ipConfiguration + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.kmsKeyName + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.machineType + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.maxWorkers + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.network + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.numWorkers + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.serviceAccountEmail + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.subnetwork + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.tempLocation + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.workerRegion + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.workerZone + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.environment.zone + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.jobName + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.parameters + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.transformNameMapping + - api_field: workload.dataflowLaunchTemplateRequest.launchParameters.update + - api_field: workload.dataflowLaunchTemplateRequest.location + - api_field: workload.dataflowLaunchTemplateRequest.projectId + - api_field: workload.dataflowLaunchTemplateRequest.validateOnly diff --git a/google/services/dataplex/iam_dataplex_aspect_type_generated_test.go b/google/services/dataplex/iam_dataplex_aspect_type_generated_test.go index 621ce822935..b46dd7106ec 100644 --- a/google/services/dataplex/iam_dataplex_aspect_type_generated_test.go +++ b/google/services/dataplex/iam_dataplex_aspect_type_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -353,3 +354,57 @@ resource "google_dataplex_aspect_type_iam_binding" "foo" { } `, context) } + +func generateDataplexAspectTypeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + aspect_type_id := tpgresource.GetResourceNameFromSelfLink(rawState["aspect_type_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/aspectTypes/%s", project, location, aspect_type_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexAspectTypeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + aspect_type_id := tpgresource.GetResourceNameFromSelfLink(rawState["aspect_type_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/aspectTypes/%s", project, location, aspect_type_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexAspectTypeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + aspect_type_id := tpgresource.GetResourceNameFromSelfLink(rawState["aspect_type_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/aspectTypes/%s", project, location, aspect_type_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_asset_generated_test.go b/google/services/dataplex/iam_dataplex_asset_generated_test.go index 0c5a1610aec..e4896af63ab 100644 --- a/google/services/dataplex/iam_dataplex_asset_generated_test.go +++ b/google/services/dataplex/iam_dataplex_asset_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDataplexAssetIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_asset_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"]), fmt.Sprintf("tf-test-asset%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexAssetIAMBindingStateID("google_dataplex_asset_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDataplexAssetIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_asset_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"]), fmt.Sprintf("tf-test-asset%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexAssetIAMBindingStateID("google_dataplex_asset_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDataplexAssetIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_asset_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"]), fmt.Sprintf("tf-test-asset%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexAssetIAMMemberStateID("google_dataplex_asset_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDataplexAssetIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_asset_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"]), fmt.Sprintf("tf-test-asset%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexAssetIAMPolicyStateID("google_dataplex_asset_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDataplexAssetIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_asset_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"]), fmt.Sprintf("tf-test-asset%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexAssetIAMPolicyStateID("google_dataplex_asset_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -530,3 +531,63 @@ resource "google_dataplex_asset_iam_binding" "foo" { } `, context) } + +func generateDataplexAssetIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + dataplex_zone := tpgresource.GetResourceNameFromSelfLink(rawState["dataplex_zone"]) + asset := tpgresource.GetResourceNameFromSelfLink(rawState["asset"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s", project, location, lake, dataplex_zone, asset), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexAssetIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + dataplex_zone := tpgresource.GetResourceNameFromSelfLink(rawState["dataplex_zone"]) + asset := tpgresource.GetResourceNameFromSelfLink(rawState["asset"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s", project, location, lake, dataplex_zone, asset), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexAssetIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + dataplex_zone := tpgresource.GetResourceNameFromSelfLink(rawState["dataplex_zone"]) + asset := tpgresource.GetResourceNameFromSelfLink(rawState["asset"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s/assets/%s", project, location, lake, dataplex_zone, asset), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_datascan_generated_test.go b/google/services/dataplex/iam_dataplex_datascan_generated_test.go index a3a735a5a13..17cf44039e4 100644 --- a/google/services/dataplex/iam_dataplex_datascan_generated_test.go +++ b/google/services/dataplex/iam_dataplex_datascan_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDataplexDatascanIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_datascan_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataScans/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-dataprofile-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexDatascanIAMBindingStateID("google_dataplex_datascan_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDataplexDatascanIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_datascan_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataScans/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-dataprofile-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexDatascanIAMBindingStateID("google_dataplex_datascan_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDataplexDatascanIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_datascan_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataScans/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-dataprofile-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexDatascanIAMMemberStateID("google_dataplex_datascan_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDataplexDatascanIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_datascan_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataScans/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-dataprofile-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexDatascanIAMPolicyStateID("google_dataplex_datascan_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDataplexDatascanIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_datascan_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/dataScans/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-dataprofile-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexDatascanIAMPolicyStateID("google_dataplex_datascan_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -308,3 +309,57 @@ resource "google_dataplex_datascan_iam_binding" "foo" { } `, context) } + +func generateDataplexDatascanIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_scan_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_scan_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataScans/%s", project, location, data_scan_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexDatascanIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_scan_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_scan_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataScans/%s", project, location, data_scan_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexDatascanIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + data_scan_id := tpgresource.GetResourceNameFromSelfLink(rawState["data_scan_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/dataScans/%s", project, location, data_scan_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_entry_group_generated_test.go b/google/services/dataplex/iam_dataplex_entry_group_generated_test.go index 91715928793..3f78e0d4e26 100644 --- a/google/services/dataplex/iam_dataplex_entry_group_generated_test.go +++ b/google/services/dataplex/iam_dataplex_entry_group_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -213,3 +214,57 @@ resource "google_dataplex_entry_group_iam_binding" "foo" { } `, context) } + +func generateDataplexEntryGroupIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + entry_group_id := tpgresource.GetResourceNameFromSelfLink(rawState["entry_group_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", project, location, entry_group_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexEntryGroupIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + entry_group_id := tpgresource.GetResourceNameFromSelfLink(rawState["entry_group_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", project, location, entry_group_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexEntryGroupIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + entry_group_id := tpgresource.GetResourceNameFromSelfLink(rawState["entry_group_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryGroups/%s", project, location, entry_group_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_entry_type_generated_test.go b/google/services/dataplex/iam_dataplex_entry_type_generated_test.go index 8414620e499..2fff846f318 100644 --- a/google/services/dataplex/iam_dataplex_entry_type_generated_test.go +++ b/google/services/dataplex/iam_dataplex_entry_type_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -213,3 +214,57 @@ resource "google_dataplex_entry_type_iam_binding" "foo" { } `, context) } + +func generateDataplexEntryTypeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + entry_type_id := tpgresource.GetResourceNameFromSelfLink(rawState["entry_type_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryTypes/%s", project, location, entry_type_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexEntryTypeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + entry_type_id := tpgresource.GetResourceNameFromSelfLink(rawState["entry_type_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryTypes/%s", project, location, entry_type_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexEntryTypeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + entry_type_id := tpgresource.GetResourceNameFromSelfLink(rawState["entry_type_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/entryTypes/%s", project, location, entry_type_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_glossary_generated_test.go b/google/services/dataplex/iam_dataplex_glossary_generated_test.go index 36ee57db4ac..ec90662a154 100644 --- a/google/services/dataplex/iam_dataplex_glossary_generated_test.go +++ b/google/services/dataplex/iam_dataplex_glossary_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccDataplexGlossaryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_glossary_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/glossaries/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-glossary-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexGlossaryIAMBindingStateID("google_dataplex_glossary_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccDataplexGlossaryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_glossary_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/glossaries/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-glossary-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexGlossaryIAMBindingStateID("google_dataplex_glossary_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccDataplexGlossaryIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_glossary_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/glossaries/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-glossary-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexGlossaryIAMMemberStateID("google_dataplex_glossary_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccDataplexGlossaryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_glossary_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/glossaries/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-glossary-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexGlossaryIAMPolicyStateID("google_dataplex_glossary_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccDataplexGlossaryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_glossary_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/glossaries/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-glossary-basic%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexGlossaryIAMPolicyStateID("google_dataplex_glossary_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -235,3 +236,57 @@ resource "google_dataplex_glossary_iam_binding" "foo" { } `, context) } + +func generateDataplexGlossaryIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + glossary_id := tpgresource.GetResourceNameFromSelfLink(rawState["glossary_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/glossaries/%s", project, location, glossary_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexGlossaryIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + glossary_id := tpgresource.GetResourceNameFromSelfLink(rawState["glossary_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/glossaries/%s", project, location, glossary_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexGlossaryIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + glossary_id := tpgresource.GetResourceNameFromSelfLink(rawState["glossary_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/glossaries/%s", project, location, glossary_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_lake_generated_test.go b/google/services/dataplex/iam_dataplex_lake_generated_test.go index 6bfcea28100..a47c8e040b5 100644 --- a/google/services/dataplex/iam_dataplex_lake_generated_test.go +++ b/google/services/dataplex/iam_dataplex_lake_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDataplexLakeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_lake_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexLakeIAMBindingStateID("google_dataplex_lake_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDataplexLakeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_lake_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexLakeIAMBindingStateID("google_dataplex_lake_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDataplexLakeIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_lake_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexLakeIAMMemberStateID("google_dataplex_lake_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDataplexLakeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_lake_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexLakeIAMPolicyStateID("google_dataplex_lake_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDataplexLakeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_lake_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexLakeIAMPolicyStateID("google_dataplex_lake_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -278,3 +279,57 @@ resource "google_dataplex_lake_iam_binding" "foo" { } `, context) } + +func generateDataplexLakeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s", project, location, lake), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexLakeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s", project, location, lake), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexLakeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s", project, location, lake), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_task_generated_test.go b/google/services/dataplex/iam_dataplex_task_generated_test.go index ebc674ededc..0f97059d669 100644 --- a/google/services/dataplex/iam_dataplex_task_generated_test.go +++ b/google/services/dataplex/iam_dataplex_task_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDataplexTaskIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_task_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-task%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexTaskIAMBindingStateID("google_dataplex_task_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDataplexTaskIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_task_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-task%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexTaskIAMBindingStateID("google_dataplex_task_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDataplexTaskIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_task_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-task%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexTaskIAMMemberStateID("google_dataplex_task_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDataplexTaskIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_task_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-task%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexTaskIAMPolicyStateID("google_dataplex_task_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDataplexTaskIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_task_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-task%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexTaskIAMPolicyStateID("google_dataplex_task_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -454,3 +455,60 @@ resource "google_dataplex_task_iam_binding" "foo" { } `, context) } + +func generateDataplexTaskIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + task_id := tpgresource.GetResourceNameFromSelfLink(rawState["task_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s", project, location, lake, task_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexTaskIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + task_id := tpgresource.GetResourceNameFromSelfLink(rawState["task_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s", project, location, lake, task_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexTaskIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + task_id := tpgresource.GetResourceNameFromSelfLink(rawState["task_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/tasks/%s", project, location, lake, task_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/iam_dataplex_zone_generated_test.go b/google/services/dataplex/iam_dataplex_zone_generated_test.go index a99fc0e5ee3..65a3ca3b15d 100644 --- a/google/services/dataplex/iam_dataplex_zone_generated_test.go +++ b/google/services/dataplex/iam_dataplex_zone_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDataplexZoneIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_zone_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexZoneIAMBindingStateID("google_dataplex_zone_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDataplexZoneIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_zone_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexZoneIAMBindingStateID("google_dataplex_zone_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDataplexZoneIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_zone_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexZoneIAMMemberStateID("google_dataplex_zone_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDataplexZoneIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_zone_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexZoneIAMPolicyStateID("google_dataplex_zone_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDataplexZoneIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataplex_zone_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-lake%s", context["random_suffix"]), fmt.Sprintf("tf-test-zone%s", context["random_suffix"])), + ImportStateIdFunc: generateDataplexZoneIAMPolicyStateID("google_dataplex_zone_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -389,3 +390,60 @@ resource "google_dataplex_zone_iam_binding" "foo" { } `, context) } + +func generateDataplexZoneIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + dataplex_zone := tpgresource.GetResourceNameFromSelfLink(rawState["dataplex_zone"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s", project, location, lake, dataplex_zone), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexZoneIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + dataplex_zone := tpgresource.GetResourceNameFromSelfLink(rawState["dataplex_zone"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s", project, location, lake, dataplex_zone), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataplexZoneIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + lake := tpgresource.GetResourceNameFromSelfLink(rawState["lake"]) + dataplex_zone := tpgresource.GetResourceNameFromSelfLink(rawState["dataplex_zone"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/lakes/%s/zones/%s", project, location, lake, dataplex_zone), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataplex/resource_dataplex_aspect_type_generated_meta.yaml b/google/services/dataplex/resource_dataplex_aspect_type_generated_meta.yaml index c94acd1ab03..afcb0cba948 100644 --- a/google/services/dataplex/resource_dataplex_aspect_type_generated_meta.yaml +++ b/google/services/dataplex/resource_dataplex_aspect_type_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_dataplex_aspect_type' -generation_type: 'mmv1' -source_file: 'products/dataplex/AspectType.yaml' -api_service_name: 'dataplex.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AspectType' +resource: google_dataplex_aspect_type +generation_type: mmv1 +source_file: products/dataplex/AspectType.yaml +api_service_name: dataplex.googleapis.com +api_version: v1 +api_resource_type_kind: AspectType fields: - - field: 'aspect_type_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataClassification' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'metadataTemplate' - json: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'transferStatus' - - api_field: 'uid' - - api_field: 'updateTime' + - field: aspect_type_id + provider_only: true + - api_field: createTime + - api_field: dataClassification + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: metadataTemplate + json: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: transferStatus + - api_field: uid + - api_field: updateTime diff --git a/google/services/dataplex/resource_dataplex_datascan.go b/google/services/dataplex/resource_dataplex_datascan.go index e33d4e621c5..a8ca012187a 100644 --- a/google/services/dataplex/resource_dataplex_datascan.go +++ b/google/services/dataplex/resource_dataplex_datascan.go @@ -182,7 +182,24 @@ Cloud Storage bucket (//storage.googleapis.com/projects/PROJECT_ID/buckets/BUCKE Elem: &schema.Resource{ Schema: map[string]*schema.Schema{}, }, - ExactlyOneOf: []string{"execution_spec.0.trigger.0.on_demand", "execution_spec.0.trigger.0.schedule"}, + ExactlyOneOf: []string{"execution_spec.0.trigger.0.on_demand", "execution_spec.0.trigger.0.one_time", "execution_spec.0.trigger.0.schedule"}, + }, + "one_time": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Description: `The scan runs once upon DataScan creation.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ttl_after_scan_completion": { + Type: schema.TypeString, + Optional: true, + Description: `Time to live for the DataScan and its results after the one-time run completes. Accepts a string with a unit suffix 's' (e.g., '7200s'). Default is 24 hours. Ranges between 0 and 31536000 seconds (1 year).`, + }, + }, + }, + ExactlyOneOf: []string{"execution_spec.0.trigger.0.on_demand", "execution_spec.0.trigger.0.one_time", "execution_spec.0.trigger.0.schedule"}, }, "schedule": { Type: schema.TypeList, @@ -198,7 +215,7 @@ Cloud Storage bucket (//storage.googleapis.com/projects/PROJECT_ID/buckets/BUCKE }, }, }, - ExactlyOneOf: []string{"execution_spec.0.trigger.0.on_demand", "execution_spec.0.trigger.0.schedule"}, + ExactlyOneOf: []string{"execution_spec.0.trigger.0.on_demand", "execution_spec.0.trigger.0.one_time", "execution_spec.0.trigger.0.schedule"}, }, }, }, @@ -1482,6 +1499,8 @@ func flattenDataplexDatascanExecutionSpecTrigger(v interface{}, d *schema.Resour flattenDataplexDatascanExecutionSpecTriggerOnDemand(original["onDemand"], d, config) transformed["schedule"] = flattenDataplexDatascanExecutionSpecTriggerSchedule(original["schedule"], d, config) + transformed["one_time"] = + flattenDataplexDatascanExecutionSpecTriggerOneTime(original["oneTime"], d, config) return []interface{}{transformed} } func flattenDataplexDatascanExecutionSpecTriggerOnDemand(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -1509,6 +1528,20 @@ func flattenDataplexDatascanExecutionSpecTriggerScheduleCron(v interface{}, d *s return v } +func flattenDataplexDatascanExecutionSpecTriggerOneTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + transformed := make(map[string]interface{}) + transformed["ttl_after_scan_completion"] = + flattenDataplexDatascanExecutionSpecTriggerOneTimeTtlAfterScanCompletion(original["ttlAfterScanCompletion"], d, config) + return []interface{}{transformed} +} +func flattenDataplexDatascanExecutionSpecTriggerOneTimeTtlAfterScanCompletion(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenDataplexDatascanExecutionSpecField(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { return v } @@ -2286,6 +2319,13 @@ func expandDataplexDatascanExecutionSpecTrigger(v interface{}, d tpgresource.Ter transformed["schedule"] = transformedSchedule } + transformedOneTime, err := expandDataplexDatascanExecutionSpecTriggerOneTime(original["one_time"], d, config) + if err != nil { + return nil, err + } else { + transformed["oneTime"] = transformedOneTime + } + return transformed, nil } @@ -2333,6 +2373,37 @@ func expandDataplexDatascanExecutionSpecTriggerScheduleCron(v interface{}, d tpg return v, nil } +func expandDataplexDatascanExecutionSpecTriggerOneTime(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 { + return nil, nil + } + + if l[0] == nil { + transformed := make(map[string]interface{}) + return transformed, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedTtlAfterScanCompletion, err := expandDataplexDatascanExecutionSpecTriggerOneTimeTtlAfterScanCompletion(original["ttl_after_scan_completion"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedTtlAfterScanCompletion); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["ttlAfterScanCompletion"] = transformedTtlAfterScanCompletion + } + + return transformed, nil +} + +func expandDataplexDatascanExecutionSpecTriggerOneTimeTtlAfterScanCompletion(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandDataplexDatascanExecutionSpecField(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/google/services/dataplex/resource_dataplex_datascan_generated_meta.yaml b/google/services/dataplex/resource_dataplex_datascan_generated_meta.yaml index 3f368dc3efb..6a016dc1ad3 100644 --- a/google/services/dataplex/resource_dataplex_datascan_generated_meta.yaml +++ b/google/services/dataplex/resource_dataplex_datascan_generated_meta.yaml @@ -1,82 +1,83 @@ -resource: 'google_dataplex_datascan' -generation_type: 'mmv1' -source_file: 'products/dataplex/Datascan.yaml' -api_service_name: 'dataplex.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataScan' +resource: google_dataplex_datascan +generation_type: mmv1 +source_file: products/dataplex/Datascan.yaml +api_service_name: dataplex.googleapis.com +api_version: v1 +api_resource_type_kind: DataScan fields: - - api_field: 'createTime' - - api_field: 'data.entity' - - api_field: 'data.resource' - - api_field: 'dataDiscoverySpec.bigqueryPublishingConfig.connection' - - api_field: 'dataDiscoverySpec.bigqueryPublishingConfig.location' - - api_field: 'dataDiscoverySpec.bigqueryPublishingConfig.project' - - api_field: 'dataDiscoverySpec.bigqueryPublishingConfig.tableType' - - api_field: 'dataDiscoverySpec.storageConfig.csvOptions.delimiter' - - api_field: 'dataDiscoverySpec.storageConfig.csvOptions.encoding' - - api_field: 'dataDiscoverySpec.storageConfig.csvOptions.headerRows' - - api_field: 'dataDiscoverySpec.storageConfig.csvOptions.quote' - - api_field: 'dataDiscoverySpec.storageConfig.csvOptions.typeInferenceDisabled' - - api_field: 'dataDiscoverySpec.storageConfig.excludePatterns' - - api_field: 'dataDiscoverySpec.storageConfig.includePatterns' - - api_field: 'dataDiscoverySpec.storageConfig.jsonOptions.encoding' - - api_field: 'dataDiscoverySpec.storageConfig.jsonOptions.typeInferenceDisabled' - - api_field: 'dataDocumentationSpec' - - api_field: 'dataProfileSpec.catalogPublishingEnabled' - - api_field: 'dataProfileSpec.excludeFields.fieldNames' - - api_field: 'dataProfileSpec.includeFields.fieldNames' - - api_field: 'dataProfileSpec.postScanActions.bigqueryExport.resultsTable' - - api_field: 'dataProfileSpec.rowFilter' - - api_field: 'dataProfileSpec.samplingPercent' - - api_field: 'dataQualitySpec.catalogPublishingEnabled' - - api_field: 'dataQualitySpec.postScanActions.bigqueryExport.resultsTable' - - api_field: 'dataQualitySpec.postScanActions.notificationReport.jobEndTrigger' - - api_field: 'dataQualitySpec.postScanActions.notificationReport.jobFailureTrigger' - - api_field: 'dataQualitySpec.postScanActions.notificationReport.recipients.emails' - - api_field: 'dataQualitySpec.postScanActions.notificationReport.scoreThresholdTrigger.scoreThreshold' - - api_field: 'dataQualitySpec.rowFilter' - - api_field: 'dataQualitySpec.rules.column' - - api_field: 'dataQualitySpec.rules.description' - - api_field: 'dataQualitySpec.rules.dimension' - - api_field: 'dataQualitySpec.rules.ignoreNull' - - api_field: 'dataQualitySpec.rules.name' - - api_field: 'dataQualitySpec.rules.nonNullExpectation' - - api_field: 'dataQualitySpec.rules.rangeExpectation.maxValue' - - api_field: 'dataQualitySpec.rules.rangeExpectation.minValue' - - api_field: 'dataQualitySpec.rules.rangeExpectation.strictMaxEnabled' - - api_field: 'dataQualitySpec.rules.rangeExpectation.strictMinEnabled' - - api_field: 'dataQualitySpec.rules.regexExpectation.regex' - - api_field: 'dataQualitySpec.rules.rowConditionExpectation.sqlExpression' - - api_field: 'dataQualitySpec.rules.setExpectation.values' - - api_field: 'dataQualitySpec.rules.sqlAssertion.sqlStatement' - - api_field: 'dataQualitySpec.rules.statisticRangeExpectation.maxValue' - - api_field: 'dataQualitySpec.rules.statisticRangeExpectation.minValue' - - api_field: 'dataQualitySpec.rules.statisticRangeExpectation.statistic' - - api_field: 'dataQualitySpec.rules.statisticRangeExpectation.strictMaxEnabled' - - api_field: 'dataQualitySpec.rules.statisticRangeExpectation.strictMinEnabled' - - api_field: 'dataQualitySpec.rules.suspended' - - api_field: 'dataQualitySpec.rules.tableConditionExpectation.sqlExpression' - - api_field: 'dataQualitySpec.rules.threshold' - - api_field: 'dataQualitySpec.rules.uniquenessExpectation' - - api_field: 'dataQualitySpec.samplingPercent' - - field: 'data_scan_id' - provider_only: true - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'executionSpec.field' - - api_field: 'executionSpec.trigger.onDemand' - - api_field: 'executionSpec.trigger.schedule.cron' - - api_field: 'executionStatus.latestJobEndTime' - - api_field: 'executionStatus.latestJobStartTime' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: data.entity + - api_field: data.resource + - api_field: dataDiscoverySpec.bigqueryPublishingConfig.connection + - api_field: dataDiscoverySpec.bigqueryPublishingConfig.location + - api_field: dataDiscoverySpec.bigqueryPublishingConfig.project + - api_field: dataDiscoverySpec.bigqueryPublishingConfig.tableType + - api_field: dataDiscoverySpec.storageConfig.csvOptions.delimiter + - api_field: dataDiscoverySpec.storageConfig.csvOptions.encoding + - api_field: dataDiscoverySpec.storageConfig.csvOptions.headerRows + - api_field: dataDiscoverySpec.storageConfig.csvOptions.quote + - api_field: dataDiscoverySpec.storageConfig.csvOptions.typeInferenceDisabled + - api_field: dataDiscoverySpec.storageConfig.excludePatterns + - api_field: dataDiscoverySpec.storageConfig.includePatterns + - api_field: dataDiscoverySpec.storageConfig.jsonOptions.encoding + - api_field: dataDiscoverySpec.storageConfig.jsonOptions.typeInferenceDisabled + - api_field: dataDocumentationSpec + - api_field: dataProfileSpec.catalogPublishingEnabled + - api_field: dataProfileSpec.excludeFields.fieldNames + - api_field: dataProfileSpec.includeFields.fieldNames + - api_field: dataProfileSpec.postScanActions.bigqueryExport.resultsTable + - api_field: dataProfileSpec.rowFilter + - api_field: dataProfileSpec.samplingPercent + - api_field: dataQualitySpec.catalogPublishingEnabled + - api_field: dataQualitySpec.postScanActions.bigqueryExport.resultsTable + - api_field: dataQualitySpec.postScanActions.notificationReport.jobEndTrigger + - api_field: dataQualitySpec.postScanActions.notificationReport.jobFailureTrigger + - api_field: dataQualitySpec.postScanActions.notificationReport.recipients.emails + - api_field: dataQualitySpec.postScanActions.notificationReport.scoreThresholdTrigger.scoreThreshold + - api_field: dataQualitySpec.rowFilter + - api_field: dataQualitySpec.rules.column + - api_field: dataQualitySpec.rules.description + - api_field: dataQualitySpec.rules.dimension + - api_field: dataQualitySpec.rules.ignoreNull + - api_field: dataQualitySpec.rules.name + - api_field: dataQualitySpec.rules.nonNullExpectation + - api_field: dataQualitySpec.rules.rangeExpectation.maxValue + - api_field: dataQualitySpec.rules.rangeExpectation.minValue + - api_field: dataQualitySpec.rules.rangeExpectation.strictMaxEnabled + - api_field: dataQualitySpec.rules.rangeExpectation.strictMinEnabled + - api_field: dataQualitySpec.rules.regexExpectation.regex + - api_field: dataQualitySpec.rules.rowConditionExpectation.sqlExpression + - api_field: dataQualitySpec.rules.setExpectation.values + - api_field: dataQualitySpec.rules.sqlAssertion.sqlStatement + - api_field: dataQualitySpec.rules.statisticRangeExpectation.maxValue + - api_field: dataQualitySpec.rules.statisticRangeExpectation.minValue + - api_field: dataQualitySpec.rules.statisticRangeExpectation.statistic + - api_field: dataQualitySpec.rules.statisticRangeExpectation.strictMaxEnabled + - api_field: dataQualitySpec.rules.statisticRangeExpectation.strictMinEnabled + - api_field: dataQualitySpec.rules.suspended + - api_field: dataQualitySpec.rules.tableConditionExpectation.sqlExpression + - api_field: dataQualitySpec.rules.threshold + - api_field: dataQualitySpec.rules.uniquenessExpectation + - api_field: dataQualitySpec.samplingPercent + - field: data_scan_id + provider_only: true + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: executionSpec.field + - api_field: executionSpec.trigger.onDemand + - api_field: executionSpec.trigger.oneTime.ttlAfterScanCompletion + - api_field: executionSpec.trigger.schedule.cron + - api_field: executionStatus.latestJobEndTime + - api_field: executionStatus.latestJobStartTime + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: uid + - api_field: updateTime diff --git a/google/services/dataplex/resource_dataplex_datascan_generated_test.go b/google/services/dataplex/resource_dataplex_datascan_generated_test.go index 5d2e4fb8210..031fac45e51 100644 --- a/google/services/dataplex/resource_dataplex_datascan_generated_test.go +++ b/google/services/dataplex/resource_dataplex_datascan_generated_test.go @@ -222,6 +222,63 @@ resource "google_dataplex_datascan" "full_profile_test" { `, context) } +func TestAccDataplexDatascan_dataplexDatascanOnetimeProfileExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_name": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckDataplexDatascanDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccDataplexDatascan_dataplexDatascanOnetimeProfileExample(context), + }, + { + ResourceName: "google_dataplex_datascan.onetime_profile", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"data_scan_id", "labels", "location", "terraform_labels"}, + }, + { + ResourceName: "google_dataplex_datascan.onetime_profile", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccDataplexDatascan_dataplexDatascanOnetimeProfileExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_dataplex_datascan" "onetime_profile" { + location = "us-central1" + data_scan_id = "tf-test-dataprofile-onetime%{random_suffix}" + + data { + resource = "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare" + } + + execution_spec { + trigger { + one_time { + ttl_after_scan_completion = "120s" + } + } + } + +data_profile_spec {} + + project = "%{project_name}" +} +`, context) +} + func TestAccDataplexDatascan_dataplexDatascanBasicQualityExample(t *testing.T) { t.Parallel() @@ -791,6 +848,126 @@ resource "google_dataplex_datascan" "documentation" { `, context) } +func TestAccDataplexDatascan_dataplexDatascanOnetimeDocumentationExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "location": envvar.GetTestRegionFromEnv(), + "project_name": envvar.GetTestProjectFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckDataplexDatascanDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccDataplexDatascan_dataplexDatascanOnetimeDocumentationExample(context), + }, + { + ResourceName: "google_dataplex_datascan.onetime_documentation", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"data_scan_id", "labels", "location", "terraform_labels"}, + }, + { + ResourceName: "google_dataplex_datascan.onetime_documentation", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccDataplexDatascan_dataplexDatascanOnetimeDocumentationExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_bigquery_dataset" "tf_dataplex_test_dataset" { + dataset_id = "tf_dataplex_test_dataset_id_%{random_suffix}" + default_table_expiration_ms = 3600000 +} + +resource "google_bigquery_table" "tf_dataplex_test_table" { + dataset_id = google_bigquery_dataset.tf_dataplex_test_dataset.dataset_id + table_id = "tf_dataplex_test_table_id_%{random_suffix}" + deletion_protection = false + schema = < 0 { res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ - Config: config, - Method: "PATCH", - Project: billingProject, - RawURL: url, - UserAgent: userAgent, - Body: obj, - Timeout: d.Timeout(schema.TimeoutUpdate), - Headers: headers, + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + ErrorRetryPredicates: []transport_tpg.RetryErrorPredicateFunc{transport_tpg.IsDataplex1PEntryIngestedError}, }) if err != nil { @@ -948,17 +959,23 @@ func resourceDataplexEntryDelete(d *schema.ResourceData, meta interface{}) error } headers := make(http.Header) + if v, ok := d.GetOkExists("entry_group_id"); ok && strings.HasPrefix(v.(string), "@") { + // Ingestion based resources need to be removed from terraform state but cannot be deleted in Dataplex. + d.SetId("") + return nil + } log.Printf("[DEBUG] Deleting Entry %q", d.Id()) res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ - Config: config, - Method: "DELETE", - Project: billingProject, - RawURL: url, - UserAgent: userAgent, - Body: obj, - Timeout: d.Timeout(schema.TimeoutDelete), - Headers: headers, + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + ErrorRetryPredicates: []transport_tpg.RetryErrorPredicateFunc{transport_tpg.IsDataplex1PEntryIngestedError}, }) if err != nil { return transport_tpg.HandleNotFoundError(err, d, "Entry") diff --git a/google/services/dataplex/resource_dataplex_entry_generated_meta.yaml b/google/services/dataplex/resource_dataplex_entry_generated_meta.yaml index 97262e3113e..4c24b318bcb 100644 --- a/google/services/dataplex/resource_dataplex_entry_generated_meta.yaml +++ b/google/services/dataplex/resource_dataplex_entry_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_dataplex_entry' -generation_type: 'mmv1' -source_file: 'products/dataplex/Entry.yaml' -api_service_name: 'dataplex.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Entry' +resource: google_dataplex_entry +generation_type: mmv1 +source_file: products/dataplex/Entry.yaml +api_service_name: dataplex.googleapis.com +api_version: v1 +api_resource_type_kind: Entry fields: - - api_field: 'aspects.aspect.aspectType' - - api_field: 'aspects.aspect.createTime' - - api_field: 'aspects.aspect.data' - json: true - - api_field: 'aspects.aspect.path' - - api_field: 'aspects.aspect.updateTime' - - api_field: 'aspects.aspectKey' - - api_field: 'createTime' - - field: 'entry_group_id' - provider_only: true - - field: 'entry_id' - provider_only: true - - api_field: 'entrySource.ancestors.name' - - api_field: 'entrySource.ancestors.type' - - api_field: 'entrySource.createTime' - - api_field: 'entrySource.description' - - api_field: 'entrySource.displayName' - - api_field: 'entrySource.labels' - - api_field: 'entrySource.location' - - api_field: 'entrySource.platform' - - api_field: 'entrySource.resource' - - api_field: 'entrySource.system' - - api_field: 'entrySource.updateTime' - - api_field: 'entryType' - - api_field: 'fullyQualifiedName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'parentEntry' - - api_field: 'updateTime' + - api_field: aspects.aspect.aspectType + - api_field: aspects.aspect.createTime + - api_field: aspects.aspect.data + json: true + - api_field: aspects.aspect.path + - api_field: aspects.aspect.updateTime + - api_field: aspects.aspectKey + - api_field: createTime + - field: entry_group_id + provider_only: true + - field: entry_id + provider_only: true + - api_field: entrySource.ancestors.name + - api_field: entrySource.ancestors.type + - api_field: entrySource.createTime + - api_field: entrySource.description + - api_field: entrySource.displayName + - api_field: entrySource.labels + - api_field: entrySource.location + - api_field: entrySource.platform + - api_field: entrySource.resource + - api_field: entrySource.system + - api_field: entrySource.updateTime + - api_field: entryType + - api_field: fullyQualifiedName + - field: location + provider_only: true + - api_field: name + - api_field: parentEntry + - api_field: updateTime diff --git a/google/services/dataplex/resource_dataplex_entry_generated_test.go b/google/services/dataplex/resource_dataplex_entry_generated_test.go index fbd7304c669..13f20cb5330 100644 --- a/google/services/dataplex/resource_dataplex_entry_generated_test.go +++ b/google/services/dataplex/resource_dataplex_entry_generated_test.go @@ -276,6 +276,237 @@ resource "google_dataplex_entry" "test_entry_full" { `, context) } +func TestAccDataplexEntry_dataplexEntryBigqueryTableExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "project_id": envvar.GetTestProjectFromEnv(), + "project_number": envvar.GetTestProjectNumberFromEnv(), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckDataplexEntryDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccDataplexEntry_dataplexEntryBigqueryTableExample(context), + }, + { + ResourceName: "google_dataplex_entry.tf_test_table", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"aspects", "entry_group_id", "entry_id", "location"}, + }, + { + ResourceName: "google_dataplex_entry.tf_test_table", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccDataplexEntry_dataplexEntryBigqueryTableExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_dataplex_aspect_type" "aspect-type-full-one" { + aspect_type_id = "tf-test-aspect-type%{random_suffix}-one" + location = "us-central1" + project = "%{project_number}" + + metadata_template = < 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/autoscalingPolicies/%s", project, location, policy_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocAutoscalingPolicyIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/autoscalingPolicies/%s", project, location, policy_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocAutoscalingPolicyIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + policy_id := tpgresource.GetResourceNameFromSelfLink(rawState["policy_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/autoscalingPolicies/%s", project, location, policy_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataproc/resource_dataproc_autoscaling_policy_generated_meta.yaml b/google/services/dataproc/resource_dataproc_autoscaling_policy_generated_meta.yaml index 62bf607f1f4..5d86be23daf 100644 --- a/google/services/dataproc/resource_dataproc_autoscaling_policy_generated_meta.yaml +++ b/google/services/dataproc/resource_dataproc_autoscaling_policy_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_dataproc_autoscaling_policy' -generation_type: 'mmv1' -source_file: 'products/dataproc/AutoscalingPolicy.yaml' -api_service_name: 'dataproc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AutoscalingPolicy' -cai_asset_name_format: '//dataproc.googleapis.com/projects/{{project}}/regions/{{location}}/autoscalingPolicies/{{policy_id}}' +resource: google_dataproc_autoscaling_policy +generation_type: mmv1 +source_file: products/dataproc/AutoscalingPolicy.yaml +api_service_name: dataproc.googleapis.com +api_version: v1 +api_resource_type_kind: AutoscalingPolicy +cai_asset_name_format: //dataproc.googleapis.com/projects/{{project}}/regions/{{location}}/autoscalingPolicies/{{policy_id}} api_variant_patterns: - - 'projects/{project}/locations/{location}/autoscalingPolicies/{autoscalingPolicy}' + - projects/{project}/locations/{location}/autoscalingPolicies/{autoscalingPolicy} fields: - - api_field: 'basicAlgorithm.cooldownPeriod' - - api_field: 'basicAlgorithm.yarnConfig.gracefulDecommissionTimeout' - - api_field: 'basicAlgorithm.yarnConfig.scaleDownFactor' - - api_field: 'basicAlgorithm.yarnConfig.scaleDownMinWorkerFraction' - - api_field: 'basicAlgorithm.yarnConfig.scaleUpFactor' - - api_field: 'basicAlgorithm.yarnConfig.scaleUpMinWorkerFraction' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'id' - field: 'policy_id' - - api_field: 'secondaryWorkerConfig.maxInstances' - - api_field: 'secondaryWorkerConfig.minInstances' - - api_field: 'secondaryWorkerConfig.weight' - - api_field: 'workerConfig.maxInstances' - - api_field: 'workerConfig.minInstances' - - api_field: 'workerConfig.weight' + - api_field: basicAlgorithm.cooldownPeriod + - api_field: basicAlgorithm.yarnConfig.gracefulDecommissionTimeout + - api_field: basicAlgorithm.yarnConfig.scaleDownFactor + - api_field: basicAlgorithm.yarnConfig.scaleDownMinWorkerFraction + - api_field: basicAlgorithm.yarnConfig.scaleUpFactor + - api_field: basicAlgorithm.yarnConfig.scaleUpMinWorkerFraction + - field: location + provider_only: true + - api_field: name + - api_field: id + field: policy_id + - api_field: secondaryWorkerConfig.maxInstances + - api_field: secondaryWorkerConfig.minInstances + - api_field: secondaryWorkerConfig.weight + - api_field: workerConfig.maxInstances + - api_field: workerConfig.minInstances + - api_field: workerConfig.weight diff --git a/google/services/dataproc/resource_dataproc_batch_generated_meta.yaml b/google/services/dataproc/resource_dataproc_batch_generated_meta.yaml index e0683018045..c9c3eb6b9bf 100644 --- a/google/services/dataproc/resource_dataproc_batch_generated_meta.yaml +++ b/google/services/dataproc/resource_dataproc_batch_generated_meta.yaml @@ -1,78 +1,78 @@ -resource: 'google_dataproc_batch' -generation_type: 'mmv1' -source_file: 'products/dataproc/Batch.yaml' -api_service_name: 'dataproc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Batch' +resource: google_dataproc_batch +generation_type: mmv1 +source_file: products/dataproc/Batch.yaml +api_service_name: dataproc.googleapis.com +api_version: v1 +api_resource_type_kind: Batch api_variant_patterns: - - 'projects/{project}/locations/{location}/batches/{batch}' + - projects/{project}/locations/{location}/batches/{batch} fields: - - field: 'batch_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'creator' - - field: 'effective_labels' - provider_only: true - - api_field: 'environmentConfig.executionConfig.authenticationConfig.userWorkloadAuthenticationType' - - api_field: 'environmentConfig.executionConfig.kmsKey' - - api_field: 'environmentConfig.executionConfig.networkTags' - - api_field: 'environmentConfig.executionConfig.networkUri' - - api_field: 'environmentConfig.executionConfig.serviceAccount' - - api_field: 'environmentConfig.executionConfig.stagingBucket' - - api_field: 'environmentConfig.executionConfig.subnetworkUri' - - api_field: 'environmentConfig.executionConfig.ttl' - - api_field: 'environmentConfig.peripheralsConfig.metastoreService' - - api_field: 'environmentConfig.peripheralsConfig.sparkHistoryServerConfig.dataprocCluster' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'operation' - - api_field: 'pysparkBatch.archiveUris' - - api_field: 'pysparkBatch.args' - - api_field: 'pysparkBatch.fileUris' - - api_field: 'pysparkBatch.jarFileUris' - - api_field: 'pysparkBatch.mainPythonFileUri' - - api_field: 'pysparkBatch.pythonFileUris' - - api_field: 'runtimeConfig.autotuningConfig.scenarios' - - api_field: 'runtimeConfig.cohort' - - api_field: 'runtimeConfig.containerImage' - - api_field: 'runtimeConfig.effective_properties' - - api_field: 'runtimeConfig.properties' - - api_field: 'runtimeConfig.version' - - api_field: 'runtimeInfo.approximateUsage.acceleratorType' - - api_field: 'runtimeInfo.approximateUsage.milliAcceleratorSeconds' - - api_field: 'runtimeInfo.approximateUsage.milliDcuSeconds' - - api_field: 'runtimeInfo.approximateUsage.shuffleStorageGbSeconds' - - api_field: 'runtimeInfo.currentUsage.acceleratorType' - - api_field: 'runtimeInfo.currentUsage.milliAccelerator' - - api_field: 'runtimeInfo.currentUsage.milliDcu' - - api_field: 'runtimeInfo.currentUsage.milliDcuPremium' - - api_field: 'runtimeInfo.currentUsage.shuffleStorageGb' - - api_field: 'runtimeInfo.currentUsage.shuffleStorageGbPremium' - - api_field: 'runtimeInfo.currentUsage.snapshotTime' - - api_field: 'runtimeInfo.diagnosticOutputUri' - - api_field: 'runtimeInfo.endpoints' - - api_field: 'runtimeInfo.outputUri' - - api_field: 'sparkBatch.archiveUris' - - api_field: 'sparkBatch.args' - - api_field: 'sparkBatch.fileUris' - - api_field: 'sparkBatch.jarFileUris' - - api_field: 'sparkBatch.mainClass' - - api_field: 'sparkBatch.mainJarFileUri' - - api_field: 'sparkRBatch.archiveUris' - - api_field: 'sparkRBatch.args' - - api_field: 'sparkRBatch.fileUris' - - api_field: 'sparkRBatch.mainRFileUri' - - api_field: 'sparkSqlBatch.jarFileUris' - - api_field: 'sparkSqlBatch.queryFileUri' - - api_field: 'sparkSqlBatch.queryVariables' - - api_field: 'state' - - api_field: 'stateHistory.state' - - api_field: 'stateHistory.stateMessage' - - api_field: 'stateHistory.stateStartTime' - - api_field: 'stateMessage' - - api_field: 'stateTime' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uuid' + - field: batch_id + provider_only: true + - api_field: createTime + - api_field: creator + - field: effective_labels + provider_only: true + - api_field: environmentConfig.executionConfig.authenticationConfig.userWorkloadAuthenticationType + - api_field: environmentConfig.executionConfig.kmsKey + - api_field: environmentConfig.executionConfig.networkTags + - api_field: environmentConfig.executionConfig.networkUri + - api_field: environmentConfig.executionConfig.serviceAccount + - api_field: environmentConfig.executionConfig.stagingBucket + - api_field: environmentConfig.executionConfig.subnetworkUri + - api_field: environmentConfig.executionConfig.ttl + - api_field: environmentConfig.peripheralsConfig.metastoreService + - api_field: environmentConfig.peripheralsConfig.sparkHistoryServerConfig.dataprocCluster + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: operation + - api_field: pysparkBatch.archiveUris + - api_field: pysparkBatch.args + - api_field: pysparkBatch.fileUris + - api_field: pysparkBatch.jarFileUris + - api_field: pysparkBatch.mainPythonFileUri + - api_field: pysparkBatch.pythonFileUris + - api_field: runtimeConfig.autotuningConfig.scenarios + - api_field: runtimeConfig.cohort + - api_field: runtimeConfig.containerImage + - api_field: runtimeConfig.effective_properties + - api_field: runtimeConfig.properties + - api_field: runtimeConfig.version + - api_field: runtimeInfo.approximateUsage.acceleratorType + - api_field: runtimeInfo.approximateUsage.milliAcceleratorSeconds + - api_field: runtimeInfo.approximateUsage.milliDcuSeconds + - api_field: runtimeInfo.approximateUsage.shuffleStorageGbSeconds + - api_field: runtimeInfo.currentUsage.acceleratorType + - api_field: runtimeInfo.currentUsage.milliAccelerator + - api_field: runtimeInfo.currentUsage.milliDcu + - api_field: runtimeInfo.currentUsage.milliDcuPremium + - api_field: runtimeInfo.currentUsage.shuffleStorageGb + - api_field: runtimeInfo.currentUsage.shuffleStorageGbPremium + - api_field: runtimeInfo.currentUsage.snapshotTime + - api_field: runtimeInfo.diagnosticOutputUri + - api_field: runtimeInfo.endpoints + - api_field: runtimeInfo.outputUri + - api_field: sparkBatch.archiveUris + - api_field: sparkBatch.args + - api_field: sparkBatch.fileUris + - api_field: sparkBatch.jarFileUris + - api_field: sparkBatch.mainClass + - api_field: sparkBatch.mainJarFileUri + - api_field: sparkRBatch.archiveUris + - api_field: sparkRBatch.args + - api_field: sparkRBatch.fileUris + - api_field: sparkRBatch.mainRFileUri + - api_field: sparkSqlBatch.jarFileUris + - api_field: sparkSqlBatch.queryFileUri + - api_field: sparkSqlBatch.queryVariables + - api_field: state + - api_field: stateHistory.state + - api_field: stateHistory.stateMessage + - api_field: stateHistory.stateStartTime + - api_field: stateMessage + - api_field: stateTime + - field: terraform_labels + provider_only: true + - api_field: uuid diff --git a/google/services/dataproc/resource_dataproc_session_template_generated_meta.yaml b/google/services/dataproc/resource_dataproc_session_template_generated_meta.yaml index 3db5a891e64..79133fe3fbb 100644 --- a/google/services/dataproc/resource_dataproc_session_template_generated_meta.yaml +++ b/google/services/dataproc/resource_dataproc_session_template_generated_meta.yaml @@ -1,38 +1,38 @@ -resource: 'google_dataproc_session_template' -generation_type: 'mmv1' -source_file: 'products/dataproc/SessionTemplate.yaml' -api_service_name: 'dataproc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SessionTemplate' +resource: google_dataproc_session_template +generation_type: mmv1 +source_file: products/dataproc/SessionTemplate.yaml +api_service_name: dataproc.googleapis.com +api_version: v1 +api_resource_type_kind: SessionTemplate api_variant_patterns: - - 'projects/{project}/locations/{location}/sessionTemplates/{sessionTemplate}' + - projects/{project}/locations/{location}/sessionTemplates/{sessionTemplate} fields: - - api_field: 'createTime' - - api_field: 'creator' - - field: 'effective_labels' - provider_only: true - - api_field: 'environmentConfig.executionConfig.authenticationConfig.userWorkloadAuthenticationType' - - api_field: 'environmentConfig.executionConfig.idleTtl' - - api_field: 'environmentConfig.executionConfig.kmsKey' - - api_field: 'environmentConfig.executionConfig.networkTags' - - api_field: 'environmentConfig.executionConfig.serviceAccount' - - api_field: 'environmentConfig.executionConfig.stagingBucket' - - api_field: 'environmentConfig.executionConfig.subnetworkUri' - - api_field: 'environmentConfig.executionConfig.ttl' - - api_field: 'environmentConfig.peripheralsConfig.metastoreService' - - api_field: 'environmentConfig.peripheralsConfig.sparkHistoryServerConfig.dataprocCluster' - - api_field: 'jupyterSession.displayName' - - api_field: 'jupyterSession.kernel' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'runtimeConfig.containerImage' - - api_field: 'runtimeConfig.effective_properties' - - api_field: 'runtimeConfig.properties' - - api_field: 'runtimeConfig.version' - - api_field: 'sparkConnectSession' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'uuid' + - api_field: createTime + - api_field: creator + - field: effective_labels + provider_only: true + - api_field: environmentConfig.executionConfig.authenticationConfig.userWorkloadAuthenticationType + - api_field: environmentConfig.executionConfig.idleTtl + - api_field: environmentConfig.executionConfig.kmsKey + - api_field: environmentConfig.executionConfig.networkTags + - api_field: environmentConfig.executionConfig.serviceAccount + - api_field: environmentConfig.executionConfig.stagingBucket + - api_field: environmentConfig.executionConfig.subnetworkUri + - api_field: environmentConfig.executionConfig.ttl + - api_field: environmentConfig.peripheralsConfig.metastoreService + - api_field: environmentConfig.peripheralsConfig.sparkHistoryServerConfig.dataprocCluster + - api_field: jupyterSession.displayName + - api_field: jupyterSession.kernel + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: runtimeConfig.containerImage + - api_field: runtimeConfig.effective_properties + - api_field: runtimeConfig.properties + - api_field: runtimeConfig.version + - api_field: sparkConnectSession + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: uuid diff --git a/google/services/dataprocgdc/resource_dataproc_gdc_application_environment_generated_meta.yaml b/google/services/dataprocgdc/resource_dataproc_gdc_application_environment_generated_meta.yaml index 6007c3e57af..d121e2af031 100644 --- a/google/services/dataprocgdc/resource_dataproc_gdc_application_environment_generated_meta.yaml +++ b/google/services/dataprocgdc/resource_dataproc_gdc_application_environment_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_dataproc_gdc_application_environment' -generation_type: 'mmv1' -source_file: 'products/dataprocgdc/ApplicationEnvironment.yaml' -api_service_name: 'dataprocgdc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ApplicationEnvironment' +resource: google_dataproc_gdc_application_environment +generation_type: mmv1 +source_file: products/dataprocgdc/ApplicationEnvironment.yaml +api_service_name: dataprocgdc.googleapis.com +api_version: v1 +api_resource_type_kind: ApplicationEnvironment autogen_status: true fields: - - api_field: 'annotations' - - field: 'application_environment_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'namespace' - - field: 'serviceinstance' - provider_only: true - - api_field: 'sparkApplicationEnvironmentConfig.defaultProperties' - - api_field: 'sparkApplicationEnvironmentConfig.defaultVersion' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - field: application_environment_id + provider_only: true + - api_field: createTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: namespace + - field: serviceinstance + provider_only: true + - api_field: sparkApplicationEnvironmentConfig.defaultProperties + - api_field: sparkApplicationEnvironmentConfig.defaultVersion + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/dataprocgdc/resource_dataproc_gdc_service_instance_generated_meta.yaml b/google/services/dataprocgdc/resource_dataproc_gdc_service_instance_generated_meta.yaml index 7999fc4953d..c4d5aaacac5 100644 --- a/google/services/dataprocgdc/resource_dataproc_gdc_service_instance_generated_meta.yaml +++ b/google/services/dataprocgdc/resource_dataproc_gdc_service_instance_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_dataproc_gdc_service_instance' -generation_type: 'mmv1' -source_file: 'products/dataprocgdc/ServiceInstance.yaml' -api_service_name: 'dataprocgdc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServiceInstance' +resource: google_dataproc_gdc_service_instance +generation_type: mmv1 +source_file: products/dataprocgdc/ServiceInstance.yaml +api_service_name: dataprocgdc.googleapis.com +api_version: v1 +api_resource_type_kind: ServiceInstance autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'effectiveServiceAccount' - - api_field: 'gdceCluster.gdceCluster' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - api_field: 'requestedState' - - api_field: 'serviceAccount' - - field: 'service_instance_id' - provider_only: true - - api_field: 'sparkServiceInstanceConfig' - - api_field: 'state' - - api_field: 'stateMessage' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: effectiveServiceAccount + - api_field: gdceCluster.gdceCluster + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: reconciling + - api_field: requestedState + - api_field: serviceAccount + - field: service_instance_id + provider_only: true + - api_field: sparkServiceInstanceConfig + - api_field: state + - api_field: stateMessage + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/dataprocgdc/resource_dataproc_gdc_spark_application_generated_meta.yaml b/google/services/dataprocgdc/resource_dataproc_gdc_spark_application_generated_meta.yaml index 22deaa6a8db..1c4c0a819ce 100644 --- a/google/services/dataprocgdc/resource_dataproc_gdc_spark_application_generated_meta.yaml +++ b/google/services/dataprocgdc/resource_dataproc_gdc_spark_application_generated_meta.yaml @@ -1,57 +1,57 @@ -resource: 'google_dataproc_gdc_spark_application' -generation_type: 'mmv1' -source_file: 'products/dataprocgdc/SparkApplication.yaml' -api_service_name: 'dataprocgdc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SparkApplication' +resource: google_dataproc_gdc_spark_application +generation_type: mmv1 +source_file: products/dataprocgdc/SparkApplication.yaml +api_service_name: dataprocgdc.googleapis.com +api_version: v1 +api_resource_type_kind: SparkApplication autogen_status: true fields: - - api_field: 'annotations' - - api_field: 'applicationEnvironment' - - api_field: 'createTime' - - api_field: 'dependencyImages' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'monitoringEndpoint' - - api_field: 'name' - - api_field: 'namespace' - - api_field: 'outputUri' - - api_field: 'properties' - - api_field: 'pysparkApplicationConfig.archiveUris' - - api_field: 'pysparkApplicationConfig.args' - - api_field: 'pysparkApplicationConfig.fileUris' - - api_field: 'pysparkApplicationConfig.jarFileUris' - - api_field: 'pysparkApplicationConfig.mainPythonFileUri' - - api_field: 'pysparkApplicationConfig.pythonFileUris' - - api_field: 'reconciling' - - field: 'serviceinstance' - provider_only: true - - api_field: 'sparkApplicationConfig.archiveUris' - - api_field: 'sparkApplicationConfig.args' - - api_field: 'sparkApplicationConfig.fileUris' - - api_field: 'sparkApplicationConfig.jarFileUris' - - api_field: 'sparkApplicationConfig.mainClass' - - api_field: 'sparkApplicationConfig.mainJarFileUri' - - field: 'spark_application_id' - provider_only: true - - api_field: 'sparkRApplicationConfig.archiveUris' - - api_field: 'sparkRApplicationConfig.args' - - api_field: 'sparkRApplicationConfig.fileUris' - - api_field: 'sparkRApplicationConfig.mainRFileUri' - - api_field: 'sparkSqlApplicationConfig.jarFileUris' - - api_field: 'sparkSqlApplicationConfig.queryFileUri' - - api_field: 'sparkSqlApplicationConfig.queryList.queries' - - api_field: 'sparkSqlApplicationConfig.scriptVariables' - - api_field: 'state' - - api_field: 'stateMessage' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'version' + - api_field: annotations + - api_field: applicationEnvironment + - api_field: createTime + - api_field: dependencyImages + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: monitoringEndpoint + - api_field: name + - api_field: namespace + - api_field: outputUri + - api_field: properties + - api_field: pysparkApplicationConfig.archiveUris + - api_field: pysparkApplicationConfig.args + - api_field: pysparkApplicationConfig.fileUris + - api_field: pysparkApplicationConfig.jarFileUris + - api_field: pysparkApplicationConfig.mainPythonFileUri + - api_field: pysparkApplicationConfig.pythonFileUris + - api_field: reconciling + - field: serviceinstance + provider_only: true + - api_field: sparkApplicationConfig.archiveUris + - api_field: sparkApplicationConfig.args + - api_field: sparkApplicationConfig.fileUris + - api_field: sparkApplicationConfig.jarFileUris + - api_field: sparkApplicationConfig.mainClass + - api_field: sparkApplicationConfig.mainJarFileUri + - field: spark_application_id + provider_only: true + - api_field: sparkRApplicationConfig.archiveUris + - api_field: sparkRApplicationConfig.args + - api_field: sparkRApplicationConfig.fileUris + - api_field: sparkRApplicationConfig.mainRFileUri + - api_field: sparkSqlApplicationConfig.jarFileUris + - api_field: sparkSqlApplicationConfig.queryFileUri + - api_field: sparkSqlApplicationConfig.queryList.queries + - api_field: sparkSqlApplicationConfig.scriptVariables + - api_field: state + - api_field: stateMessage + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime + - api_field: version diff --git a/google/services/dataprocmetastore/iam_dataproc_metastore_database_generated_test.go b/google/services/dataprocmetastore/iam_dataproc_metastore_database_generated_test.go index d6f19ca32ec..70f5f186268 100644 --- a/google/services/dataprocmetastore/iam_dataproc_metastore_database_generated_test.go +++ b/google/services/dataprocmetastore/iam_dataproc_metastore_database_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -58,7 +59,7 @@ func TestAccDataprocMetastoreDatabaseIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_database_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb"), + ImportStateIdFunc: generateDataprocMetastoreDatabaseIAMBindingStateID("google_dataproc_metastore_database_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -68,7 +69,7 @@ func TestAccDataprocMetastoreDatabaseIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_database_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb"), + ImportStateIdFunc: generateDataprocMetastoreDatabaseIAMBindingStateID("google_dataproc_metastore_database_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -97,7 +98,7 @@ func TestAccDataprocMetastoreDatabaseIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_database_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb"), + ImportStateIdFunc: generateDataprocMetastoreDatabaseIAMMemberStateID("google_dataproc_metastore_database_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccDataprocMetastoreDatabaseIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_database_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb"), + ImportStateIdFunc: generateDataprocMetastoreDatabaseIAMPolicyStateID("google_dataproc_metastore_database_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -135,7 +136,7 @@ func TestAccDataprocMetastoreDatabaseIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_database_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb"), + ImportStateIdFunc: generateDataprocMetastoreDatabaseIAMPolicyStateID("google_dataproc_metastore_database_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -560,3 +561,60 @@ resource "google_dataproc_metastore_database_iam_binding" "foo" { } `, context) } + +func generateDataprocMetastoreDatabaseIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + serviceId := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + database := tpgresource.GetResourceNameFromSelfLink(rawState["database"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s", project, location, serviceId, database), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreDatabaseIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + serviceId := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + database := tpgresource.GetResourceNameFromSelfLink(rawState["database"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s", project, location, serviceId, database), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreDatabaseIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + serviceId := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + database := tpgresource.GetResourceNameFromSelfLink(rawState["database"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s", project, location, serviceId, database), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataprocmetastore/iam_dataproc_metastore_federation_generated_test.go b/google/services/dataprocmetastore/iam_dataproc_metastore_federation_generated_test.go index 8a698a72fd0..671fd14ac75 100644 --- a/google/services/dataprocmetastore/iam_dataproc_metastore_federation_generated_test.go +++ b/google/services/dataprocmetastore/iam_dataproc_metastore_federation_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -305,3 +306,57 @@ resource "google_dataproc_metastore_federation_iam_binding" "foo" { } `, context) } + +func generateDataprocMetastoreFederationIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + federation_id := tpgresource.GetResourceNameFromSelfLink(rawState["federation_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/federations/%s", project, location, federation_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreFederationIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + federation_id := tpgresource.GetResourceNameFromSelfLink(rawState["federation_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/federations/%s", project, location, federation_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreFederationIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + federation_id := tpgresource.GetResourceNameFromSelfLink(rawState["federation_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/federations/%s", project, location, federation_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataprocmetastore/iam_dataproc_metastore_service_generated_test.go b/google/services/dataprocmetastore/iam_dataproc_metastore_service_generated_test.go index 590e388dc9d..95280b453f0 100644 --- a/google/services/dataprocmetastore/iam_dataproc_metastore_service_generated_test.go +++ b/google/services/dataprocmetastore/iam_dataproc_metastore_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccDataprocMetastoreServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateDataprocMetastoreServiceIAMBindingStateID("google_dataproc_metastore_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccDataprocMetastoreServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateDataprocMetastoreServiceIAMBindingStateID("google_dataproc_metastore_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccDataprocMetastoreServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateDataprocMetastoreServiceIAMMemberStateID("google_dataproc_metastore_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccDataprocMetastoreServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateDataprocMetastoreServiceIAMPolicyStateID("google_dataproc_metastore_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccDataprocMetastoreServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv%s", context["random_suffix"])), + ImportStateIdFunc: generateDataprocMetastoreServiceIAMPolicyStateID("google_dataproc_metastore_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -310,3 +311,57 @@ resource "google_dataproc_metastore_service_iam_binding" "foo" { } `, context) } + +func generateDataprocMetastoreServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + service_id := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, service_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + service_id := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, service_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + service_id := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s", project, location, service_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataprocmetastore/iam_dataproc_metastore_table_generated_test.go b/google/services/dataprocmetastore/iam_dataproc_metastore_table_generated_test.go index ff7241501cc..4cf7095b2df 100644 --- a/google/services/dataprocmetastore/iam_dataproc_metastore_table_generated_test.go +++ b/google/services/dataprocmetastore/iam_dataproc_metastore_table_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -58,7 +59,7 @@ func TestAccDataprocMetastoreTableIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_table_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb", "testtbl"), + ImportStateIdFunc: generateDataprocMetastoreTableIAMBindingStateID("google_dataproc_metastore_table_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -68,7 +69,7 @@ func TestAccDataprocMetastoreTableIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_table_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb", "testtbl"), + ImportStateIdFunc: generateDataprocMetastoreTableIAMBindingStateID("google_dataproc_metastore_table_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -97,7 +98,7 @@ func TestAccDataprocMetastoreTableIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_table_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb", "testtbl"), + ImportStateIdFunc: generateDataprocMetastoreTableIAMMemberStateID("google_dataproc_metastore_table_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccDataprocMetastoreTableIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_table_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb", "testtbl"), + ImportStateIdFunc: generateDataprocMetastoreTableIAMPolicyStateID("google_dataproc_metastore_table_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -135,7 +136,7 @@ func TestAccDataprocMetastoreTableIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dataproc_metastore_table_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-metastore-srv-%s", context["random_suffix"]), "testdb", "testtbl"), + ImportStateIdFunc: generateDataprocMetastoreTableIAMPolicyStateID("google_dataproc_metastore_table_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -576,3 +577,63 @@ resource "google_dataproc_metastore_table_iam_binding" "foo" { } `, context) } + +func generateDataprocMetastoreTableIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + serviceId := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + databaseId := tpgresource.GetResourceNameFromSelfLink(rawState["database_id"]) + table := tpgresource.GetResourceNameFromSelfLink(rawState["table"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s", project, location, serviceId, databaseId, table), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreTableIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + serviceId := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + databaseId := tpgresource.GetResourceNameFromSelfLink(rawState["database_id"]) + table := tpgresource.GetResourceNameFromSelfLink(rawState["table"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s", project, location, serviceId, databaseId, table), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDataprocMetastoreTableIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + serviceId := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + databaseId := tpgresource.GetResourceNameFromSelfLink(rawState["database_id"]) + table := tpgresource.GetResourceNameFromSelfLink(rawState["table"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/services/%s/databases/%s/tables/%s", project, location, serviceId, databaseId, table), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dataprocmetastore/resource_dataproc_metastore_federation_generated_meta.yaml b/google/services/dataprocmetastore/resource_dataproc_metastore_federation_generated_meta.yaml index d3e8fe50f1d..62d49bc21ad 100644 --- a/google/services/dataprocmetastore/resource_dataproc_metastore_federation_generated_meta.yaml +++ b/google/services/dataprocmetastore/resource_dataproc_metastore_federation_generated_meta.yaml @@ -1,29 +1,33 @@ -resource: 'google_dataproc_metastore_federation' -generation_type: 'mmv1' -source_file: 'products/metastore/Federation.yaml' -api_service_name: 'metastore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Federation' +resource: google_dataproc_metastore_federation +generation_type: mmv1 +source_file: products/metastore/Federation.yaml +api_service_name: metastore.googleapis.com +api_version: v1 +api_resource_type_kind: Federation fields: - - api_field: 'backendMetastores.backendMetastores.metastoreType' - - api_field: 'backendMetastores.backendMetastores.name' - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'endpointUri' - - field: 'federation_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'state' - - api_field: 'stateMessage' - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'version' + - api_field: backendMetastores.key + field: backend_metastores.rank + - api_field: backendMetastores.value.metastoreType + field: backend_metastores.metastore_type + - api_field: backendMetastores.value.name + field: backend_metastores.name + - api_field: createTime + - field: deletion_protection + provider_only: true + - field: effective_labels + provider_only: true + - api_field: endpointUri + - field: federation_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: state + - api_field: stateMessage + - api_field: tags + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime + - api_field: version diff --git a/google/services/dataprocmetastore/resource_dataproc_metastore_service_generated_meta.yaml b/google/services/dataprocmetastore/resource_dataproc_metastore_service_generated_meta.yaml index 02b744d9e10..287929cec46 100644 --- a/google/services/dataprocmetastore/resource_dataproc_metastore_service_generated_meta.yaml +++ b/google/services/dataprocmetastore/resource_dataproc_metastore_service_generated_meta.yaml @@ -1,56 +1,60 @@ -resource: 'google_dataproc_metastore_service' -generation_type: 'mmv1' -source_file: 'products/metastore/Service.yaml' -api_service_name: 'metastore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' +resource: google_dataproc_metastore_service +generation_type: mmv1 +source_file: products/metastore/Service.yaml +api_service_name: metastore.googleapis.com +api_version: v1 +api_resource_type_kind: Service fields: - - api_field: 'artifactGcsUri' - - api_field: 'createTime' - - api_field: 'databaseType' - - api_field: 'deletionProtection' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionConfig.kmsKey' - - api_field: 'endpointUri' - - api_field: 'hiveMetastoreConfig.auxiliaryVersions.auxiliaryVersions.configOverrides' - - api_field: 'hiveMetastoreConfig.auxiliaryVersions.auxiliaryVersions.version' - - api_field: 'hiveMetastoreConfig.configOverrides' - - api_field: 'hiveMetastoreConfig.endpointProtocol' - - api_field: 'hiveMetastoreConfig.kerberosConfig.keytab.cloudSecret' - - api_field: 'hiveMetastoreConfig.kerberosConfig.krb5ConfigGcsUri' - - api_field: 'hiveMetastoreConfig.kerberosConfig.principal' - - api_field: 'hiveMetastoreConfig.version' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'maintenanceWindow.dayOfWeek' - - api_field: 'maintenanceWindow.hourOfDay' - - api_field: 'metadataIntegration.dataCatalogConfig.enabled' - - api_field: 'name' - - api_field: 'network' - - api_field: 'networkConfig.consumers.endpointUri' - - api_field: 'networkConfig.consumers.subnetwork' - - api_field: 'port' - - api_field: 'releaseChannel' - - api_field: 'scalingConfig.autoscalingConfig.autoscalingEnabled' - - api_field: 'scalingConfig.autoscalingConfig.autoscalingFactor' - - api_field: 'scalingConfig.autoscalingConfig.limitConfig.maxScalingFactor' - - api_field: 'scalingConfig.autoscalingConfig.limitConfig.minScalingFactor' - - api_field: 'scalingConfig.instanceSize' - - api_field: 'scalingConfig.scalingFactor' - - api_field: 'scheduledBackup.backupLocation' - - api_field: 'scheduledBackup.cronSchedule' - - api_field: 'scheduledBackup.enabled' - - api_field: 'scheduledBackup.timeZone' - - field: 'service_id' - provider_only: true - - api_field: 'state' - - api_field: 'stateMessage' - - api_field: 'tags' - - api_field: 'telemetryConfig.logFormat' - - field: 'terraform_labels' - provider_only: true - - api_field: 'tier' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: artifactGcsUri + - api_field: createTime + - api_field: databaseType + - api_field: deletionProtection + - field: effective_labels + provider_only: true + - api_field: encryptionConfig.kmsKey + - api_field: endpointUri + - api_field: hiveMetastoreConfig.auxiliaryVersions.key + field: hive_metastore_config.auxiliary_versions.key + - api_field: hiveMetastoreConfig.auxiliaryVersions.value.configOverrides + field: hive_metastore_config.auxiliary_versions.config_overrides + - api_field: hiveMetastoreConfig.auxiliaryVersions.value.version + field: hive_metastore_config.auxiliary_versions.version + - api_field: hiveMetastoreConfig.configOverrides + - api_field: hiveMetastoreConfig.endpointProtocol + - api_field: hiveMetastoreConfig.kerberosConfig.keytab.cloudSecret + - api_field: hiveMetastoreConfig.kerberosConfig.krb5ConfigGcsUri + - api_field: hiveMetastoreConfig.kerberosConfig.principal + - api_field: hiveMetastoreConfig.version + - api_field: labels + - field: location + provider_only: true + - api_field: maintenanceWindow.dayOfWeek + - api_field: maintenanceWindow.hourOfDay + - api_field: metadataIntegration.dataCatalogConfig.enabled + - api_field: name + - api_field: network + - api_field: networkConfig.consumers.endpointUri + - api_field: networkConfig.consumers.subnetwork + - api_field: port + - api_field: releaseChannel + - api_field: scalingConfig.autoscalingConfig.autoscalingEnabled + - api_field: scalingConfig.autoscalingConfig.autoscalingFactor + - api_field: scalingConfig.autoscalingConfig.limitConfig.maxScalingFactor + - api_field: scalingConfig.autoscalingConfig.limitConfig.minScalingFactor + - api_field: scalingConfig.instanceSize + - api_field: scalingConfig.scalingFactor + - api_field: scheduledBackup.backupLocation + - api_field: scheduledBackup.cronSchedule + - api_field: scheduledBackup.enabled + - api_field: scheduledBackup.timeZone + - field: service_id + provider_only: true + - api_field: state + - api_field: stateMessage + - api_field: tags + - api_field: telemetryConfig.logFormat + - field: terraform_labels + provider_only: true + - api_field: tier + - api_field: uid + - api_field: updateTime diff --git a/google/services/datastream/resource_datastream_connection_profile.go b/google/services/datastream/resource_datastream_connection_profile.go index 87ffe1f69e4..1a28c26211d 100644 --- a/google/services/datastream/resource_datastream_connection_profile.go +++ b/google/services/datastream/resource_datastream_connection_profile.go @@ -568,6 +568,75 @@ If this field is used then the 'client_certificate' and the Optional: true, Description: `A reference to a Secret Manager resource name storing the user's password.`, }, + "ssl_config": { + Type: schema.TypeList, + Optional: true, + Description: `SSL configuration for the PostgreSQL connection.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "server_and_client_verification": { + Type: schema.TypeList, + Optional: true, + Description: `If this field is set, the communication will be encrypted with TLS encryption +and both the server identity and the client identity will be authenticated.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ca_certificate": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `PEM-encoded server root CA certificate.`, + Sensitive: true, + }, + "client_certificate": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `PEM-encoded certificate used by the source database to authenticate the +client identity (i.e., the Datastream's identity). This certificate is +signed by either a root certificate trusted by the server or one or more +intermediate certificates (which is stored with the leaf certificate) to +link to this certificate to the trusted root certificate.`, + Sensitive: true, + }, + "client_key": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `PEM-encoded private key associated with the client certificate. +This value will be used during the SSL/TLS handshake, allowing +the PostgreSQL server to authenticate the client's identity, +i.e. identity of the stream.`, + Sensitive: true, + }, + }, + }, + ExactlyOneOf: []string{}, + }, + "server_verification": { + Type: schema.TypeList, + Optional: true, + Description: `If this field is set, the communication will be encrypted with TLS encryption +and the server identity will be authenticated.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ca_certificate": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `PEM-encoded server root CA certificate.`, + Sensitive: true, + }, + }, + }, + ExactlyOneOf: []string{}, + }, + }, + }, + }, }, }, ExactlyOneOf: []string{"bigquery_profile", "gcs_profile", "mongodb_profile", "mysql_profile", "oracle_profile", "postgresql_profile", "sql_server_profile"}, @@ -1477,6 +1546,8 @@ func flattenDatastreamConnectionProfilePostgresqlProfile(v interface{}, d *schem flattenDatastreamConnectionProfilePostgresqlProfileSecretManagerStoredPassword(original["secretManagerStoredPassword"], d, config) transformed["database"] = flattenDatastreamConnectionProfilePostgresqlProfileDatabase(original["database"], d, config) + transformed["ssl_config"] = + flattenDatastreamConnectionProfilePostgresqlProfileSslConfig(original["sslConfig"], d, config) return []interface{}{transformed} } func flattenDatastreamConnectionProfilePostgresqlProfileHostname(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -1516,6 +1587,53 @@ func flattenDatastreamConnectionProfilePostgresqlProfileDatabase(v interface{}, return v } +func flattenDatastreamConnectionProfilePostgresqlProfileSslConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["server_verification"] = + flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerification(original["serverVerification"], d, config) + transformed["server_and_client_verification"] = + flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerification(original["serverAndClientVerification"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerification(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["ca_certificate"] = + flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerificationCaCertificate(original["caCertificate"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerificationCaCertificate(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return d.Get("postgresql_profile.0.ssl_config.0.server_verification.0.ca_certificate") +} + +func flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerification(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return d.Get("postgresql_profile.0.ssl_config.0.server_and_client_verification") +} +func flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationClientCertificate(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return d.Get("postgresql_profile.0.ssl_config.0.server_and_client_verification.0.client_certificate") +} + +func flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationClientKey(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return d.Get("postgresql_profile.0.ssl_config.0.server_and_client_verification.0.client_key") +} + +func flattenDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationCaCertificate(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return d.Get("postgresql_profile.0.ssl_config.0.server_and_client_verification.0.ca_certificate") +} + func flattenDatastreamConnectionProfileSqlServerProfile(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return nil @@ -2194,6 +2312,13 @@ func expandDatastreamConnectionProfilePostgresqlProfile(v interface{}, d tpgreso transformed["database"] = transformedDatabase } + transformedSslConfig, err := expandDatastreamConnectionProfilePostgresqlProfileSslConfig(original["ssl_config"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSslConfig); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["sslConfig"] = transformedSslConfig + } + return transformed, nil } @@ -2221,6 +2346,109 @@ func expandDatastreamConnectionProfilePostgresqlProfileDatabase(v interface{}, d return v, nil } +func expandDatastreamConnectionProfilePostgresqlProfileSslConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedServerVerification, err := expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerification(original["server_verification"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedServerVerification); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["serverVerification"] = transformedServerVerification + } + + transformedServerAndClientVerification, err := expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerification(original["server_and_client_verification"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedServerAndClientVerification); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["serverAndClientVerification"] = transformedServerAndClientVerification + } + + return transformed, nil +} + +func expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerification(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedCaCertificate, err := expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerificationCaCertificate(original["ca_certificate"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedCaCertificate); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["caCertificate"] = transformedCaCertificate + } + + return transformed, nil +} + +func expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerVerificationCaCertificate(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerification(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedClientCertificate, err := expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationClientCertificate(original["client_certificate"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedClientCertificate); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["clientCertificate"] = transformedClientCertificate + } + + transformedClientKey, err := expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationClientKey(original["client_key"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedClientKey); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["clientKey"] = transformedClientKey + } + + transformedCaCertificate, err := expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationCaCertificate(original["ca_certificate"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedCaCertificate); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["caCertificate"] = transformedCaCertificate + } + + return transformed, nil +} + +func expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationClientCertificate(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationClientKey(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamConnectionProfilePostgresqlProfileSslConfigServerAndClientVerificationCaCertificate(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandDatastreamConnectionProfileSqlServerProfile(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { if v == nil { return nil, nil diff --git a/google/services/datastream/resource_datastream_connection_profile_generated_meta.yaml b/google/services/datastream/resource_datastream_connection_profile_generated_meta.yaml index 5e418feda08..5d7e10a49d7 100644 --- a/google/services/datastream/resource_datastream_connection_profile_generated_meta.yaml +++ b/google/services/datastream/resource_datastream_connection_profile_generated_meta.yaml @@ -1,74 +1,78 @@ -resource: 'google_datastream_connection_profile' -generation_type: 'mmv1' -source_file: 'products/datastream/ConnectionProfile.yaml' -api_service_name: 'datastream.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ConnectionProfile' +resource: google_datastream_connection_profile +generation_type: mmv1 +source_file: products/datastream/ConnectionProfile.yaml +api_service_name: datastream.googleapis.com +api_version: v1 +api_resource_type_kind: ConnectionProfile fields: - - api_field: 'bigqueryProfile' - - field: 'connection_profile_id' - provider_only: true - - field: 'create_without_validation' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'forwardSshConnectivity.hostname' - - api_field: 'forwardSshConnectivity.password' - - api_field: 'forwardSshConnectivity.port' - - api_field: 'forwardSshConnectivity.privateKey' - - api_field: 'forwardSshConnectivity.username' - - api_field: 'gcsProfile.bucket' - - api_field: 'gcsProfile.rootPath' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mongodbProfile.hostAddresses.hostname' - - api_field: 'mongodbProfile.hostAddresses.port' - - api_field: 'mongodbProfile.password' - - api_field: 'mongodbProfile.replicaSet' - - api_field: 'mongodbProfile.secretManagerStoredPassword' - - api_field: 'mongodbProfile.srvConnectionFormat' - - api_field: 'mongodbProfile.sslConfig.caCertificate' - - api_field: 'mongodbProfile.sslConfig.caCertificateSet' - - api_field: 'mongodbProfile.sslConfig.clientCertificate' - - api_field: 'mongodbProfile.sslConfig.clientCertificateSet' - - api_field: 'mongodbProfile.sslConfig.clientKey' - - api_field: 'mongodbProfile.sslConfig.clientKeySet' - - api_field: 'mongodbProfile.sslConfig.secretManagerStoredClientKey' - - api_field: 'mongodbProfile.standardConnectionFormat.directConnection' - - api_field: 'mongodbProfile.username' - - api_field: 'mysqlProfile.hostname' - - api_field: 'mysqlProfile.password' - - api_field: 'mysqlProfile.port' - - api_field: 'mysqlProfile.secretManagerStoredPassword' - - api_field: 'mysqlProfile.sslConfig.caCertificate' - - api_field: 'mysqlProfile.sslConfig.caCertificateSet' - - api_field: 'mysqlProfile.sslConfig.clientCertificate' - - api_field: 'mysqlProfile.sslConfig.clientCertificateSet' - - api_field: 'mysqlProfile.sslConfig.clientKey' - - api_field: 'mysqlProfile.sslConfig.clientKeySet' - - api_field: 'mysqlProfile.username' - - api_field: 'name' - - api_field: 'oracleProfile.connectionAttributes' - - api_field: 'oracleProfile.databaseService' - - api_field: 'oracleProfile.hostname' - - api_field: 'oracleProfile.password' - - api_field: 'oracleProfile.port' - - api_field: 'oracleProfile.secretManagerStoredPassword' - - api_field: 'oracleProfile.username' - - api_field: 'postgresqlProfile.database' - - api_field: 'postgresqlProfile.hostname' - - api_field: 'postgresqlProfile.password' - - api_field: 'postgresqlProfile.port' - - api_field: 'postgresqlProfile.secretManagerStoredPassword' - - api_field: 'postgresqlProfile.username' - - api_field: 'privateConnectivity.privateConnection' - - api_field: 'sqlServerProfile.database' - - api_field: 'sqlServerProfile.hostname' - - api_field: 'sqlServerProfile.password' - - api_field: 'sqlServerProfile.port' - - api_field: 'sqlServerProfile.secretManagerStoredPassword' - - api_field: 'sqlServerProfile.username' - - field: 'terraform_labels' - provider_only: true + - api_field: bigqueryProfile + - field: connection_profile_id + provider_only: true + - field: create_without_validation + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: forwardSshConnectivity.hostname + - api_field: forwardSshConnectivity.password + - api_field: forwardSshConnectivity.port + - api_field: forwardSshConnectivity.privateKey + - api_field: forwardSshConnectivity.username + - api_field: gcsProfile.bucket + - api_field: gcsProfile.rootPath + - api_field: labels + - field: location + provider_only: true + - api_field: mongodbProfile.hostAddresses.hostname + - api_field: mongodbProfile.hostAddresses.port + - api_field: mongodbProfile.password + - api_field: mongodbProfile.replicaSet + - api_field: mongodbProfile.secretManagerStoredPassword + - api_field: mongodbProfile.srvConnectionFormat + - api_field: mongodbProfile.sslConfig.caCertificate + - api_field: mongodbProfile.sslConfig.caCertificateSet + - api_field: mongodbProfile.sslConfig.clientCertificate + - api_field: mongodbProfile.sslConfig.clientCertificateSet + - api_field: mongodbProfile.sslConfig.clientKey + - api_field: mongodbProfile.sslConfig.clientKeySet + - api_field: mongodbProfile.sslConfig.secretManagerStoredClientKey + - api_field: mongodbProfile.standardConnectionFormat.directConnection + - api_field: mongodbProfile.username + - api_field: mysqlProfile.hostname + - api_field: mysqlProfile.password + - api_field: mysqlProfile.port + - api_field: mysqlProfile.secretManagerStoredPassword + - api_field: mysqlProfile.sslConfig.caCertificate + - api_field: mysqlProfile.sslConfig.caCertificateSet + - api_field: mysqlProfile.sslConfig.clientCertificate + - api_field: mysqlProfile.sslConfig.clientCertificateSet + - api_field: mysqlProfile.sslConfig.clientKey + - api_field: mysqlProfile.sslConfig.clientKeySet + - api_field: mysqlProfile.username + - api_field: name + - api_field: oracleProfile.connectionAttributes + - api_field: oracleProfile.databaseService + - api_field: oracleProfile.hostname + - api_field: oracleProfile.password + - api_field: oracleProfile.port + - api_field: oracleProfile.secretManagerStoredPassword + - api_field: oracleProfile.username + - api_field: postgresqlProfile.database + - api_field: postgresqlProfile.hostname + - api_field: postgresqlProfile.password + - api_field: postgresqlProfile.port + - api_field: postgresqlProfile.secretManagerStoredPassword + - api_field: postgresqlProfile.sslConfig.serverAndClientVerification.caCertificate + - api_field: postgresqlProfile.sslConfig.serverAndClientVerification.clientCertificate + - api_field: postgresqlProfile.sslConfig.serverAndClientVerification.clientKey + - api_field: postgresqlProfile.sslConfig.serverVerification.caCertificate + - api_field: postgresqlProfile.username + - api_field: privateConnectivity.privateConnection + - api_field: sqlServerProfile.database + - api_field: sqlServerProfile.hostname + - api_field: sqlServerProfile.password + - api_field: sqlServerProfile.port + - api_field: sqlServerProfile.secretManagerStoredPassword + - api_field: sqlServerProfile.username + - field: terraform_labels + provider_only: true diff --git a/google/services/datastream/resource_datastream_connection_profile_generated_test.go b/google/services/datastream/resource_datastream_connection_profile_generated_test.go index 8c79624a0be..b3a2be49045 100644 --- a/google/services/datastream/resource_datastream_connection_profile_generated_test.go +++ b/google/services/datastream/resource_datastream_connection_profile_generated_test.go @@ -69,7 +69,7 @@ func TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample( ResourceName: "google_datastream_connection_profile.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "postgresql_profile.0.ssl_config.0.server_and_client_verification", "postgresql_profile.0.ssl_config.0.server_verification.0.ca_certificate", "terraform_labels"}, }, { ResourceName: "google_datastream_connection_profile.default", @@ -121,7 +121,7 @@ func TestAccDatastreamConnectionProfile_datastreamConnectionProfilePostgresqlPri ResourceName: "google_datastream_connection_profile.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "postgresql_profile.0.password", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "postgresql_profile.0.password", "postgresql_profile.0.ssl_config.0.server_and_client_verification", "postgresql_profile.0.ssl_config.0.server_verification.0.ca_certificate", "terraform_labels"}, }, { ResourceName: "google_datastream_connection_profile.default", @@ -288,7 +288,7 @@ func TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample(t ResourceName: "google_datastream_connection_profile.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "forward_ssh_connectivity.0.password", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "forward_ssh_connectivity.0.password", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "postgresql_profile.0.ssl_config.0.server_and_client_verification", "postgresql_profile.0.ssl_config.0.server_verification.0.ca_certificate", "terraform_labels"}, }, { ResourceName: "google_datastream_connection_profile.default", @@ -325,6 +325,116 @@ resource "google_datastream_connection_profile" "default" { `, context) } +func TestAccDatastreamConnectionProfile_datastreamStreamPostgresqlSslconfigServerAndClientVerificationExample(t *testing.T) { + acctest.SkipIfVcr(t) + t.Parallel() + + context := map[string]interface{}{ + "deletion_protection": false, + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + ExternalProviders: map[string]resource.ExternalProvider{ + "random": {}, + }, + CheckDestroy: testAccCheckDatastreamConnectionProfileDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccDatastreamConnectionProfile_datastreamStreamPostgresqlSslconfigServerAndClientVerificationExample(context), + }, + { + ResourceName: "google_datastream_connection_profile.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "postgresql_profile.0.password", "postgresql_profile.0.ssl_config.0.server_and_client_verification", "postgresql_profile.0.ssl_config.0.server_verification.0.ca_certificate", "terraform_labels"}, + }, + { + ResourceName: "google_datastream_connection_profile.default", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccDatastreamConnectionProfile_datastreamStreamPostgresqlSslconfigServerAndClientVerificationExample(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_datastream_static_ips" "datastream_ips" { + location = "us-central1" +} + +resource "google_sql_database_instance" "instance" { + name = "tf-test-my-instance%{random_suffix}" + database_version = "POSTGRES_15" + region = "us-central1" + settings { + tier = "db-f1-micro" + ip_configuration { + ipv4_enabled = true + ssl_mode = "TRUSTED_CLIENT_CERTIFICATE_REQUIRED" + dynamic "authorized_networks" { + for_each = data.google_datastream_static_ips.datastream_ips.static_ips + iterator = ip + + content { + name = format("datastream-%d", ip.key) + value = ip.value + } + } + } + } + + deletion_protection = %{deletion_protection} +} + +resource "google_sql_database" "db" { + instance = google_sql_database_instance.instance.name + name = "db" +} + +resource "random_password" "pwd" { + length = 16 + special = false +} + +resource "google_sql_user" "user" { + name = "user" + instance = google_sql_database_instance.instance.name + password = random_password.pwd.result +} + +resource "google_sql_ssl_cert" "client_cert" { + common_name = "client-name" + instance = google_sql_database_instance.instance.name +} + +resource "google_datastream_connection_profile" "default" { + display_name = "Connection Profile" + location = "us-central1" + connection_profile_id = "tf-test-profile-id%{random_suffix}" + + postgresql_profile { + hostname = google_sql_database_instance.instance.public_ip_address + port = 5432 + username = "user" + password = random_password.pwd.result + database = google_sql_database.db.name + ssl_config { + server_and_client_verification { + client_certificate = google_sql_ssl_cert.client_cert.cert + client_key = google_sql_ssl_cert.client_cert.private_key + ca_certificate = google_sql_ssl_cert.client_cert.server_ca_cert + } + } + } +} +`, context) +} + func TestAccDatastreamConnectionProfile_datastreamConnectionProfilePostgresSecretManagerExample(t *testing.T) { t.Parallel() @@ -344,7 +454,7 @@ func TestAccDatastreamConnectionProfile_datastreamConnectionProfilePostgresSecre ResourceName: "google_datastream_connection_profile.default", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"connection_profile_id", "create_without_validation", "labels", "location", "mongodb_profile.0.ssl_config.0.ca_certificate", "mongodb_profile.0.ssl_config.0.client_certificate", "mongodb_profile.0.ssl_config.0.client_key", "mongodb_profile.0.ssl_config.0.secret_manager_stored_client_key", "postgresql_profile.0.ssl_config.0.server_and_client_verification", "postgresql_profile.0.ssl_config.0.server_verification.0.ca_certificate", "terraform_labels"}, }, { ResourceName: "google_datastream_connection_profile.default", diff --git a/google/services/datastream/resource_datastream_private_connection_generated_meta.yaml b/google/services/datastream/resource_datastream_private_connection_generated_meta.yaml index 7d98b887e3b..69620d83fef 100644 --- a/google/services/datastream/resource_datastream_private_connection_generated_meta.yaml +++ b/google/services/datastream/resource_datastream_private_connection_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_datastream_private_connection' -generation_type: 'mmv1' -source_file: 'products/datastream/PrivateConnection.yaml' -api_service_name: 'datastream.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PrivateConnection' +resource: google_datastream_private_connection +generation_type: mmv1 +source_file: products/datastream/PrivateConnection.yaml +api_service_name: datastream.googleapis.com +api_version: v1 +api_resource_type_kind: PrivateConnection fields: - - field: 'create_without_validation' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'error.details' - - api_field: 'error.message' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'private_connection_id' - provider_only: true - - api_field: 'pscInterfaceConfig.networkAttachment' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'vpcPeeringConfig.subnet' - - api_field: 'vpcPeeringConfig.vpc' + - field: create_without_validation + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: error.details + - api_field: error.message + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: private_connection_id + provider_only: true + - api_field: pscInterfaceConfig.networkAttachment + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: vpcPeeringConfig.subnet + - api_field: vpcPeeringConfig.vpc diff --git a/google/services/datastream/resource_datastream_stream.go b/google/services/datastream/resource_datastream_stream.go index 1ce4a81ae24..3adc2435d9b 100644 --- a/google/services/datastream/resource_datastream_stream.go +++ b/google/services/datastream/resource_datastream_stream.go @@ -2067,6 +2067,259 @@ will be encrypted using an internal Stream-specific encryption key provisioned t Please refer to the field 'effective_labels' for all of the labels present on the resource.`, Elem: &schema.Schema{Type: schema.TypeString}, }, + "rule_sets": { + Type: schema.TypeList, + Optional: true, + Description: `Rule sets to apply to the stream.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "customization_rules": { + Type: schema.TypeList, + Required: true, + Description: `List of customization rules to apply.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bigquery_clustering": { + Type: schema.TypeList, + Optional: true, + Description: `BigQuery clustering rule.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "columns": { + Type: schema.TypeList, + Required: true, + Description: `Column names to set as clustering columns.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + }, + }, + }, + "bigquery_partitioning": { + Type: schema.TypeList, + Optional: true, + Description: `BigQuery partitioning rule.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ingestion_time_partition": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "partitioning_time_granularity": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: verify.ValidateEnum([]string{"PARTITIONING_TIME_GRANULARITY_UNSPECIFIED", "PARTITIONING_TIME_GRANULARITY_HOUR", "PARTITIONING_TIME_GRANULARITY_DAY", "PARTITIONING_TIME_GRANULARITY_MONTH", "PARTITIONING_TIME_GRANULARITY_YEAR", ""}), + Description: `Partition granularity. Possible values: ["PARTITIONING_TIME_GRANULARITY_UNSPECIFIED", "PARTITIONING_TIME_GRANULARITY_HOUR", "PARTITIONING_TIME_GRANULARITY_DAY", "PARTITIONING_TIME_GRANULARITY_MONTH", "PARTITIONING_TIME_GRANULARITY_YEAR"]`, + }, + }, + }, + }, + "integer_range_partition": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "column": { + Type: schema.TypeString, + Required: true, + Description: `The partitioning column.`, + }, + "end": { + Type: schema.TypeInt, + Required: true, + Description: `The ending value for range partitioning (exclusive).`, + }, + "interval": { + Type: schema.TypeInt, + Required: true, + Description: `The interval of each range within the partition.`, + }, + "start": { + Type: schema.TypeInt, + Required: true, + Description: `The starting value for range partitioning (inclusive).`, + }, + }, + }, + }, + "require_partition_filter": { + Type: schema.TypeBool, + Optional: true, + Description: `If true, queries over the table require a partition filter.`, + }, + "time_unit_partition": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "column": { + Type: schema.TypeString, + Required: true, + Description: `The partitioning column.`, + }, + "partitioning_time_granularity": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: verify.ValidateEnum([]string{"PARTITIONING_TIME_GRANULARITY_UNSPECIFIED", "PARTITIONING_TIME_GRANULARITY_HOUR", "PARTITIONING_TIME_GRANULARITY_DAY", "PARTITIONING_TIME_GRANULARITY_MONTH", "PARTITIONING_TIME_GRANULARITY_YEAR", ""}), + Description: `Partition granularity. Possible values: ["PARTITIONING_TIME_GRANULARITY_UNSPECIFIED", "PARTITIONING_TIME_GRANULARITY_HOUR", "PARTITIONING_TIME_GRANULARITY_DAY", "PARTITIONING_TIME_GRANULARITY_MONTH", "PARTITIONING_TIME_GRANULARITY_YEAR"]`, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "object_filter": { + Type: schema.TypeList, + Required: true, + Description: `Object filter to apply the customization rules to.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "source_object_identifier": { + Type: schema.TypeList, + Optional: true, + Description: `Specific source object identifier.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mongodb_identifier": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "collection": { + Type: schema.TypeString, + Required: true, + Description: `The MongoDB collection name.`, + }, + "database": { + Type: schema.TypeString, + Required: true, + Description: `The MongoDB database name.`, + }, + }, + }, + }, + "mysql_identifier": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "database": { + Type: schema.TypeString, + Required: true, + Description: `The database name.`, + }, + "table": { + Type: schema.TypeString, + Required: true, + Description: `The table name.`, + }, + }, + }, + }, + "oracle_identifier": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "schema": { + Type: schema.TypeString, + Required: true, + Description: `The schema name.`, + }, + "table": { + Type: schema.TypeString, + Required: true, + Description: `The table name.`, + }, + }, + }, + }, + "postgresql_identifier": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "schema": { + Type: schema.TypeString, + Required: true, + Description: `The schema name.`, + }, + "table": { + Type: schema.TypeString, + Required: true, + Description: `The table name.`, + }, + }, + }, + }, + "salesforce_identifier": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "object_name": { + Type: schema.TypeString, + Required: true, + Description: `The Salesforce object name.`, + }, + }, + }, + }, + "sql_server_identifier": { + Type: schema.TypeList, + Optional: true, + Description: `A nested object resource.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "schema": { + Type: schema.TypeString, + Required: true, + Description: `The schema name.`, + }, + "table": { + Type: schema.TypeString, + Required: true, + Description: `The table name.`, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, "effective_labels": { Type: schema.TypeMap, Computed: true, @@ -2154,6 +2407,12 @@ func resourceDatastreamStreamCreate(d *schema.ResourceData, meta interface{}) er } else if v, ok := d.GetOkExists("customer_managed_encryption_key"); !tpgresource.IsEmptyValue(reflect.ValueOf(customerManagedEncryptionKeyProp)) && (ok || !reflect.DeepEqual(v, customerManagedEncryptionKeyProp)) { obj["customerManagedEncryptionKey"] = customerManagedEncryptionKeyProp } + ruleSetsProp, err := expandDatastreamStreamRuleSets(d.Get("rule_sets"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("rule_sets"); !tpgresource.IsEmptyValue(reflect.ValueOf(ruleSetsProp)) && (ok || !reflect.DeepEqual(v, ruleSetsProp)) { + obj["ruleSets"] = ruleSetsProp + } effectiveLabelsProp, err := expandDatastreamStreamEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -2329,6 +2588,9 @@ func resourceDatastreamStreamRead(d *schema.ResourceData, meta interface{}) erro if err := d.Set("customer_managed_encryption_key", flattenDatastreamStreamCustomerManagedEncryptionKey(res["customerManagedEncryptionKey"], d, config)); err != nil { return fmt.Errorf("Error reading Stream: %s", err) } + if err := d.Set("rule_sets", flattenDatastreamStreamRuleSets(res["ruleSets"], d, config)); err != nil { + return fmt.Errorf("Error reading Stream: %s", err) + } if err := d.Set("terraform_labels", flattenDatastreamStreamTerraformLabels(res["labels"], d, config)); err != nil { return fmt.Errorf("Error reading Stream: %s", err) } @@ -2430,6 +2692,12 @@ func resourceDatastreamStreamUpdate(d *schema.ResourceData, meta interface{}) er } else if v, ok := d.GetOkExists("backfill_none"); ok || !reflect.DeepEqual(v, backfillNoneProp) { obj["backfillNone"] = backfillNoneProp } + ruleSetsProp, err := expandDatastreamStreamRuleSets(d.Get("rule_sets"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("rule_sets"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, ruleSetsProp)) { + obj["ruleSets"] = ruleSetsProp + } effectiveLabelsProp, err := expandDatastreamStreamEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -2471,6 +2739,10 @@ func resourceDatastreamStreamUpdate(d *schema.ResourceData, meta interface{}) er updateMask = append(updateMask, "backfillNone") } + if d.HasChange("rule_sets") { + updateMask = append(updateMask, "ruleSets") + } + if d.HasChange("effective_labels") { updateMask = append(updateMask, "labels") } @@ -5628,45 +5900,402 @@ func flattenDatastreamStreamCustomerManagedEncryptionKey(v interface{}, d *schem return v } -func flattenDatastreamStreamTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { +func flattenDatastreamStreamRuleSets(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v } - - transformed := make(map[string]interface{}) - if l, ok := d.GetOkExists("terraform_labels"); ok { - for k := range l.(map[string]interface{}) { - transformed[k] = v.(map[string]interface{})[k] + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue } + transformed = append(transformed, map[string]interface{}{ + "customization_rules": flattenDatastreamStreamRuleSetsCustomizationRules(original["customizationRules"], d, config), + "object_filter": flattenDatastreamStreamRuleSetsObjectFilter(original["objectFilter"], d, config), + }) } - return transformed } - -func flattenDatastreamStreamEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { - return v +func flattenDatastreamStreamRuleSetsCustomizationRules(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "bigquery_partitioning": flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioning(original["bigqueryPartitioning"], d, config), + "bigquery_clustering": flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryClustering(original["bigqueryClustering"], d, config), + }) + } + return transformed } - -func expandDatastreamStreamDisplayName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { - return v, nil +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioning(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["integer_range_partition"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartition(original["integerRangePartition"], d, config) + transformed["time_unit_partition"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartition(original["timeUnitPartition"], d, config) + transformed["ingestion_time_partition"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartition(original["ingestionTimePartition"], d, config) + transformed["require_partition_filter"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningRequirePartitionFilter(original["requirePartitionFilter"], d, config) + return []interface{}{transformed} } - -func expandDatastreamStreamSourceConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartition(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { - return nil, nil + return nil } - l := v.([]interface{}) - if len(l) == 0 || l[0] == nil { - return nil, nil + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil } - raw := l[0] - original := raw.(map[string]interface{}) transformed := make(map[string]interface{}) + transformed["column"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionColumn(original["column"], d, config) + transformed["start"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionStart(original["start"], d, config) + transformed["end"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionEnd(original["end"], d, config) + transformed["interval"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionInterval(original["interval"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionColumn(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} - transformedSourceConnectionProfile, err := expandDatastreamStreamSourceConfigSourceConnectionProfile(original["source_connection_profile"], d, config) - if err != nil { - return nil, err - } else if val := reflect.ValueOf(transformedSourceConnectionProfile); val.IsValid() && !tpgresource.IsEmptyValue(val) { +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionStart(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionEnd(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionInterval(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartition(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["column"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionColumn(original["column"], d, config) + transformed["partitioning_time_granularity"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionPartitioningTimeGranularity(original["partitioningTimeGranularity"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionColumn(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionPartitioningTimeGranularity(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartition(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + transformed := make(map[string]interface{}) + transformed["partitioning_time_granularity"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartitionPartitioningTimeGranularity(original["partitioningTimeGranularity"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartitionPartitioningTimeGranularity(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningRequirePartitionFilter(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryClustering(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["columns"] = + flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryClusteringColumns(original["columns"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsCustomizationRulesBigqueryClusteringColumns(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilter(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["source_object_identifier"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifier(original["sourceObjectIdentifier"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifier(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["oracle_identifier"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifier(original["oracleIdentifier"], d, config) + transformed["mysql_identifier"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifier(original["mysqlIdentifier"], d, config) + transformed["postgresql_identifier"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifier(original["postgresqlIdentifier"], d, config) + transformed["sql_server_identifier"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifier(original["sqlServerIdentifier"], d, config) + transformed["salesforce_identifier"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifier(original["salesforceIdentifier"], d, config) + transformed["mongodb_identifier"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifier(original["mongodbIdentifier"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifier(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["schema"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierSchema(original["schema"], d, config) + transformed["table"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierTable(original["table"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierSchema(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierTable(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifier(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["database"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierDatabase(original["database"], d, config) + transformed["table"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierTable(original["table"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierDatabase(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierTable(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifier(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["schema"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierSchema(original["schema"], d, config) + transformed["table"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierTable(original["table"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierSchema(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierTable(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifier(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["schema"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierSchema(original["schema"], d, config) + transformed["table"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierTable(original["table"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierSchema(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierTable(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifier(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["object_name"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifierObjectName(original["objectName"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifierObjectName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifier(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["database"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierDatabase(original["database"], d, config) + transformed["collection"] = + flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierCollection(original["collection"], d, config) + return []interface{}{transformed} +} +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierDatabase(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierCollection(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenDatastreamStreamTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenDatastreamStreamEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandDatastreamStreamDisplayName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamSourceConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedSourceConnectionProfile, err := expandDatastreamStreamSourceConfigSourceConnectionProfile(original["source_connection_profile"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSourceConnectionProfile); val.IsValid() && !tpgresource.IsEmptyValue(val) { transformed["sourceConnectionProfile"] = transformedSourceConnectionProfile } @@ -9748,6 +10377,560 @@ func expandDatastreamStreamCustomerManagedEncryptionKey(v interface{}, d tpgreso return v, nil } +func expandDatastreamStreamRuleSets(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + req := make([]interface{}, 0, len(l)) + for _, raw := range l { + if raw == nil { + continue + } + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedCustomizationRules, err := expandDatastreamStreamRuleSetsCustomizationRules(original["customization_rules"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedCustomizationRules); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["customizationRules"] = transformedCustomizationRules + } + + transformedObjectFilter, err := expandDatastreamStreamRuleSetsObjectFilter(original["object_filter"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedObjectFilter); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["objectFilter"] = transformedObjectFilter + } + + req = append(req, transformed) + } + return req, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRules(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + req := make([]interface{}, 0, len(l)) + for _, raw := range l { + if raw == nil { + continue + } + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedBigqueryPartitioning, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioning(original["bigquery_partitioning"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedBigqueryPartitioning); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["bigqueryPartitioning"] = transformedBigqueryPartitioning + } + + transformedBigqueryClustering, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryClustering(original["bigquery_clustering"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedBigqueryClustering); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["bigqueryClustering"] = transformedBigqueryClustering + } + + req = append(req, transformed) + } + return req, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioning(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedIntegerRangePartition, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartition(original["integer_range_partition"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedIntegerRangePartition); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["integerRangePartition"] = transformedIntegerRangePartition + } + + transformedTimeUnitPartition, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartition(original["time_unit_partition"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedTimeUnitPartition); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["timeUnitPartition"] = transformedTimeUnitPartition + } + + transformedIngestionTimePartition, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartition(original["ingestion_time_partition"], d, config) + if err != nil { + return nil, err + } else { + transformed["ingestionTimePartition"] = transformedIngestionTimePartition + } + + transformedRequirePartitionFilter, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningRequirePartitionFilter(original["require_partition_filter"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedRequirePartitionFilter); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["requirePartitionFilter"] = transformedRequirePartitionFilter + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartition(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedColumn, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionColumn(original["column"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedColumn); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["column"] = transformedColumn + } + + transformedStart, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionStart(original["start"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedStart); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["start"] = transformedStart + } + + transformedEnd, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionEnd(original["end"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedEnd); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["end"] = transformedEnd + } + + transformedInterval, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionInterval(original["interval"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedInterval); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["interval"] = transformedInterval + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionColumn(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionStart(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionEnd(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIntegerRangePartitionInterval(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartition(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedColumn, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionColumn(original["column"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedColumn); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["column"] = transformedColumn + } + + transformedPartitioningTimeGranularity, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionPartitioningTimeGranularity(original["partitioning_time_granularity"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPartitioningTimeGranularity); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["partitioningTimeGranularity"] = transformedPartitioningTimeGranularity + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionColumn(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningTimeUnitPartitionPartitioningTimeGranularity(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartition(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 { + return nil, nil + } + + if l[0] == nil { + transformed := make(map[string]interface{}) + return transformed, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedPartitioningTimeGranularity, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartitionPartitioningTimeGranularity(original["partitioning_time_granularity"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPartitioningTimeGranularity); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["partitioningTimeGranularity"] = transformedPartitioningTimeGranularity + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningIngestionTimePartitionPartitioningTimeGranularity(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryPartitioningRequirePartitionFilter(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryClustering(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedColumns, err := expandDatastreamStreamRuleSetsCustomizationRulesBigqueryClusteringColumns(original["columns"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedColumns); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["columns"] = transformedColumns + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsCustomizationRulesBigqueryClusteringColumns(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilter(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedSourceObjectIdentifier, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifier(original["source_object_identifier"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSourceObjectIdentifier); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["sourceObjectIdentifier"] = transformedSourceObjectIdentifier + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifier(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedOracleIdentifier, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifier(original["oracle_identifier"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedOracleIdentifier); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["oracleIdentifier"] = transformedOracleIdentifier + } + + transformedMysqlIdentifier, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifier(original["mysql_identifier"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedMysqlIdentifier); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["mysqlIdentifier"] = transformedMysqlIdentifier + } + + transformedPostgresqlIdentifier, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifier(original["postgresql_identifier"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPostgresqlIdentifier); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["postgresqlIdentifier"] = transformedPostgresqlIdentifier + } + + transformedSqlServerIdentifier, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifier(original["sql_server_identifier"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSqlServerIdentifier); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["sqlServerIdentifier"] = transformedSqlServerIdentifier + } + + transformedSalesforceIdentifier, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifier(original["salesforce_identifier"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSalesforceIdentifier); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["salesforceIdentifier"] = transformedSalesforceIdentifier + } + + transformedMongodbIdentifier, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifier(original["mongodb_identifier"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedMongodbIdentifier); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["mongodbIdentifier"] = transformedMongodbIdentifier + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifier(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedSchema, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierSchema(original["schema"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSchema); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["schema"] = transformedSchema + } + + transformedTable, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierTable(original["table"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedTable); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["table"] = transformedTable + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierSchema(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierOracleIdentifierTable(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifier(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedDatabase, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierDatabase(original["database"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedDatabase); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["database"] = transformedDatabase + } + + transformedTable, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierTable(original["table"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedTable); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["table"] = transformedTable + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierDatabase(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMysqlIdentifierTable(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifier(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedSchema, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierSchema(original["schema"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSchema); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["schema"] = transformedSchema + } + + transformedTable, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierTable(original["table"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedTable); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["table"] = transformedTable + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierSchema(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierPostgresqlIdentifierTable(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifier(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedSchema, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierSchema(original["schema"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSchema); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["schema"] = transformedSchema + } + + transformedTable, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierTable(original["table"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedTable); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["table"] = transformedTable + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierSchema(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSqlServerIdentifierTable(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifier(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedObjectName, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifierObjectName(original["object_name"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedObjectName); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["objectName"] = transformedObjectName + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierSalesforceIdentifierObjectName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifier(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedDatabase, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierDatabase(original["database"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedDatabase); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["database"] = transformedDatabase + } + + transformedCollection, err := expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierCollection(original["collection"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedCollection); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["collection"] = transformedCollection + } + + return transformed, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierDatabase(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandDatastreamStreamRuleSetsObjectFilterSourceObjectIdentifierMongodbIdentifierCollection(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandDatastreamStreamEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { if v == nil { return map[string]string{}, nil diff --git a/google/services/datastream/resource_datastream_stream_generated_meta.yaml b/google/services/datastream/resource_datastream_stream_generated_meta.yaml index 13129853d04..09d90109f93 100644 --- a/google/services/datastream/resource_datastream_stream_generated_meta.yaml +++ b/google/services/datastream/resource_datastream_stream_generated_meta.yaml @@ -1,198 +1,218 @@ -resource: 'google_datastream_stream' -generation_type: 'mmv1' -source_file: 'products/datastream/Stream.yaml' -api_service_name: 'datastream.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Stream' +resource: google_datastream_stream +generation_type: mmv1 +source_file: products/datastream/Stream.yaml +api_service_name: datastream.googleapis.com +api_version: v1 +api_resource_type_kind: Stream fields: - - api_field: 'backfillAll.mongodbExcludedObjects.databases.collections.collection' - - api_field: 'backfillAll.mongodbExcludedObjects.databases.collections.fields.field' - - api_field: 'backfillAll.mongodbExcludedObjects.databases.database' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.database' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.collation' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.column' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.dataType' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.length' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.nullable' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.ordinalPosition' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.primaryKey' - - api_field: 'backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.table' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.column' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.dataType' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.encoding' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.length' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.nullable' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.ordinalPosition' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.precision' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.primaryKey' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.scale' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.table' - - api_field: 'backfillAll.oracleExcludedObjects.oracleSchemas.schema' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.column' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.dataType' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.length' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.nullable' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.ordinalPosition' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.precision' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.primaryKey' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.scale' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.table' - - api_field: 'backfillAll.postgresqlExcludedObjects.postgresqlSchemas.schema' - - api_field: 'backfillAll.salesforceExcludedObjects.objects.fields.name' - - api_field: 'backfillAll.salesforceExcludedObjects.objects.objectName' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.schema' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.column' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.dataType' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.length' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.nullable' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.ordinalPosition' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.precision' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.primaryKey' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.columns.scale' - - api_field: 'backfillAll.sqlServerExcludedObjects.schemas.tables.table' - - api_field: 'backfillNone' - - field: 'create_without_validation' - provider_only: true - - api_field: 'customerManagedEncryptionKey' - - field: 'desired_state' - provider_only: true - - api_field: 'destinationConfig.bigqueryDestinationConfig.appendOnly' - - api_field: 'destinationConfig.bigqueryDestinationConfig.blmtConfig.bucket' - - api_field: 'destinationConfig.bigqueryDestinationConfig.blmtConfig.connectionName' - - api_field: 'destinationConfig.bigqueryDestinationConfig.blmtConfig.fileFormat' - - api_field: 'destinationConfig.bigqueryDestinationConfig.blmtConfig.rootPath' - - api_field: 'destinationConfig.bigqueryDestinationConfig.blmtConfig.tableFormat' - - api_field: 'destinationConfig.bigqueryDestinationConfig.dataFreshness' - - api_field: 'destinationConfig.bigqueryDestinationConfig.merge' - - api_field: 'destinationConfig.bigqueryDestinationConfig.singleTargetDataset.datasetId' - - api_field: 'destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.datasetIdPrefix' - - api_field: 'destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.kmsKeyName' - - api_field: 'destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.location' - - api_field: 'destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.projectId' - - api_field: 'destinationConfig.destinationConnectionProfile' - - api_field: 'destinationConfig.gcsDestinationConfig.avroFileFormat' - - api_field: 'destinationConfig.gcsDestinationConfig.fileRotationInterval' - - api_field: 'destinationConfig.gcsDestinationConfig.fileRotationMb' - - api_field: 'destinationConfig.gcsDestinationConfig.jsonFileFormat.compression' - - api_field: 'destinationConfig.gcsDestinationConfig.jsonFileFormat.schemaFileFormat' - - api_field: 'destinationConfig.gcsDestinationConfig.path' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'sourceConfig.mongodbSourceConfig.excludeObjects.databases.collections.collection' - - api_field: 'sourceConfig.mongodbSourceConfig.excludeObjects.databases.collections.fields.field' - - api_field: 'sourceConfig.mongodbSourceConfig.excludeObjects.databases.database' - - api_field: 'sourceConfig.mongodbSourceConfig.includeObjects.databases.collections.collection' - - api_field: 'sourceConfig.mongodbSourceConfig.includeObjects.databases.collections.fields.field' - - api_field: 'sourceConfig.mongodbSourceConfig.includeObjects.databases.database' - - api_field: 'sourceConfig.mongodbSourceConfig.maxConcurrentBackfillTasks' - - api_field: 'sourceConfig.mysqlSourceConfig.binaryLogPosition' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.database' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.collation' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.column' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.dataType' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.length' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.nullable' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.ordinalPosition' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.primaryKey' - - api_field: 'sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.table' - - api_field: 'sourceConfig.mysqlSourceConfig.gtid' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.database' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.collation' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.column' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.dataType' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.length' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.nullable' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.ordinalPosition' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.primaryKey' - - api_field: 'sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.table' - - api_field: 'sourceConfig.mysqlSourceConfig.maxConcurrentBackfillTasks' - - api_field: 'sourceConfig.mysqlSourceConfig.maxConcurrentCdcTasks' - - api_field: 'sourceConfig.oracleSourceConfig.dropLargeObjects' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.column' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.dataType' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.encoding' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.length' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.nullable' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.ordinalPosition' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.precision' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.primaryKey' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.scale' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.table' - - api_field: 'sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.schema' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.column' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.dataType' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.encoding' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.length' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.nullable' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.ordinalPosition' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.precision' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.primaryKey' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.scale' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.table' - - api_field: 'sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.schema' - - api_field: 'sourceConfig.oracleSourceConfig.maxConcurrentBackfillTasks' - - api_field: 'sourceConfig.oracleSourceConfig.maxConcurrentCdcTasks' - - api_field: 'sourceConfig.oracleSourceConfig.streamLargeObjects' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.column' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.dataType' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.length' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.nullable' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.ordinalPosition' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.precision' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.primaryKey' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.scale' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.table' - - api_field: 'sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.schema' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.column' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.dataType' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.length' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.nullable' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.ordinalPosition' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.precision' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.primaryKey' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.scale' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.table' - - api_field: 'sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.schema' - - api_field: 'sourceConfig.postgresqlSourceConfig.maxConcurrentBackfillTasks' - - api_field: 'sourceConfig.postgresqlSourceConfig.publication' - - api_field: 'sourceConfig.postgresqlSourceConfig.replicationSlot' - - api_field: 'sourceConfig.salesforceSourceConfig.excludeObjects.objects.fields.name' - - api_field: 'sourceConfig.salesforceSourceConfig.excludeObjects.objects.objectName' - - api_field: 'sourceConfig.salesforceSourceConfig.includeObjects.objects.fields.name' - - api_field: 'sourceConfig.salesforceSourceConfig.includeObjects.objects.objectName' - - api_field: 'sourceConfig.salesforceSourceConfig.pollingInterval' - - api_field: 'sourceConfig.sourceConnectionProfile' - - api_field: 'sourceConfig.sqlServerSourceConfig.changeTables' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.schema' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.column' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.dataType' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.length' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.nullable' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.ordinalPosition' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.precision' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.primaryKey' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.scale' - - api_field: 'sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.table' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.schema' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.column' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.dataType' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.length' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.nullable' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.ordinalPosition' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.precision' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.primaryKey' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.scale' - - api_field: 'sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.table' - - api_field: 'sourceConfig.sqlServerSourceConfig.maxConcurrentBackfillTasks' - - api_field: 'sourceConfig.sqlServerSourceConfig.maxConcurrentCdcTasks' - - api_field: 'sourceConfig.sqlServerSourceConfig.transactionLogs' - - api_field: 'state' - - field: 'stream_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true + - api_field: backfillAll.mongodbExcludedObjects.databases.collections.collection + - api_field: backfillAll.mongodbExcludedObjects.databases.collections.fields.field + - api_field: backfillAll.mongodbExcludedObjects.databases.database + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.database + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.collation + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.column + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.dataType + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.length + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.nullable + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.ordinalPosition + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.mysqlColumns.primaryKey + - api_field: backfillAll.mysqlExcludedObjects.mysqlDatabases.mysqlTables.table + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.column + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.dataType + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.encoding + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.length + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.nullable + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.ordinalPosition + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.precision + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.primaryKey + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.oracleColumns.scale + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.oracleTables.table + - api_field: backfillAll.oracleExcludedObjects.oracleSchemas.schema + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.column + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.dataType + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.length + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.nullable + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.ordinalPosition + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.precision + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.primaryKey + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.scale + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.postgresqlTables.table + - api_field: backfillAll.postgresqlExcludedObjects.postgresqlSchemas.schema + - api_field: backfillAll.salesforceExcludedObjects.objects.fields.name + - api_field: backfillAll.salesforceExcludedObjects.objects.objectName + - api_field: backfillAll.sqlServerExcludedObjects.schemas.schema + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.column + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.dataType + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.length + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.nullable + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.ordinalPosition + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.precision + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.primaryKey + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.columns.scale + - api_field: backfillAll.sqlServerExcludedObjects.schemas.tables.table + - api_field: backfillNone + - field: create_without_validation + provider_only: true + - api_field: customerManagedEncryptionKey + - field: desired_state + provider_only: true + - api_field: destinationConfig.bigqueryDestinationConfig.appendOnly + - api_field: destinationConfig.bigqueryDestinationConfig.blmtConfig.bucket + - api_field: destinationConfig.bigqueryDestinationConfig.blmtConfig.connectionName + - api_field: destinationConfig.bigqueryDestinationConfig.blmtConfig.fileFormat + - api_field: destinationConfig.bigqueryDestinationConfig.blmtConfig.rootPath + - api_field: destinationConfig.bigqueryDestinationConfig.blmtConfig.tableFormat + - api_field: destinationConfig.bigqueryDestinationConfig.dataFreshness + - api_field: destinationConfig.bigqueryDestinationConfig.merge + - api_field: destinationConfig.bigqueryDestinationConfig.singleTargetDataset.datasetId + - api_field: destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.datasetIdPrefix + - api_field: destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.kmsKeyName + - api_field: destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.datasetTemplate.location + - api_field: destinationConfig.bigqueryDestinationConfig.sourceHierarchyDatasets.projectId + - api_field: destinationConfig.destinationConnectionProfile + - api_field: destinationConfig.gcsDestinationConfig.avroFileFormat + - api_field: destinationConfig.gcsDestinationConfig.fileRotationInterval + - api_field: destinationConfig.gcsDestinationConfig.fileRotationMb + - api_field: destinationConfig.gcsDestinationConfig.jsonFileFormat.compression + - api_field: destinationConfig.gcsDestinationConfig.jsonFileFormat.schemaFileFormat + - api_field: destinationConfig.gcsDestinationConfig.path + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: ruleSets.customizationRules.bigqueryClustering.columns + - api_field: ruleSets.customizationRules.bigqueryPartitioning.ingestionTimePartition.partitioningTimeGranularity + - api_field: ruleSets.customizationRules.bigqueryPartitioning.integerRangePartition.column + - api_field: ruleSets.customizationRules.bigqueryPartitioning.integerRangePartition.end + - api_field: ruleSets.customizationRules.bigqueryPartitioning.integerRangePartition.interval + - api_field: ruleSets.customizationRules.bigqueryPartitioning.integerRangePartition.start + - api_field: ruleSets.customizationRules.bigqueryPartitioning.requirePartitionFilter + - api_field: ruleSets.customizationRules.bigqueryPartitioning.timeUnitPartition.column + - api_field: ruleSets.customizationRules.bigqueryPartitioning.timeUnitPartition.partitioningTimeGranularity + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.mongodbIdentifier.collection + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.mongodbIdentifier.database + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.mysqlIdentifier.database + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.mysqlIdentifier.table + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.oracleIdentifier.schema + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.oracleIdentifier.table + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.postgresqlIdentifier.schema + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.postgresqlIdentifier.table + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.salesforceIdentifier.objectName + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.sqlServerIdentifier.schema + - api_field: ruleSets.objectFilter.sourceObjectIdentifier.sqlServerIdentifier.table + - api_field: sourceConfig.mongodbSourceConfig.excludeObjects.databases.collections.collection + - api_field: sourceConfig.mongodbSourceConfig.excludeObjects.databases.collections.fields.field + - api_field: sourceConfig.mongodbSourceConfig.excludeObjects.databases.database + - api_field: sourceConfig.mongodbSourceConfig.includeObjects.databases.collections.collection + - api_field: sourceConfig.mongodbSourceConfig.includeObjects.databases.collections.fields.field + - api_field: sourceConfig.mongodbSourceConfig.includeObjects.databases.database + - api_field: sourceConfig.mongodbSourceConfig.maxConcurrentBackfillTasks + - api_field: sourceConfig.mysqlSourceConfig.binaryLogPosition + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.database + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.collation + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.column + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.dataType + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.length + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.nullable + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.ordinalPosition + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.mysqlColumns.primaryKey + - api_field: sourceConfig.mysqlSourceConfig.excludeObjects.mysqlDatabases.mysqlTables.table + - api_field: sourceConfig.mysqlSourceConfig.gtid + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.database + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.collation + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.column + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.dataType + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.length + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.nullable + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.ordinalPosition + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.mysqlColumns.primaryKey + - api_field: sourceConfig.mysqlSourceConfig.includeObjects.mysqlDatabases.mysqlTables.table + - api_field: sourceConfig.mysqlSourceConfig.maxConcurrentBackfillTasks + - api_field: sourceConfig.mysqlSourceConfig.maxConcurrentCdcTasks + - api_field: sourceConfig.oracleSourceConfig.dropLargeObjects + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.column + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.dataType + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.encoding + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.length + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.nullable + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.ordinalPosition + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.precision + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.primaryKey + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.oracleColumns.scale + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.oracleTables.table + - api_field: sourceConfig.oracleSourceConfig.excludeObjects.oracleSchemas.schema + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.column + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.dataType + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.encoding + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.length + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.nullable + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.ordinalPosition + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.precision + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.primaryKey + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.oracleColumns.scale + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.oracleTables.table + - api_field: sourceConfig.oracleSourceConfig.includeObjects.oracleSchemas.schema + - api_field: sourceConfig.oracleSourceConfig.maxConcurrentBackfillTasks + - api_field: sourceConfig.oracleSourceConfig.maxConcurrentCdcTasks + - api_field: sourceConfig.oracleSourceConfig.streamLargeObjects + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.column + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.dataType + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.length + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.nullable + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.ordinalPosition + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.precision + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.primaryKey + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.scale + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.postgresqlTables.table + - api_field: sourceConfig.postgresqlSourceConfig.excludeObjects.postgresqlSchemas.schema + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.column + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.dataType + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.length + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.nullable + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.ordinalPosition + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.precision + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.primaryKey + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.postgresqlColumns.scale + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.postgresqlTables.table + - api_field: sourceConfig.postgresqlSourceConfig.includeObjects.postgresqlSchemas.schema + - api_field: sourceConfig.postgresqlSourceConfig.maxConcurrentBackfillTasks + - api_field: sourceConfig.postgresqlSourceConfig.publication + - api_field: sourceConfig.postgresqlSourceConfig.replicationSlot + - api_field: sourceConfig.salesforceSourceConfig.excludeObjects.objects.fields.name + - api_field: sourceConfig.salesforceSourceConfig.excludeObjects.objects.objectName + - api_field: sourceConfig.salesforceSourceConfig.includeObjects.objects.fields.name + - api_field: sourceConfig.salesforceSourceConfig.includeObjects.objects.objectName + - api_field: sourceConfig.salesforceSourceConfig.pollingInterval + - api_field: sourceConfig.sourceConnectionProfile + - api_field: sourceConfig.sqlServerSourceConfig.changeTables + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.schema + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.column + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.dataType + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.length + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.nullable + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.ordinalPosition + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.precision + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.primaryKey + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.columns.scale + - api_field: sourceConfig.sqlServerSourceConfig.excludeObjects.schemas.tables.table + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.schema + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.column + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.dataType + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.length + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.nullable + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.ordinalPosition + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.precision + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.primaryKey + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.columns.scale + - api_field: sourceConfig.sqlServerSourceConfig.includeObjects.schemas.tables.table + - api_field: sourceConfig.sqlServerSourceConfig.maxConcurrentBackfillTasks + - api_field: sourceConfig.sqlServerSourceConfig.maxConcurrentCdcTasks + - api_field: sourceConfig.sqlServerSourceConfig.transactionLogs + - api_field: state + - field: stream_id + provider_only: true + - field: terraform_labels + provider_only: true diff --git a/google/services/deploymentmanager/resource_deployment_manager_deployment_generated_meta.yaml b/google/services/deploymentmanager/resource_deployment_manager_deployment_generated_meta.yaml index 40450774081..ebf08a9198f 100644 --- a/google/services/deploymentmanager/resource_deployment_manager_deployment_generated_meta.yaml +++ b/google/services/deploymentmanager/resource_deployment_manager_deployment_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_deployment_manager_deployment' -generation_type: 'mmv1' -source_file: 'products/deploymentmanager/Deployment.yaml' -api_service_name: 'deploymentmanager.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Deployment' +resource: google_deployment_manager_deployment +generation_type: mmv1 +source_file: products/deploymentmanager/Deployment.yaml +api_service_name: deploymentmanager.googleapis.com +api_version: v2 +api_resource_type_kind: Deployment fields: - - field: 'create_policy' - provider_only: true - - field: 'delete_policy' - provider_only: true - - api_field: 'id' - field: 'deployment_id' - - api_field: 'description' - - api_field: 'labels.key' - - api_field: 'labels.value' - - api_field: 'manifest' - - api_field: 'name' - - field: 'preview' - provider_only: true - - api_field: 'selfLink' - - api_field: 'target.config.content' - - api_field: 'target.imports.content' - - api_field: 'target.imports.name' + - field: create_policy + provider_only: true + - field: delete_policy + provider_only: true + - api_field: id + field: deployment_id + - api_field: description + - api_field: labels.key + - api_field: labels.value + - api_field: manifest + - api_field: name + - field: preview + provider_only: true + - api_field: selfLink + - api_field: target.config.content + - api_field: target.imports.content + - api_field: target.imports.name diff --git a/google/services/developerconnect/resource_developer_connect_account_connector_generated_meta.yaml b/google/services/developerconnect/resource_developer_connect_account_connector_generated_meta.yaml index 2781a90ff9f..bca6fd14b1f 100644 --- a/google/services/developerconnect/resource_developer_connect_account_connector_generated_meta.yaml +++ b/google/services/developerconnect/resource_developer_connect_account_connector_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_developer_connect_account_connector' -generation_type: 'mmv1' -source_file: 'products/developerconnect/AccountConnector.yaml' -api_service_name: 'developerconnect.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AccountConnector' +resource: google_developer_connect_account_connector +generation_type: mmv1 +source_file: products/developerconnect/AccountConnector.yaml +api_service_name: developerconnect.googleapis.com +api_version: v1 +api_resource_type_kind: AccountConnector autogen_status: true fields: - - field: 'account_connector_id' - provider_only: true - - api_field: 'annotations' - - api_field: 'createTime' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'oauthStartUri' - - api_field: 'providerOauthConfig.scopes' - - api_field: 'providerOauthConfig.systemProviderId' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: account_connector_id + provider_only: true + - api_field: annotations + - api_field: createTime + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: oauthStartUri + - api_field: providerOauthConfig.scopes + - api_field: providerOauthConfig.systemProviderId + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/developerconnect/resource_developer_connect_connection_generated_meta.yaml b/google/services/developerconnect/resource_developer_connect_connection_generated_meta.yaml index 294e7900eec..d03fbd1d8c7 100644 --- a/google/services/developerconnect/resource_developer_connect_connection_generated_meta.yaml +++ b/google/services/developerconnect/resource_developer_connect_connection_generated_meta.yaml @@ -1,76 +1,76 @@ -resource: 'google_developer_connect_connection' -generation_type: 'mmv1' -source_file: 'products/developerconnect/Connection.yaml' -api_service_name: 'developerconnect.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Connection' +resource: google_developer_connect_connection +generation_type: mmv1 +source_file: products/developerconnect/Connection.yaml +api_service_name: developerconnect.googleapis.com +api_version: v1 +api_resource_type_kind: Connection autogen_status: true fields: - - api_field: 'annotations' - - api_field: 'bitbucketCloudConfig.authorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketCloudConfig.authorizerCredential.username' - - api_field: 'bitbucketCloudConfig.readAuthorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketCloudConfig.readAuthorizerCredential.username' - - api_field: 'bitbucketCloudConfig.webhookSecretSecretVersion' - - api_field: 'bitbucketCloudConfig.workspace' - - api_field: 'bitbucketDataCenterConfig.authorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketDataCenterConfig.authorizerCredential.username' - - api_field: 'bitbucketDataCenterConfig.hostUri' - - api_field: 'bitbucketDataCenterConfig.readAuthorizerCredential.userTokenSecretVersion' - - api_field: 'bitbucketDataCenterConfig.readAuthorizerCredential.username' - - api_field: 'bitbucketDataCenterConfig.serverVersion' - - api_field: 'bitbucketDataCenterConfig.serviceDirectoryConfig.service' - - api_field: 'bitbucketDataCenterConfig.sslCaCertificate' - - api_field: 'bitbucketDataCenterConfig.webhookSecretSecretVersion' - - field: 'connection_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'cryptoKeyConfig.keyReference' - - api_field: 'deleteTime' - - api_field: 'disabled' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'githubConfig.appInstallationId' - - api_field: 'githubConfig.authorizerCredential.oauthTokenSecretVersion' - - api_field: 'githubConfig.authorizerCredential.username' - - api_field: 'githubConfig.githubApp' - - api_field: 'githubConfig.installationUri' - - api_field: 'githubEnterpriseConfig.appId' - - api_field: 'githubEnterpriseConfig.appInstallationId' - - api_field: 'githubEnterpriseConfig.appSlug' - - api_field: 'githubEnterpriseConfig.hostUri' - - api_field: 'githubEnterpriseConfig.installationUri' - - api_field: 'githubEnterpriseConfig.privateKeySecretVersion' - - api_field: 'githubEnterpriseConfig.serverVersion' - - api_field: 'githubEnterpriseConfig.serviceDirectoryConfig.service' - - api_field: 'githubEnterpriseConfig.sslCaCertificate' - - api_field: 'githubEnterpriseConfig.webhookSecretSecretVersion' - - api_field: 'gitlabConfig.authorizerCredential.userTokenSecretVersion' - - api_field: 'gitlabConfig.authorizerCredential.username' - - api_field: 'gitlabConfig.readAuthorizerCredential.userTokenSecretVersion' - - api_field: 'gitlabConfig.readAuthorizerCredential.username' - - api_field: 'gitlabConfig.webhookSecretSecretVersion' - - api_field: 'gitlabEnterpriseConfig.authorizerCredential.userTokenSecretVersion' - - api_field: 'gitlabEnterpriseConfig.authorizerCredential.username' - - api_field: 'gitlabEnterpriseConfig.hostUri' - - api_field: 'gitlabEnterpriseConfig.readAuthorizerCredential.userTokenSecretVersion' - - api_field: 'gitlabEnterpriseConfig.readAuthorizerCredential.username' - - api_field: 'gitlabEnterpriseConfig.serverVersion' - - api_field: 'gitlabEnterpriseConfig.serviceDirectoryConfig.service' - - api_field: 'gitlabEnterpriseConfig.sslCaCertificate' - - api_field: 'gitlabEnterpriseConfig.webhookSecretSecretVersion' - - api_field: 'installationState.actionUri' - - api_field: 'installationState.message' - - api_field: 'installationState.stage' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: bitbucketCloudConfig.authorizerCredential.userTokenSecretVersion + - api_field: bitbucketCloudConfig.authorizerCredential.username + - api_field: bitbucketCloudConfig.readAuthorizerCredential.userTokenSecretVersion + - api_field: bitbucketCloudConfig.readAuthorizerCredential.username + - api_field: bitbucketCloudConfig.webhookSecretSecretVersion + - api_field: bitbucketCloudConfig.workspace + - api_field: bitbucketDataCenterConfig.authorizerCredential.userTokenSecretVersion + - api_field: bitbucketDataCenterConfig.authorizerCredential.username + - api_field: bitbucketDataCenterConfig.hostUri + - api_field: bitbucketDataCenterConfig.readAuthorizerCredential.userTokenSecretVersion + - api_field: bitbucketDataCenterConfig.readAuthorizerCredential.username + - api_field: bitbucketDataCenterConfig.serverVersion + - api_field: bitbucketDataCenterConfig.serviceDirectoryConfig.service + - api_field: bitbucketDataCenterConfig.sslCaCertificate + - api_field: bitbucketDataCenterConfig.webhookSecretSecretVersion + - field: connection_id + provider_only: true + - api_field: createTime + - api_field: cryptoKeyConfig.keyReference + - api_field: deleteTime + - api_field: disabled + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: githubConfig.appInstallationId + - api_field: githubConfig.authorizerCredential.oauthTokenSecretVersion + - api_field: githubConfig.authorizerCredential.username + - api_field: githubConfig.githubApp + - api_field: githubConfig.installationUri + - api_field: githubEnterpriseConfig.appId + - api_field: githubEnterpriseConfig.appInstallationId + - api_field: githubEnterpriseConfig.appSlug + - api_field: githubEnterpriseConfig.hostUri + - api_field: githubEnterpriseConfig.installationUri + - api_field: githubEnterpriseConfig.privateKeySecretVersion + - api_field: githubEnterpriseConfig.serverVersion + - api_field: githubEnterpriseConfig.serviceDirectoryConfig.service + - api_field: githubEnterpriseConfig.sslCaCertificate + - api_field: githubEnterpriseConfig.webhookSecretSecretVersion + - api_field: gitlabConfig.authorizerCredential.userTokenSecretVersion + - api_field: gitlabConfig.authorizerCredential.username + - api_field: gitlabConfig.readAuthorizerCredential.userTokenSecretVersion + - api_field: gitlabConfig.readAuthorizerCredential.username + - api_field: gitlabConfig.webhookSecretSecretVersion + - api_field: gitlabEnterpriseConfig.authorizerCredential.userTokenSecretVersion + - api_field: gitlabEnterpriseConfig.authorizerCredential.username + - api_field: gitlabEnterpriseConfig.hostUri + - api_field: gitlabEnterpriseConfig.readAuthorizerCredential.userTokenSecretVersion + - api_field: gitlabEnterpriseConfig.readAuthorizerCredential.username + - api_field: gitlabEnterpriseConfig.serverVersion + - api_field: gitlabEnterpriseConfig.serviceDirectoryConfig.service + - api_field: gitlabEnterpriseConfig.sslCaCertificate + - api_field: gitlabEnterpriseConfig.webhookSecretSecretVersion + - api_field: installationState.actionUri + - api_field: installationState.message + - api_field: installationState.stage + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: reconciling + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/developerconnect/resource_developer_connect_git_repository_link_generated_meta.yaml b/google/services/developerconnect/resource_developer_connect_git_repository_link_generated_meta.yaml index d4d15ff2084..8d4bcca8292 100644 --- a/google/services/developerconnect/resource_developer_connect_git_repository_link_generated_meta.yaml +++ b/google/services/developerconnect/resource_developer_connect_git_repository_link_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_developer_connect_git_repository_link' -generation_type: 'mmv1' -source_file: 'products/developerconnect/GitRepositoryLink.yaml' -api_service_name: 'developerconnect.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GitRepositoryLink' +resource: google_developer_connect_git_repository_link +generation_type: mmv1 +source_file: products/developerconnect/GitRepositoryLink.yaml +api_service_name: developerconnect.googleapis.com +api_version: v1 +api_resource_type_kind: GitRepositoryLink autogen_status: true fields: - - api_field: 'annotations' - - api_field: 'cloneUri' - - api_field: 'createTime' - - api_field: 'deleteTime' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - field: 'git_repository_link_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent_connection' - provider_only: true - - api_field: 'reconciling' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: cloneUri + - api_field: createTime + - api_field: deleteTime + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - field: git_repository_link_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: parent_connection + provider_only: true + - api_field: reconciling + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/developerconnect/resource_developer_connect_insights_config_generated_meta.yaml b/google/services/developerconnect/resource_developer_connect_insights_config_generated_meta.yaml index 5f7b351daf5..ebb7e7f1948 100644 --- a/google/services/developerconnect/resource_developer_connect_insights_config_generated_meta.yaml +++ b/google/services/developerconnect/resource_developer_connect_insights_config_generated_meta.yaml @@ -1,40 +1,40 @@ -resource: 'google_developer_connect_insights_config' -generation_type: 'mmv1' -source_file: 'products/developerconnect/InsightsConfig.yaml' -api_service_name: 'developerconnect.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InsightsConfig' +resource: google_developer_connect_insights_config +generation_type: mmv1 +source_file: products/developerconnect/InsightsConfig.yaml +api_service_name: developerconnect.googleapis.com +api_version: v1 +api_resource_type_kind: InsightsConfig autogen_status: true fields: - - api_field: 'annotations' - - api_field: 'appHubApplication' - - api_field: 'artifactConfigs.googleArtifactAnalysis.projectId' - - api_field: 'artifactConfigs.googleArtifactRegistry.artifactRegistryPackage' - - api_field: 'artifactConfigs.googleArtifactRegistry.projectId' - - api_field: 'artifactConfigs.uri' - - api_field: 'createTime' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'errors.code' - - api_field: 'errors.details.detail_message' - - api_field: 'errors.message' - - field: 'insights_config_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - api_field: 'runtimeConfigs.appHubWorkload.criticality' - - api_field: 'runtimeConfigs.appHubWorkload.environment' - - api_field: 'runtimeConfigs.appHubWorkload.workload' - - api_field: 'runtimeConfigs.gkeWorkload.cluster' - - api_field: 'runtimeConfigs.gkeWorkload.deployment' - - api_field: 'runtimeConfigs.state' - - api_field: 'runtimeConfigs.uri' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: annotations + - api_field: appHubApplication + - api_field: artifactConfigs.googleArtifactAnalysis.projectId + - api_field: artifactConfigs.googleArtifactRegistry.artifactRegistryPackage + - api_field: artifactConfigs.googleArtifactRegistry.projectId + - api_field: artifactConfigs.uri + - api_field: createTime + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: errors.code + - api_field: errors.details.detail_message + - api_field: errors.message + - field: insights_config_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: reconciling + - api_field: runtimeConfigs.appHubWorkload.criticality + - api_field: runtimeConfigs.appHubWorkload.environment + - api_field: runtimeConfigs.appHubWorkload.workload + - api_field: runtimeConfigs.gkeWorkload.cluster + - api_field: runtimeConfigs.gkeWorkload.deployment + - api_field: runtimeConfigs.state + - api_field: runtimeConfigs.uri + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/dialogflow/resource_dialogflow_agent_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_agent_generated_meta.yaml index 68a75191dcf..e241c5c68d3 100644 --- a/google/services/dialogflow/resource_dialogflow_agent_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_agent_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_dialogflow_agent' -generation_type: 'mmv1' -source_file: 'products/dialogflow/Agent.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Agent' +resource: google_dialogflow_agent +generation_type: mmv1 +source_file: products/dialogflow/Agent.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: Agent fields: - - api_field: 'apiVersion' - - api_field: 'avatarUri' - - api_field: 'avatarUri' - field: 'avatar_uri_backend' - - api_field: 'classificationThreshold' - - api_field: 'defaultLanguageCode' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'enableLogging' - - api_field: 'matchMode' - - api_field: 'supportedLanguageCodes' - - api_field: 'tier' - - api_field: 'timeZone' + - api_field: apiVersion + - api_field: avatarUri + - api_field: avatarUri + field: avatar_uri_backend + - api_field: classificationThreshold + - api_field: defaultLanguageCode + - api_field: description + - api_field: displayName + - api_field: enableLogging + - api_field: matchMode + - api_field: supportedLanguageCodes + - api_field: tier + - api_field: timeZone diff --git a/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_meta.yaml index 50baba0c5a5..90bd3f7d407 100644 --- a/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_meta.yaml @@ -1,87 +1,87 @@ -resource: 'google_dialogflow_conversation_profile' -generation_type: 'mmv1' -source_file: 'products/dialogflow/ConversationProfile.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'ConversationProfile' +resource: google_dialogflow_conversation_profile +generation_type: mmv1 +source_file: products/dialogflow/ConversationProfile.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: ConversationProfile fields: - - api_field: 'automatedAgentConfig.agent' - - api_field: 'automatedAgentConfig.sessionTtl' - - api_field: 'displayName' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.disableHighLatencyFeaturesSyncDelivery' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.conversationModelConfig.baselineModelVersion' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.conversationModelConfig.model' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.conversationProcessConfig.recentSentencesCount' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.disableAgentQueryLogging' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableConversationAugmentedQuery' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableEventBasedSuggestion' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableQuerySuggestionOnly' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableQuerySuggestionWhenNoAnswer' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.confidenceThreshold' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropHandoffMessages' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropIvrMessages' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropVirtualAgentMessages' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.agent' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.humanAgentSideConfig.agent' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.documentQuerySource.documents' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.knowledgeBaseQuerySource.knowledgeBases' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.maxResults' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.sections.sectionTypes' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.suggestionFeature.type' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.suggestionTriggerSettings.noSmallTalk' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.suggestionTriggerSettings.onlyEndUser' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.generators' - - api_field: 'humanAgentAssistantConfig.endUserSuggestionConfig.groupSuggestionResponses' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.disableHighLatencyFeaturesSyncDelivery' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.conversationModelConfig.baselineModelVersion' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.conversationModelConfig.model' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.conversationProcessConfig.recentSentencesCount' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.disableAgentQueryLogging' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableConversationAugmentedQuery' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableEventBasedSuggestion' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableQuerySuggestionOnly' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableQuerySuggestionWhenNoAnswer' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.confidenceThreshold' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropHandoffMessages' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropIvrMessages' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropVirtualAgentMessages' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.agent' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.humanAgentSideConfig.agent' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.maxResults' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.sections.sectionTypes' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.suggestionFeature.type' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.suggestionTriggerSettings.noSmallTalk' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.suggestionTriggerSettings.onlyEndUser' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.generators' - - api_field: 'humanAgentAssistantConfig.humanAgentSuggestionConfig.groupSuggestionResponses' - - api_field: 'humanAgentAssistantConfig.messageAnalysisConfig.enableEntityExtraction' - - api_field: 'humanAgentAssistantConfig.messageAnalysisConfig.enableSentimentAnalysis' - - api_field: 'humanAgentAssistantConfig.notificationConfig.messageFormat' - - api_field: 'humanAgentAssistantConfig.notificationConfig.topic' - - api_field: 'humanAgentHandoffConfig.livePersonConfig.accountNumber' - - api_field: 'languageCode' - - field: 'location' - provider_only: true - - api_field: 'loggingConfig.enableStackdriverLogging' - - api_field: 'name' - - api_field: 'newMessageEventNotificationConfig.messageFormat' - - api_field: 'newMessageEventNotificationConfig.topic' - - api_field: 'newRecognitionResultNotificationConfig.messageFormat' - - api_field: 'newRecognitionResultNotificationConfig.topic' - - api_field: 'notificationConfig.messageFormat' - - api_field: 'notificationConfig.topic' - - api_field: 'securitySettings' - - api_field: 'sttConfig.audioEncoding' - - api_field: 'sttConfig.enableWordInfo' - - api_field: 'sttConfig.languageCode' - - api_field: 'sttConfig.model' - - api_field: 'sttConfig.sampleRateHertz' - - api_field: 'sttConfig.speechModelVariant' - - api_field: 'sttConfig.useTimeoutBasedEndpointing' - - api_field: 'timeZone' - - api_field: 'ttsConfig.effectsProfileId' - - api_field: 'ttsConfig.pitch' - - api_field: 'ttsConfig.speakingRate' - - api_field: 'ttsConfig.voice.name' - - api_field: 'ttsConfig.voice.ssmlGender' - - api_field: 'ttsConfig.volumeGainDb' + - api_field: automatedAgentConfig.agent + - api_field: automatedAgentConfig.sessionTtl + - api_field: displayName + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.disableHighLatencyFeaturesSyncDelivery + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.conversationModelConfig.baselineModelVersion + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.conversationModelConfig.model + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.conversationProcessConfig.recentSentencesCount + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.disableAgentQueryLogging + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableConversationAugmentedQuery + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableEventBasedSuggestion + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableQuerySuggestionOnly + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.enableQuerySuggestionWhenNoAnswer + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.confidenceThreshold + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropHandoffMessages + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropIvrMessages + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropVirtualAgentMessages + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.agent + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.humanAgentSideConfig.agent + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.documentQuerySource.documents + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.knowledgeBaseQuerySource.knowledgeBases + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.maxResults + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.queryConfig.sections.sectionTypes + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.suggestionFeature.type + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.suggestionTriggerSettings.noSmallTalk + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.featureConfigs.suggestionTriggerSettings.onlyEndUser + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.generators + - api_field: humanAgentAssistantConfig.endUserSuggestionConfig.groupSuggestionResponses + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.disableHighLatencyFeaturesSyncDelivery + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.conversationModelConfig.baselineModelVersion + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.conversationModelConfig.model + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.conversationProcessConfig.recentSentencesCount + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.disableAgentQueryLogging + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableConversationAugmentedQuery + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableEventBasedSuggestion + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableQuerySuggestionOnly + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.enableQuerySuggestionWhenNoAnswer + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.confidenceThreshold + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropHandoffMessages + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropIvrMessages + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.contextFilterSettings.dropVirtualAgentMessages + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.agent + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.dialogflowQuerySource.humanAgentSideConfig.agent + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.maxResults + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.queryConfig.sections.sectionTypes + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.suggestionFeature.type + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.suggestionTriggerSettings.noSmallTalk + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.featureConfigs.suggestionTriggerSettings.onlyEndUser + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.generators + - api_field: humanAgentAssistantConfig.humanAgentSuggestionConfig.groupSuggestionResponses + - api_field: humanAgentAssistantConfig.messageAnalysisConfig.enableEntityExtraction + - api_field: humanAgentAssistantConfig.messageAnalysisConfig.enableSentimentAnalysis + - api_field: humanAgentAssistantConfig.notificationConfig.messageFormat + - api_field: humanAgentAssistantConfig.notificationConfig.topic + - api_field: humanAgentHandoffConfig.livePersonConfig.accountNumber + - api_field: languageCode + - field: location + provider_only: true + - api_field: loggingConfig.enableStackdriverLogging + - api_field: name + - api_field: newMessageEventNotificationConfig.messageFormat + - api_field: newMessageEventNotificationConfig.topic + - api_field: newRecognitionResultNotificationConfig.messageFormat + - api_field: newRecognitionResultNotificationConfig.topic + - api_field: notificationConfig.messageFormat + - api_field: notificationConfig.topic + - api_field: securitySettings + - api_field: sttConfig.audioEncoding + - api_field: sttConfig.enableWordInfo + - api_field: sttConfig.languageCode + - api_field: sttConfig.model + - api_field: sttConfig.sampleRateHertz + - api_field: sttConfig.speechModelVariant + - api_field: sttConfig.useTimeoutBasedEndpointing + - api_field: timeZone + - api_field: ttsConfig.effectsProfileId + - api_field: ttsConfig.pitch + - api_field: ttsConfig.speakingRate + - api_field: ttsConfig.voice.name + - api_field: ttsConfig.voice.ssmlGender + - api_field: ttsConfig.volumeGainDb diff --git a/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_test.go b/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_test.go index b34c637a9ec..4021d686774 100644 --- a/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_test.go +++ b/google/services/dialogflow/resource_dialogflow_conversation_profile_generated_test.go @@ -85,7 +85,7 @@ func testAccDialogflowConversationProfile_dialogflowConversationProfileBasicExam return acctest.Nprintf(` resource "google_dialogflow_agent" "basic_agent" { display_name = "example_agent" - default_language_code = "en-us" + default_language_code = "en" time_zone = "America/New_York" } resource "google_dialogflow_conversation_profile" "basic_profile" { diff --git a/google/services/dialogflow/resource_dialogflow_conversation_profile_test.go b/google/services/dialogflow/resource_dialogflow_conversation_profile_test.go index 241a7fa15fb..ce8379ca641 100644 --- a/google/services/dialogflow/resource_dialogflow_conversation_profile_test.go +++ b/google/services/dialogflow/resource_dialogflow_conversation_profile_test.go @@ -136,7 +136,7 @@ func testAccDialogflowConversationProfile_dialogflowAgentFull1(context map[strin resource "google_dialogflow_agent" "agent" { display_name = "tf-test-agent-%{random_suffix}" - default_language_code = "en-us" + default_language_code = "en" time_zone = "America/New_York" project = google_project.agent_project.name } @@ -319,7 +319,7 @@ func testAccDialogflowConversationProfile_dialogflowAgentFull2(context map[strin resource "google_dialogflow_agent" "agent" { display_name = "tf-test-agent-%{random_suffix}" - default_language_code = "en-us" + default_language_code = "en" time_zone = "America/New_York" project = google_project.agent_project.name } @@ -483,7 +483,7 @@ func testAccDialogflowConversationProfile_dialogflowRegional(context map[string] resource "google_dialogflow_agent" "agent" { display_name = "tf-test-agent-%{random_suffix}" - default_language_code = "en-us" + default_language_code = "en" time_zone = "America/New_York" project = google_project.agent_project.name } diff --git a/google/services/dialogflow/resource_dialogflow_encryption_spec_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_encryption_spec_generated_meta.yaml index dac12a3dbf9..914ed6ca6c2 100644 --- a/google/services/dialogflow/resource_dialogflow_encryption_spec_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_encryption_spec_generated_meta.yaml @@ -1,9 +1,9 @@ -resource: 'google_dialogflow_encryption_spec' -generation_type: 'mmv1' -source_file: 'products/dialogflow/EncryptionSpec.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'EncryptionSpec' +resource: google_dialogflow_encryption_spec +generation_type: mmv1 +source_file: products/dialogflow/EncryptionSpec.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: EncryptionSpec fields: - - api_field: 'encryptionSpec.kmsKey' - - api_field: 'location' + - api_field: encryptionSpec.kmsKey + - api_field: location diff --git a/google/services/dialogflow/resource_dialogflow_entity_type_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_entity_type_generated_meta.yaml index 6272a2a2006..f5d4136345e 100644 --- a/google/services/dialogflow/resource_dialogflow_entity_type_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_entity_type_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_dialogflow_entity_type' -generation_type: 'mmv1' -source_file: 'products/dialogflow/EntityType.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'EntityType' +resource: google_dialogflow_entity_type +generation_type: mmv1 +source_file: products/dialogflow/EntityType.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: EntityType fields: - - api_field: 'displayName' - - api_field: 'enableFuzzyExtraction' - - api_field: 'entities.synonyms' - - api_field: 'entities.value' - - api_field: 'kind' - - api_field: 'name' + - api_field: displayName + - api_field: enableFuzzyExtraction + - api_field: entities.synonyms + - api_field: entities.value + - api_field: kind + - api_field: name diff --git a/google/services/dialogflow/resource_dialogflow_fulfillment_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_fulfillment_generated_meta.yaml index c23896f7847..18c4ec07980 100644 --- a/google/services/dialogflow/resource_dialogflow_fulfillment_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_fulfillment_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_dialogflow_fulfillment' -generation_type: 'mmv1' -source_file: 'products/dialogflow/Fulfillment.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Fulfillment' +resource: google_dialogflow_fulfillment +generation_type: mmv1 +source_file: products/dialogflow/Fulfillment.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: Fulfillment fields: - - api_field: 'displayName' - - api_field: 'enabled' - - api_field: 'features.type' - - api_field: 'genericWebService.password' - - api_field: 'genericWebService.requestHeaders' - - api_field: 'genericWebService.uri' - - api_field: 'genericWebService.username' - - api_field: 'name' + - api_field: displayName + - api_field: enabled + - api_field: features.type + - api_field: genericWebService.password + - api_field: genericWebService.requestHeaders + - api_field: genericWebService.uri + - api_field: genericWebService.username + - api_field: name diff --git a/google/services/dialogflow/resource_dialogflow_generator_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_generator_generated_meta.yaml index 5b7f8e4975f..e6a518d2122 100644 --- a/google/services/dialogflow/resource_dialogflow_generator_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_generator_generated_meta.yaml @@ -1,33 +1,33 @@ -resource: 'google_dialogflow_generator' -generation_type: 'mmv1' -source_file: 'products/dialogflow/Generator.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Generator' +resource: google_dialogflow_generator +generation_type: mmv1 +source_file: products/dialogflow/Generator.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: Generator fields: - - api_field: 'description' - - api_field: 'generatorId' - - api_field: 'inferenceParameter.maxOutputTokens' - - api_field: 'inferenceParameter.temperature' - - api_field: 'inferenceParameter.topK' - - api_field: 'inferenceParameter.topP' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'publishedModel' - - api_field: 'summarizationContext.fewShotExamples.conversationContext.messageEntries.createTime' - - api_field: 'summarizationContext.fewShotExamples.conversationContext.messageEntries.languageCode' - - api_field: 'summarizationContext.fewShotExamples.conversationContext.messageEntries.role' - - api_field: 'summarizationContext.fewShotExamples.conversationContext.messageEntries.text' - - api_field: 'summarizationContext.fewShotExamples.extraInfo' - - api_field: 'summarizationContext.fewShotExamples.output.summarySuggestion.summarySections.section' - - api_field: 'summarizationContext.fewShotExamples.output.summarySuggestion.summarySections.summary' - - api_field: 'summarizationContext.fewShotExamples.summarizationSectionList.summarizationSections.definition' - - api_field: 'summarizationContext.fewShotExamples.summarizationSectionList.summarizationSections.key' - - api_field: 'summarizationContext.fewShotExamples.summarizationSectionList.summarizationSections.type' - - api_field: 'summarizationContext.outputLanguageCode' - - api_field: 'summarizationContext.summarizationSections.definition' - - api_field: 'summarizationContext.summarizationSections.key' - - api_field: 'summarizationContext.summarizationSections.type' - - api_field: 'summarizationContext.version' - - api_field: 'triggerEvent' + - api_field: description + - api_field: generatorId + - api_field: inferenceParameter.maxOutputTokens + - api_field: inferenceParameter.temperature + - api_field: inferenceParameter.topK + - api_field: inferenceParameter.topP + - field: location + provider_only: true + - api_field: name + - api_field: publishedModel + - api_field: summarizationContext.fewShotExamples.conversationContext.messageEntries.createTime + - api_field: summarizationContext.fewShotExamples.conversationContext.messageEntries.languageCode + - api_field: summarizationContext.fewShotExamples.conversationContext.messageEntries.role + - api_field: summarizationContext.fewShotExamples.conversationContext.messageEntries.text + - api_field: summarizationContext.fewShotExamples.extraInfo + - api_field: summarizationContext.fewShotExamples.output.summarySuggestion.summarySections.section + - api_field: summarizationContext.fewShotExamples.output.summarySuggestion.summarySections.summary + - api_field: summarizationContext.fewShotExamples.summarizationSectionList.summarizationSections.definition + - api_field: summarizationContext.fewShotExamples.summarizationSectionList.summarizationSections.key + - api_field: summarizationContext.fewShotExamples.summarizationSectionList.summarizationSections.type + - api_field: summarizationContext.outputLanguageCode + - api_field: summarizationContext.summarizationSections.definition + - api_field: summarizationContext.summarizationSections.key + - api_field: summarizationContext.summarizationSections.type + - api_field: summarizationContext.version + - api_field: triggerEvent diff --git a/google/services/dialogflow/resource_dialogflow_intent_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_intent_generated_meta.yaml index 0f0f8a30e07..550f5e41a8c 100644 --- a/google/services/dialogflow/resource_dialogflow_intent_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_intent_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_dialogflow_intent' -generation_type: 'mmv1' -source_file: 'products/dialogflow/Intent.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Intent' +resource: google_dialogflow_intent +generation_type: mmv1 +source_file: products/dialogflow/Intent.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: Intent fields: - - api_field: 'action' - - api_field: 'defaultResponsePlatforms' - - api_field: 'displayName' - - api_field: 'events' - - api_field: 'followupIntentInfo.followupIntentName' - - api_field: 'followupIntentInfo.parentFollowupIntentName' - - api_field: 'inputContextNames' - - api_field: 'isFallback' - - api_field: 'mlDisabled' - - api_field: 'name' - - api_field: 'parentFollowupIntentName' - - api_field: 'priority' - - api_field: 'resetContexts' - - api_field: 'rootFollowupIntentName' - - api_field: 'webhookState' + - api_field: action + - api_field: defaultResponsePlatforms + - api_field: displayName + - api_field: events + - api_field: followupIntentInfo.followupIntentName + - api_field: followupIntentInfo.parentFollowupIntentName + - api_field: inputContextNames + - api_field: isFallback + - api_field: mlDisabled + - api_field: name + - api_field: parentFollowupIntentName + - api_field: priority + - api_field: resetContexts + - api_field: rootFollowupIntentName + - api_field: webhookState diff --git a/google/services/dialogflow/resource_dialogflow_version_generated_meta.yaml b/google/services/dialogflow/resource_dialogflow_version_generated_meta.yaml index 3e82dee015e..e1c3e1367d4 100644 --- a/google/services/dialogflow/resource_dialogflow_version_generated_meta.yaml +++ b/google/services/dialogflow/resource_dialogflow_version_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_dialogflow_version' -generation_type: 'mmv1' -source_file: 'products/dialogflow/version.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Version' +resource: google_dialogflow_version +generation_type: mmv1 +source_file: products/dialogflow/version.yaml +api_service_name: dialogflow.googleapis.com +api_version: v2 +api_resource_type_kind: Version fields: - - api_field: 'description' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'status' - - api_field: 'versionNumber' + - api_field: description + - api_field: name + - field: parent + provider_only: true + - api_field: status + - api_field: versionNumber diff --git a/google/services/dialogflow/resource_dialogflow_version_generated_test.go b/google/services/dialogflow/resource_dialogflow_version_generated_test.go index 1e5b1347882..89cf0ea0de8 100644 --- a/google/services/dialogflow/resource_dialogflow_version_generated_test.go +++ b/google/services/dialogflow/resource_dialogflow_version_generated_test.go @@ -112,7 +112,7 @@ resource "google_project_service_identity" "gcp_sa" { } resource "google_dialogflow_agent" "basic_agent" { display_name = "example_agent" - default_language_code = "en-us" + default_language_code = "en" time_zone = "America/New_York" project = google_project.project.project_id depends_on = [time_sleep.wait_enable_service_api] diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_agent_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_agent_generated_meta.yaml index e8e05f62312..57d333332d7 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_agent_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_agent_generated_meta.yaml @@ -1,53 +1,53 @@ -resource: 'google_dialogflow_cx_agent' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Agent.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Agent' +resource: google_dialogflow_cx_agent +generation_type: mmv1 +source_file: products/dialogflowcx/Agent.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Agent fields: - - api_field: 'advancedSettings.audioExportGcsDestination.uri' - - api_field: 'advancedSettings.dtmfSettings.enabled' - - api_field: 'advancedSettings.dtmfSettings.finishDigit' - - api_field: 'advancedSettings.dtmfSettings.maxDigits' - - api_field: 'advancedSettings.loggingSettings.enableConsentBasedRedaction' - - api_field: 'advancedSettings.loggingSettings.enableInteractionLogging' - - api_field: 'advancedSettings.loggingSettings.enableStackdriverLogging' - - api_field: 'advancedSettings.speechSettings.endpointerSensitivity' - - api_field: 'advancedSettings.speechSettings.models' - - api_field: 'advancedSettings.speechSettings.noSpeechTimeout' - - api_field: 'advancedSettings.speechSettings.useTimeoutBasedEndpointing' - - api_field: 'answerFeedbackSettings.enableAnswerFeedback' - - api_field: 'avatarUri' - - api_field: 'clientCertificateSettings.passphrase' - - api_field: 'clientCertificateSettings.privateKey' - - api_field: 'clientCertificateSettings.sslCertificate' - - api_field: 'defaultLanguageCode' - - field: 'delete_chat_engine_on_destroy' - provider_only: true - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'enableMultiLanguageTraining' - - api_field: 'enableSpellCorrection' - - api_field: 'enableStackdriverLogging' - - api_field: 'genAppBuilderSettings.engine' - - api_field: 'gitIntegrationSettings.githubSettings.accessToken' - - api_field: 'gitIntegrationSettings.githubSettings.branches' - - api_field: 'gitIntegrationSettings.githubSettings.displayName' - - api_field: 'gitIntegrationSettings.githubSettings.repositoryUri' - - api_field: 'gitIntegrationSettings.githubSettings.trackingBranch' - - field: 'location' - provider_only: true - - api_field: 'locked' - - api_field: 'name' - - api_field: 'personalizationSettings.defaultEndUserMetadata' - json: true - - api_field: 'satisfiesPzi' - - api_field: 'satisfiesPzs' - - api_field: 'securitySettings' - - api_field: 'speechToTextSettings.enableSpeechAdaptation' - - api_field: 'startFlow' - - api_field: 'startPlaybook' - - api_field: 'supportedLanguageCodes' - - api_field: 'textToSpeechSettings.synthesizeSpeechConfigs' - json: true - - api_field: 'timeZone' + - api_field: advancedSettings.audioExportGcsDestination.uri + - api_field: advancedSettings.dtmfSettings.enabled + - api_field: advancedSettings.dtmfSettings.finishDigit + - api_field: advancedSettings.dtmfSettings.maxDigits + - api_field: advancedSettings.loggingSettings.enableConsentBasedRedaction + - api_field: advancedSettings.loggingSettings.enableInteractionLogging + - api_field: advancedSettings.loggingSettings.enableStackdriverLogging + - api_field: advancedSettings.speechSettings.endpointerSensitivity + - api_field: advancedSettings.speechSettings.models + - api_field: advancedSettings.speechSettings.noSpeechTimeout + - api_field: advancedSettings.speechSettings.useTimeoutBasedEndpointing + - api_field: answerFeedbackSettings.enableAnswerFeedback + - api_field: avatarUri + - api_field: clientCertificateSettings.passphrase + - api_field: clientCertificateSettings.privateKey + - api_field: clientCertificateSettings.sslCertificate + - api_field: defaultLanguageCode + - field: delete_chat_engine_on_destroy + provider_only: true + - api_field: description + - api_field: displayName + - api_field: enableMultiLanguageTraining + - api_field: enableSpellCorrection + - api_field: enableStackdriverLogging + - api_field: genAppBuilderSettings.engine + - api_field: gitIntegrationSettings.githubSettings.accessToken + - api_field: gitIntegrationSettings.githubSettings.branches + - api_field: gitIntegrationSettings.githubSettings.displayName + - api_field: gitIntegrationSettings.githubSettings.repositoryUri + - api_field: gitIntegrationSettings.githubSettings.trackingBranch + - field: location + provider_only: true + - api_field: locked + - api_field: name + - api_field: personalizationSettings.defaultEndUserMetadata + json: true + - api_field: satisfiesPzi + - api_field: satisfiesPzs + - api_field: securitySettings + - api_field: speechToTextSettings.enableSpeechAdaptation + - api_field: startFlow + - api_field: startPlaybook + - api_field: supportedLanguageCodes + - api_field: textToSpeechSettings.synthesizeSpeechConfigs + json: true + - api_field: timeZone diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_entity_type_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_entity_type_generated_meta.yaml index 09521681b62..75a73f5747a 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_entity_type_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_entity_type_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_dialogflow_cx_entity_type' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/EntityType.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'EntityType' +resource: google_dialogflow_cx_entity_type +generation_type: mmv1 +source_file: products/dialogflowcx/EntityType.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: EntityType fields: - - api_field: 'autoExpansionMode' - - api_field: 'displayName' - - api_field: 'enableFuzzyExtraction' - - api_field: 'entities.synonyms' - - api_field: 'entities.value' - - api_field: 'excludedPhrases.value' - - api_field: 'kind' - - field: 'language_code' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'redact' + - api_field: autoExpansionMode + - api_field: displayName + - api_field: enableFuzzyExtraction + - api_field: entities.synonyms + - api_field: entities.value + - api_field: excludedPhrases.value + - api_field: kind + - field: language_code + provider_only: true + - api_field: name + - field: parent + provider_only: true + - api_field: redact diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_environment_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_environment_generated_meta.yaml index 56ce8b0d9ce..e882959f9f0 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_environment_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_environment_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_dialogflow_cx_environment' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Environment.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Environment' +resource: google_dialogflow_cx_environment +generation_type: mmv1 +source_file: products/dialogflowcx/Environment.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Environment fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'updateTime' - - api_field: 'versionConfigs.version' + - api_field: description + - api_field: displayName + - api_field: name + - field: parent + provider_only: true + - api_field: updateTime + - api_field: versionConfigs.version diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_flow_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_flow_generated_meta.yaml index 8962f7c84a0..033957eb86f 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_flow_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_flow_generated_meta.yaml @@ -1,133 +1,133 @@ -resource: 'google_dialogflow_cx_flow' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Flow.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Flow' +resource: google_dialogflow_cx_flow +generation_type: mmv1 +source_file: products/dialogflowcx/Flow.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Flow fields: - - api_field: 'advancedSettings.audioExportGcsDestination.uri' - - api_field: 'advancedSettings.dtmfSettings.enabled' - - api_field: 'advancedSettings.dtmfSettings.finishDigit' - - api_field: 'advancedSettings.dtmfSettings.maxDigits' - - api_field: 'advancedSettings.loggingSettings.enableConsentBasedRedaction' - - api_field: 'advancedSettings.loggingSettings.enableInteractionLogging' - - api_field: 'advancedSettings.loggingSettings.enableStackdriverLogging' - - api_field: 'advancedSettings.speechSettings.endpointerSensitivity' - - api_field: 'advancedSettings.speechSettings.models' - - api_field: 'advancedSettings.speechSettings.noSpeechTimeout' - - api_field: 'advancedSettings.speechSettings.useTimeoutBasedEndpointing' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'eventHandlers.event' - - api_field: 'eventHandlers.name' - - api_field: 'eventHandlers.targetFlow' - - api_field: 'eventHandlers.targetPage' - - api_field: 'eventHandlers.triggerFulfillment.conditionalCases.cases' - json: true - - api_field: 'eventHandlers.triggerFulfillment.enableGenerativeFallback' - - api_field: 'eventHandlers.triggerFulfillment.messages.channel' - - api_field: 'eventHandlers.triggerFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'eventHandlers.triggerFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'eventHandlers.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'eventHandlers.triggerFulfillment.messages.outputAudioText.ssml' - - api_field: 'eventHandlers.triggerFulfillment.messages.outputAudioText.text' - - api_field: 'eventHandlers.triggerFulfillment.messages.payload' - json: true - - api_field: 'eventHandlers.triggerFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'eventHandlers.triggerFulfillment.messages.playAudio.audioUri' - - api_field: 'eventHandlers.triggerFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'eventHandlers.triggerFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'eventHandlers.triggerFulfillment.messages.text.text' - - api_field: 'eventHandlers.triggerFulfillment.returnPartialResponses' - - api_field: 'eventHandlers.triggerFulfillment.setParameterActions.parameter' - - api_field: 'eventHandlers.triggerFulfillment.setParameterActions.value' - json: true - - api_field: 'eventHandlers.triggerFulfillment.tag' - - api_field: 'eventHandlers.triggerFulfillment.webhook' - - field: 'is_default_start_flow' - provider_only: true - - api_field: 'knowledgeConnectorSettings.dataStoreConnections.dataStore' - - api_field: 'knowledgeConnectorSettings.dataStoreConnections.dataStoreType' - - api_field: 'knowledgeConnectorSettings.dataStoreConnections.documentProcessingMode' - - api_field: 'knowledgeConnectorSettings.enabled' - - api_field: 'knowledgeConnectorSettings.targetFlow' - - api_field: 'knowledgeConnectorSettings.targetPage' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.enabled' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.endpointingTimeoutDuration' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.finishDigit' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.interdigitTimeoutDuration' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.maxDigits' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableConsentBasedRedaction' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableInteractionLogging' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableStackdriverLogging' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.endpointerSensitivity' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.models' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.noSpeechTimeout' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.useTimeoutBasedEndpointing' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.conditionalCases.cases' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.enableGenerativeFallback' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.channel' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.endInteraction' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.knowledgeInfoCard' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.audio' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.uri' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.ssml' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.text' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.payload' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.audioUri' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.text.text' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.returnPartialResponses' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.setParameterActions.parameter' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.setParameterActions.value' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.tag' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.webhook' - - api_field: 'languageCode' - - api_field: 'name' - - api_field: 'nluSettings.classificationThreshold' - - api_field: 'nluSettings.modelTrainingMode' - - api_field: 'nluSettings.modelType' - - field: 'parent' - provider_only: true - - api_field: 'transitionRouteGroups' - - api_field: 'transitionRoutes.condition' - - api_field: 'transitionRoutes.intent' - - api_field: 'transitionRoutes.name' - - api_field: 'transitionRoutes.targetFlow' - - api_field: 'transitionRoutes.targetPage' - - api_field: 'transitionRoutes.triggerFulfillment.conditionalCases.cases' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.channel' - - api_field: 'transitionRoutes.triggerFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'transitionRoutes.triggerFulfillment.messages.outputAudioText.ssml' - - api_field: 'transitionRoutes.triggerFulfillment.messages.outputAudioText.text' - - api_field: 'transitionRoutes.triggerFulfillment.messages.payload' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'transitionRoutes.triggerFulfillment.messages.playAudio.audioUri' - - api_field: 'transitionRoutes.triggerFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'transitionRoutes.triggerFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'transitionRoutes.triggerFulfillment.messages.text.text' - - api_field: 'transitionRoutes.triggerFulfillment.returnPartialResponses' - - api_field: 'transitionRoutes.triggerFulfillment.setParameterActions.parameter' - - api_field: 'transitionRoutes.triggerFulfillment.setParameterActions.value' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.tag' - - api_field: 'transitionRoutes.triggerFulfillment.webhook' + - api_field: advancedSettings.audioExportGcsDestination.uri + - api_field: advancedSettings.dtmfSettings.enabled + - api_field: advancedSettings.dtmfSettings.finishDigit + - api_field: advancedSettings.dtmfSettings.maxDigits + - api_field: advancedSettings.loggingSettings.enableConsentBasedRedaction + - api_field: advancedSettings.loggingSettings.enableInteractionLogging + - api_field: advancedSettings.loggingSettings.enableStackdriverLogging + - api_field: advancedSettings.speechSettings.endpointerSensitivity + - api_field: advancedSettings.speechSettings.models + - api_field: advancedSettings.speechSettings.noSpeechTimeout + - api_field: advancedSettings.speechSettings.useTimeoutBasedEndpointing + - api_field: description + - api_field: displayName + - api_field: eventHandlers.event + - api_field: eventHandlers.name + - api_field: eventHandlers.targetFlow + - api_field: eventHandlers.targetPage + - api_field: eventHandlers.triggerFulfillment.conditionalCases.cases + json: true + - api_field: eventHandlers.triggerFulfillment.enableGenerativeFallback + - api_field: eventHandlers.triggerFulfillment.messages.channel + - api_field: eventHandlers.triggerFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: eventHandlers.triggerFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: eventHandlers.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: eventHandlers.triggerFulfillment.messages.outputAudioText.ssml + - api_field: eventHandlers.triggerFulfillment.messages.outputAudioText.text + - api_field: eventHandlers.triggerFulfillment.messages.payload + json: true + - api_field: eventHandlers.triggerFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: eventHandlers.triggerFulfillment.messages.playAudio.audioUri + - api_field: eventHandlers.triggerFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: eventHandlers.triggerFulfillment.messages.text.allowPlaybackInterruption + - api_field: eventHandlers.triggerFulfillment.messages.text.text + - api_field: eventHandlers.triggerFulfillment.returnPartialResponses + - api_field: eventHandlers.triggerFulfillment.setParameterActions.parameter + - api_field: eventHandlers.triggerFulfillment.setParameterActions.value + json: true + - api_field: eventHandlers.triggerFulfillment.tag + - api_field: eventHandlers.triggerFulfillment.webhook + - field: is_default_start_flow + provider_only: true + - api_field: knowledgeConnectorSettings.dataStoreConnections.dataStore + - api_field: knowledgeConnectorSettings.dataStoreConnections.dataStoreType + - api_field: knowledgeConnectorSettings.dataStoreConnections.documentProcessingMode + - api_field: knowledgeConnectorSettings.enabled + - api_field: knowledgeConnectorSettings.targetFlow + - api_field: knowledgeConnectorSettings.targetPage + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.enabled + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.endpointingTimeoutDuration + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.finishDigit + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.interdigitTimeoutDuration + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.maxDigits + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableConsentBasedRedaction + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableInteractionLogging + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableStackdriverLogging + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.endpointerSensitivity + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.models + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.noSpeechTimeout + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.useTimeoutBasedEndpointing + - api_field: knowledgeConnectorSettings.triggerFulfillment.conditionalCases.cases + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.enableGenerativeFallback + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.channel + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.endInteraction + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.knowledgeInfoCard + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.audio + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.uri + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.ssml + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.text + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.payload + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.audioUri + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.text.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.text.text + - api_field: knowledgeConnectorSettings.triggerFulfillment.returnPartialResponses + - api_field: knowledgeConnectorSettings.triggerFulfillment.setParameterActions.parameter + - api_field: knowledgeConnectorSettings.triggerFulfillment.setParameterActions.value + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.tag + - api_field: knowledgeConnectorSettings.triggerFulfillment.webhook + - api_field: languageCode + - api_field: name + - api_field: nluSettings.classificationThreshold + - api_field: nluSettings.modelTrainingMode + - api_field: nluSettings.modelType + - field: parent + provider_only: true + - api_field: transitionRouteGroups + - api_field: transitionRoutes.condition + - api_field: transitionRoutes.intent + - api_field: transitionRoutes.name + - api_field: transitionRoutes.targetFlow + - api_field: transitionRoutes.targetPage + - api_field: transitionRoutes.triggerFulfillment.conditionalCases.cases + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.channel + - api_field: transitionRoutes.triggerFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: transitionRoutes.triggerFulfillment.messages.outputAudioText.ssml + - api_field: transitionRoutes.triggerFulfillment.messages.outputAudioText.text + - api_field: transitionRoutes.triggerFulfillment.messages.payload + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: transitionRoutes.triggerFulfillment.messages.playAudio.audioUri + - api_field: transitionRoutes.triggerFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: transitionRoutes.triggerFulfillment.messages.text.allowPlaybackInterruption + - api_field: transitionRoutes.triggerFulfillment.messages.text.text + - api_field: transitionRoutes.triggerFulfillment.returnPartialResponses + - api_field: transitionRoutes.triggerFulfillment.setParameterActions.parameter + - api_field: transitionRoutes.triggerFulfillment.setParameterActions.value + json: true + - api_field: transitionRoutes.triggerFulfillment.tag + - api_field: transitionRoutes.triggerFulfillment.webhook diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_generative_settings_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_generative_settings_generated_meta.yaml index 2d22766b6d1..e1c92e9450a 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_generative_settings_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_generative_settings_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_dialogflow_cx_generative_settings' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/GenerativeSettings.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'GenerativeSettings' +resource: google_dialogflow_cx_generative_settings +generation_type: mmv1 +source_file: products/dialogflowcx/GenerativeSettings.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: GenerativeSettings fields: - - api_field: 'fallbackSettings.promptTemplates.displayName' - - api_field: 'fallbackSettings.promptTemplates.frozen' - - api_field: 'fallbackSettings.promptTemplates.promptText' - - api_field: 'fallbackSettings.selectedPrompt' - - api_field: 'generativeSafetySettings.bannedPhrases.languageCode' - - api_field: 'generativeSafetySettings.bannedPhrases.text' - - api_field: 'generativeSafetySettings.defaultBannedPhraseMatchStrategy' - - api_field: 'knowledgeConnectorSettings.agent' - - api_field: 'knowledgeConnectorSettings.agentIdentity' - - api_field: 'knowledgeConnectorSettings.agentScope' - - api_field: 'knowledgeConnectorSettings.business' - - api_field: 'knowledgeConnectorSettings.businessDescription' - - api_field: 'knowledgeConnectorSettings.disableDataStoreFallback' - - api_field: 'languageCode' - - api_field: 'llmModelSettings.model' - - api_field: 'llmModelSettings.promptText' - - api_field: 'name' - - field: 'parent' - provider_only: true + - api_field: fallbackSettings.promptTemplates.displayName + - api_field: fallbackSettings.promptTemplates.frozen + - api_field: fallbackSettings.promptTemplates.promptText + - api_field: fallbackSettings.selectedPrompt + - api_field: generativeSafetySettings.bannedPhrases.languageCode + - api_field: generativeSafetySettings.bannedPhrases.text + - api_field: generativeSafetySettings.defaultBannedPhraseMatchStrategy + - api_field: knowledgeConnectorSettings.agent + - api_field: knowledgeConnectorSettings.agentIdentity + - api_field: knowledgeConnectorSettings.agentScope + - api_field: knowledgeConnectorSettings.business + - api_field: knowledgeConnectorSettings.businessDescription + - api_field: knowledgeConnectorSettings.disableDataStoreFallback + - api_field: languageCode + - api_field: llmModelSettings.model + - api_field: llmModelSettings.promptText + - api_field: name + - field: parent + provider_only: true diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_generator_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_generator_generated_meta.yaml index 0ba32fa99df..d4eff18a258 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_generator_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_generator_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_dialogflow_cx_generator' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Generator.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Generator' +resource: google_dialogflow_cx_generator +generation_type: mmv1 +source_file: products/dialogflowcx/Generator.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Generator fields: - - api_field: 'displayName' - - field: 'language_code' - provider_only: true - - api_field: 'llmModelSettings.model' - - api_field: 'llmModelSettings.promptText' - - api_field: 'modelParameter.maxDecodeSteps' - - api_field: 'modelParameter.temperature' - - api_field: 'modelParameter.topK' - - api_field: 'modelParameter.topP' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'placeholders.id' - - api_field: 'placeholders.name' - - api_field: 'promptText.text' + - api_field: displayName + - field: language_code + provider_only: true + - api_field: llmModelSettings.model + - api_field: llmModelSettings.promptText + - api_field: modelParameter.maxDecodeSteps + - api_field: modelParameter.temperature + - api_field: modelParameter.topK + - api_field: modelParameter.topP + - api_field: name + - field: parent + provider_only: true + - api_field: placeholders.id + - api_field: placeholders.name + - api_field: promptText.text diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_intent_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_intent_generated_meta.yaml index b890c2bc927..abe6e3b82eb 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_intent_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_intent_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_dialogflow_cx_intent' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Intent.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Intent' +resource: google_dialogflow_cx_intent +generation_type: mmv1 +source_file: products/dialogflowcx/Intent.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Intent fields: - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - field: 'is_default_negative_intent' - provider_only: true - - field: 'is_default_welcome_intent' - provider_only: true - - api_field: 'isFallback' - - api_field: 'labels' - - api_field: 'languageCode' - - api_field: 'name' - - api_field: 'parameters.entityType' - - api_field: 'parameters.id' - - api_field: 'parameters.isList' - - api_field: 'parameters.redact' - - field: 'parent' - provider_only: true - - api_field: 'priority' - - field: 'terraform_labels' - provider_only: true - - api_field: 'trainingPhrases.id' - - api_field: 'trainingPhrases.parts.parameterId' - - api_field: 'trainingPhrases.parts.text' - - api_field: 'trainingPhrases.repeatCount' + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - field: is_default_negative_intent + provider_only: true + - field: is_default_welcome_intent + provider_only: true + - api_field: isFallback + - api_field: labels + - api_field: languageCode + - api_field: name + - api_field: parameters.entityType + - api_field: parameters.id + - api_field: parameters.isList + - api_field: parameters.redact + - field: parent + provider_only: true + - api_field: priority + - field: terraform_labels + provider_only: true + - api_field: trainingPhrases.id + - api_field: trainingPhrases.parts.parameterId + - api_field: trainingPhrases.parts.text + - api_field: trainingPhrases.repeatCount diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_page_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_page_generated_meta.yaml index 1ca7394fba8..213bd18aa98 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_page_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_page_generated_meta.yaml @@ -1,201 +1,201 @@ -resource: 'google_dialogflow_cx_page' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Page.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Page' +resource: google_dialogflow_cx_page +generation_type: mmv1 +source_file: products/dialogflowcx/Page.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Page fields: - - api_field: 'advancedSettings.dtmfSettings.enabled' - - api_field: 'advancedSettings.dtmfSettings.finishDigit' - - api_field: 'advancedSettings.dtmfSettings.maxDigits' - - api_field: 'displayName' - - api_field: 'entryFulfillment.conditionalCases.cases' - json: true - - api_field: 'entryFulfillment.messages.channel' - - api_field: 'entryFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'entryFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'entryFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'entryFulfillment.messages.outputAudioText.ssml' - - api_field: 'entryFulfillment.messages.outputAudioText.text' - - api_field: 'entryFulfillment.messages.payload' - json: true - - api_field: 'entryFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'entryFulfillment.messages.playAudio.audioUri' - - api_field: 'entryFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'entryFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'entryFulfillment.messages.text.text' - - api_field: 'entryFulfillment.returnPartialResponses' - - api_field: 'entryFulfillment.setParameterActions.parameter' - - api_field: 'entryFulfillment.setParameterActions.value' - json: true - - api_field: 'entryFulfillment.tag' - - api_field: 'entryFulfillment.webhook' - - api_field: 'eventHandlers.event' - - api_field: 'eventHandlers.name' - - api_field: 'eventHandlers.targetFlow' - - api_field: 'eventHandlers.targetPage' - - api_field: 'eventHandlers.triggerFulfillment.conditionalCases.cases' - json: true - - api_field: 'eventHandlers.triggerFulfillment.messages.channel' - - api_field: 'eventHandlers.triggerFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'eventHandlers.triggerFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'eventHandlers.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'eventHandlers.triggerFulfillment.messages.outputAudioText.ssml' - - api_field: 'eventHandlers.triggerFulfillment.messages.outputAudioText.text' - - api_field: 'eventHandlers.triggerFulfillment.messages.payload' - json: true - - api_field: 'eventHandlers.triggerFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'eventHandlers.triggerFulfillment.messages.playAudio.audioUri' - - api_field: 'eventHandlers.triggerFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'eventHandlers.triggerFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'eventHandlers.triggerFulfillment.messages.text.text' - - api_field: 'eventHandlers.triggerFulfillment.returnPartialResponses' - - api_field: 'eventHandlers.triggerFulfillment.setParameterActions.parameter' - - api_field: 'eventHandlers.triggerFulfillment.setParameterActions.value' - json: true - - api_field: 'eventHandlers.triggerFulfillment.tag' - - api_field: 'eventHandlers.triggerFulfillment.webhook' - - api_field: 'form.parameters.advancedSettings.dtmfSettings.enabled' - - api_field: 'form.parameters.advancedSettings.dtmfSettings.finishDigit' - - api_field: 'form.parameters.advancedSettings.dtmfSettings.maxDigits' - - api_field: 'form.parameters.defaultValue' - json: true - - api_field: 'form.parameters.displayName' - - api_field: 'form.parameters.entityType' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.conditionalCases.cases' - json: true - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.channel' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.outputAudioText.ssml' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.outputAudioText.text' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.payload' - json: true - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.playAudio.audioUri' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.messages.text.text' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.returnPartialResponses' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.setParameterActions.parameter' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.setParameterActions.value' - json: true - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.tag' - - api_field: 'form.parameters.fillBehavior.initialPromptFulfillment.webhook' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.event' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.name' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.targetFlow' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.targetPage' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.conditionalCases.cases' - json: true - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.channel' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.outputAudioText.ssml' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.outputAudioText.text' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.payload' - json: true - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.playAudio.audioUri' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.text.text' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.returnPartialResponses' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.setParameterActions.parameter' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.setParameterActions.value' - json: true - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.tag' - - api_field: 'form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.webhook' - - api_field: 'form.parameters.isList' - - api_field: 'form.parameters.redact' - - api_field: 'form.parameters.required' - - api_field: 'knowledgeConnectorSettings.dataStoreConnections.dataStore' - - api_field: 'knowledgeConnectorSettings.dataStoreConnections.dataStoreType' - - api_field: 'knowledgeConnectorSettings.dataStoreConnections.documentProcessingMode' - - api_field: 'knowledgeConnectorSettings.enabled' - - api_field: 'knowledgeConnectorSettings.targetFlow' - - api_field: 'knowledgeConnectorSettings.targetPage' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.enabled' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.endpointingTimeoutDuration' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.finishDigit' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.interdigitTimeoutDuration' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.maxDigits' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableConsentBasedRedaction' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableInteractionLogging' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableStackdriverLogging' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.endpointerSensitivity' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.models' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.noSpeechTimeout' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.useTimeoutBasedEndpointing' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.conditionalCases.cases' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.enableGenerativeFallback' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.channel' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.endInteraction' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.knowledgeInfoCard' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.audio' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.uri' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.ssml' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.text' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.payload' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.audioUri' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.messages.text.text' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.returnPartialResponses' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.setParameterActions.parameter' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.setParameterActions.value' - json: true - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.tag' - - api_field: 'knowledgeConnectorSettings.triggerFulfillment.webhook' - - api_field: 'languageCode' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'transitionRouteGroups' - - api_field: 'transitionRoutes.condition' - - api_field: 'transitionRoutes.intent' - - api_field: 'transitionRoutes.name' - - api_field: 'transitionRoutes.targetFlow' - - api_field: 'transitionRoutes.targetPage' - - api_field: 'transitionRoutes.triggerFulfillment.conditionalCases.cases' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.channel' - - api_field: 'transitionRoutes.triggerFulfillment.messages.conversationSuccess.metadata' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.liveAgentHandoff.metadata' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption' - - api_field: 'transitionRoutes.triggerFulfillment.messages.outputAudioText.ssml' - - api_field: 'transitionRoutes.triggerFulfillment.messages.outputAudioText.text' - - api_field: 'transitionRoutes.triggerFulfillment.messages.payload' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.messages.playAudio.allowPlaybackInterruption' - - api_field: 'transitionRoutes.triggerFulfillment.messages.playAudio.audioUri' - - api_field: 'transitionRoutes.triggerFulfillment.messages.telephonyTransferCall.phoneNumber' - - api_field: 'transitionRoutes.triggerFulfillment.messages.text.allowPlaybackInterruption' - - api_field: 'transitionRoutes.triggerFulfillment.messages.text.text' - - api_field: 'transitionRoutes.triggerFulfillment.returnPartialResponses' - - api_field: 'transitionRoutes.triggerFulfillment.setParameterActions.parameter' - - api_field: 'transitionRoutes.triggerFulfillment.setParameterActions.value' - json: true - - api_field: 'transitionRoutes.triggerFulfillment.tag' - - api_field: 'transitionRoutes.triggerFulfillment.webhook' + - api_field: advancedSettings.dtmfSettings.enabled + - api_field: advancedSettings.dtmfSettings.finishDigit + - api_field: advancedSettings.dtmfSettings.maxDigits + - api_field: displayName + - api_field: entryFulfillment.conditionalCases.cases + json: true + - api_field: entryFulfillment.messages.channel + - api_field: entryFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: entryFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: entryFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: entryFulfillment.messages.outputAudioText.ssml + - api_field: entryFulfillment.messages.outputAudioText.text + - api_field: entryFulfillment.messages.payload + json: true + - api_field: entryFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: entryFulfillment.messages.playAudio.audioUri + - api_field: entryFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: entryFulfillment.messages.text.allowPlaybackInterruption + - api_field: entryFulfillment.messages.text.text + - api_field: entryFulfillment.returnPartialResponses + - api_field: entryFulfillment.setParameterActions.parameter + - api_field: entryFulfillment.setParameterActions.value + json: true + - api_field: entryFulfillment.tag + - api_field: entryFulfillment.webhook + - api_field: eventHandlers.event + - api_field: eventHandlers.name + - api_field: eventHandlers.targetFlow + - api_field: eventHandlers.targetPage + - api_field: eventHandlers.triggerFulfillment.conditionalCases.cases + json: true + - api_field: eventHandlers.triggerFulfillment.messages.channel + - api_field: eventHandlers.triggerFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: eventHandlers.triggerFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: eventHandlers.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: eventHandlers.triggerFulfillment.messages.outputAudioText.ssml + - api_field: eventHandlers.triggerFulfillment.messages.outputAudioText.text + - api_field: eventHandlers.triggerFulfillment.messages.payload + json: true + - api_field: eventHandlers.triggerFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: eventHandlers.triggerFulfillment.messages.playAudio.audioUri + - api_field: eventHandlers.triggerFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: eventHandlers.triggerFulfillment.messages.text.allowPlaybackInterruption + - api_field: eventHandlers.triggerFulfillment.messages.text.text + - api_field: eventHandlers.triggerFulfillment.returnPartialResponses + - api_field: eventHandlers.triggerFulfillment.setParameterActions.parameter + - api_field: eventHandlers.triggerFulfillment.setParameterActions.value + json: true + - api_field: eventHandlers.triggerFulfillment.tag + - api_field: eventHandlers.triggerFulfillment.webhook + - api_field: form.parameters.advancedSettings.dtmfSettings.enabled + - api_field: form.parameters.advancedSettings.dtmfSettings.finishDigit + - api_field: form.parameters.advancedSettings.dtmfSettings.maxDigits + - api_field: form.parameters.defaultValue + json: true + - api_field: form.parameters.displayName + - api_field: form.parameters.entityType + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.conditionalCases.cases + json: true + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.channel + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.outputAudioText.ssml + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.outputAudioText.text + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.payload + json: true + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.playAudio.audioUri + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.text.allowPlaybackInterruption + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.messages.text.text + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.returnPartialResponses + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.setParameterActions.parameter + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.setParameterActions.value + json: true + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.tag + - api_field: form.parameters.fillBehavior.initialPromptFulfillment.webhook + - api_field: form.parameters.fillBehavior.repromptEventHandlers.event + - api_field: form.parameters.fillBehavior.repromptEventHandlers.name + - api_field: form.parameters.fillBehavior.repromptEventHandlers.targetFlow + - api_field: form.parameters.fillBehavior.repromptEventHandlers.targetPage + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.conditionalCases.cases + json: true + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.channel + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.outputAudioText.ssml + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.outputAudioText.text + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.payload + json: true + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.playAudio.audioUri + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.text.allowPlaybackInterruption + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.messages.text.text + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.returnPartialResponses + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.setParameterActions.parameter + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.setParameterActions.value + json: true + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.tag + - api_field: form.parameters.fillBehavior.repromptEventHandlers.triggerFulfillment.webhook + - api_field: form.parameters.isList + - api_field: form.parameters.redact + - api_field: form.parameters.required + - api_field: knowledgeConnectorSettings.dataStoreConnections.dataStore + - api_field: knowledgeConnectorSettings.dataStoreConnections.dataStoreType + - api_field: knowledgeConnectorSettings.dataStoreConnections.documentProcessingMode + - api_field: knowledgeConnectorSettings.enabled + - api_field: knowledgeConnectorSettings.targetFlow + - api_field: knowledgeConnectorSettings.targetPage + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.enabled + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.endpointingTimeoutDuration + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.finishDigit + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.interdigitTimeoutDuration + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.dtmfSettings.maxDigits + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableConsentBasedRedaction + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableInteractionLogging + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.loggingSettings.enableStackdriverLogging + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.endpointerSensitivity + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.models + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.noSpeechTimeout + - api_field: knowledgeConnectorSettings.triggerFulfillment.advancedSettings.speechSettings.useTimeoutBasedEndpointing + - api_field: knowledgeConnectorSettings.triggerFulfillment.conditionalCases.cases + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.enableGenerativeFallback + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.channel + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.endInteraction + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.knowledgeInfoCard + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.audio + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.mixedAudio.segments.uri + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.ssml + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.outputAudioText.text + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.payload + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.playAudio.audioUri + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.text.allowPlaybackInterruption + - api_field: knowledgeConnectorSettings.triggerFulfillment.messages.text.text + - api_field: knowledgeConnectorSettings.triggerFulfillment.returnPartialResponses + - api_field: knowledgeConnectorSettings.triggerFulfillment.setParameterActions.parameter + - api_field: knowledgeConnectorSettings.triggerFulfillment.setParameterActions.value + json: true + - api_field: knowledgeConnectorSettings.triggerFulfillment.tag + - api_field: knowledgeConnectorSettings.triggerFulfillment.webhook + - api_field: languageCode + - api_field: name + - field: parent + provider_only: true + - api_field: transitionRouteGroups + - api_field: transitionRoutes.condition + - api_field: transitionRoutes.intent + - api_field: transitionRoutes.name + - api_field: transitionRoutes.targetFlow + - api_field: transitionRoutes.targetPage + - api_field: transitionRoutes.triggerFulfillment.conditionalCases.cases + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.channel + - api_field: transitionRoutes.triggerFulfillment.messages.conversationSuccess.metadata + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.liveAgentHandoff.metadata + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.outputAudioText.allowPlaybackInterruption + - api_field: transitionRoutes.triggerFulfillment.messages.outputAudioText.ssml + - api_field: transitionRoutes.triggerFulfillment.messages.outputAudioText.text + - api_field: transitionRoutes.triggerFulfillment.messages.payload + json: true + - api_field: transitionRoutes.triggerFulfillment.messages.playAudio.allowPlaybackInterruption + - api_field: transitionRoutes.triggerFulfillment.messages.playAudio.audioUri + - api_field: transitionRoutes.triggerFulfillment.messages.telephonyTransferCall.phoneNumber + - api_field: transitionRoutes.triggerFulfillment.messages.text.allowPlaybackInterruption + - api_field: transitionRoutes.triggerFulfillment.messages.text.text + - api_field: transitionRoutes.triggerFulfillment.returnPartialResponses + - api_field: transitionRoutes.triggerFulfillment.setParameterActions.parameter + - api_field: transitionRoutes.triggerFulfillment.setParameterActions.value + json: true + - api_field: transitionRoutes.triggerFulfillment.tag + - api_field: transitionRoutes.triggerFulfillment.webhook diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_playbook_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_playbook_generated_meta.yaml index b25945d7e45..e982264e3b3 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_playbook_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_playbook_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_dialogflow_cx_playbook' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Playbook.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Playbook' +resource: google_dialogflow_cx_playbook +generation_type: mmv1 +source_file: products/dialogflowcx/Playbook.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Playbook fields: - - api_field: 'createTime' - - api_field: 'displayName' - - api_field: 'goal' - - api_field: 'instruction.guidelines' - - api_field: 'instruction.steps.steps' - json: true - - api_field: 'instruction.steps.text' - - api_field: 'llmModelSettings.model' - - api_field: 'llmModelSettings.promptText' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'playbookType' - - api_field: 'referencedFlows' - - api_field: 'referencedPlaybooks' - - api_field: 'referencedTools' - - api_field: 'tokenCount' - - api_field: 'updateTime' + - api_field: createTime + - api_field: displayName + - api_field: goal + - api_field: instruction.guidelines + - api_field: instruction.steps.steps + json: true + - api_field: instruction.steps.text + - api_field: llmModelSettings.model + - api_field: llmModelSettings.promptText + - api_field: name + - field: parent + provider_only: true + - api_field: playbookType + - api_field: referencedFlows + - api_field: referencedPlaybooks + - api_field: referencedTools + - api_field: tokenCount + - api_field: updateTime diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_security_settings_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_security_settings_generated_meta.yaml index 9d0580d5a50..7c2bb55fe92 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_security_settings_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_security_settings_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_dialogflow_cx_security_settings' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/SecuritySettings.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'SecuritySettings' +resource: google_dialogflow_cx_security_settings +generation_type: mmv1 +source_file: products/dialogflowcx/SecuritySettings.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: SecuritySettings fields: - - api_field: 'audioExportSettings.audioExportPattern' - - api_field: 'audioExportSettings.audioFormat' - - api_field: 'audioExportSettings.enableAudioRedaction' - - api_field: 'audioExportSettings.gcsBucket' - - api_field: 'deidentifyTemplate' - - api_field: 'displayName' - - api_field: 'insightsExportSettings.enableInsightsExport' - - api_field: 'inspectTemplate' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'purgeDataTypes' - - api_field: 'redactionScope' - - api_field: 'redactionStrategy' - - api_field: 'retentionStrategy' - - api_field: 'retentionWindowDays' + - api_field: audioExportSettings.audioExportPattern + - api_field: audioExportSettings.audioFormat + - api_field: audioExportSettings.enableAudioRedaction + - api_field: audioExportSettings.gcsBucket + - api_field: deidentifyTemplate + - api_field: displayName + - api_field: insightsExportSettings.enableInsightsExport + - api_field: inspectTemplate + - field: location + provider_only: true + - api_field: name + - api_field: purgeDataTypes + - api_field: redactionScope + - api_field: redactionStrategy + - api_field: retentionStrategy + - api_field: retentionWindowDays diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_meta.yaml index 34403e31f76..41bcee19992 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_meta.yaml @@ -1,59 +1,59 @@ -resource: 'google_dialogflow_cx_test_case' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/TestCase.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'TestCase' +resource: google_dialogflow_cx_test_case +generation_type: mmv1 +source_file: products/dialogflowcx/TestCase.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: TestCase fields: - - api_field: 'creationTime' - - api_field: 'displayName' - - api_field: 'lastTestResult.conversationTurns.userInput.enableSentimentAnalysis' - - api_field: 'lastTestResult.conversationTurns.userInput.injectedParameters' - json: true - - api_field: 'lastTestResult.conversationTurns.userInput.input.dtmf.digits' - - api_field: 'lastTestResult.conversationTurns.userInput.input.dtmf.finishDigit' - - api_field: 'lastTestResult.conversationTurns.userInput.input.event.event' - - api_field: 'lastTestResult.conversationTurns.userInput.input.languageCode' - - api_field: 'lastTestResult.conversationTurns.userInput.input.text.text' - - api_field: 'lastTestResult.conversationTurns.userInput.isWebhookEnabled' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.currentPage.displayName' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.currentPage.name' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.differences.description' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.differences.type' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.sessionParameters' - json: true - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.status.code' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.status.details' - json: true - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.status.message' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.textResponses.text' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.triggeredIntent.displayName' - - api_field: 'lastTestResult.conversationTurns.virtualAgentOutput.triggeredIntent.name' - - api_field: 'lastTestResult.environment' - - api_field: 'lastTestResult.name' - - api_field: 'lastTestResult.testResult' - - api_field: 'lastTestResult.testTime' - - api_field: 'name' - - api_field: 'notes' - - field: 'parent' - provider_only: true - - api_field: 'tags' - - api_field: 'testCaseConversationTurns.userInput.enableSentimentAnalysis' - - api_field: 'testCaseConversationTurns.userInput.injectedParameters' - json: true - - api_field: 'testCaseConversationTurns.userInput.input.dtmf.digits' - - api_field: 'testCaseConversationTurns.userInput.input.dtmf.finishDigit' - - api_field: 'testCaseConversationTurns.userInput.input.event.event' - - api_field: 'testCaseConversationTurns.userInput.input.languageCode' - - api_field: 'testCaseConversationTurns.userInput.input.text.text' - - api_field: 'testCaseConversationTurns.userInput.isWebhookEnabled' - - api_field: 'testCaseConversationTurns.virtualAgentOutput.currentPage.displayName' - - api_field: 'testCaseConversationTurns.virtualAgentOutput.currentPage.name' - - api_field: 'testCaseConversationTurns.virtualAgentOutput.sessionParameters' - json: true - - api_field: 'testCaseConversationTurns.virtualAgentOutput.textResponses.text' - - api_field: 'testCaseConversationTurns.virtualAgentOutput.triggeredIntent.displayName' - - api_field: 'testCaseConversationTurns.virtualAgentOutput.triggeredIntent.name' - - api_field: 'testConfig.flow' - - api_field: 'testConfig.page' - - api_field: 'testConfig.trackingParameters' + - api_field: creationTime + - api_field: displayName + - api_field: lastTestResult.conversationTurns.userInput.enableSentimentAnalysis + - api_field: lastTestResult.conversationTurns.userInput.injectedParameters + json: true + - api_field: lastTestResult.conversationTurns.userInput.input.dtmf.digits + - api_field: lastTestResult.conversationTurns.userInput.input.dtmf.finishDigit + - api_field: lastTestResult.conversationTurns.userInput.input.event.event + - api_field: lastTestResult.conversationTurns.userInput.input.languageCode + - api_field: lastTestResult.conversationTurns.userInput.input.text.text + - api_field: lastTestResult.conversationTurns.userInput.isWebhookEnabled + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.currentPage.displayName + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.currentPage.name + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.differences.description + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.differences.type + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.sessionParameters + json: true + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.status.code + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.status.details + json: true + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.status.message + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.textResponses.text + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.triggeredIntent.displayName + - api_field: lastTestResult.conversationTurns.virtualAgentOutput.triggeredIntent.name + - api_field: lastTestResult.environment + - api_field: lastTestResult.name + - api_field: lastTestResult.testResult + - api_field: lastTestResult.testTime + - api_field: name + - api_field: notes + - field: parent + provider_only: true + - api_field: tags + - api_field: testCaseConversationTurns.userInput.enableSentimentAnalysis + - api_field: testCaseConversationTurns.userInput.injectedParameters + json: true + - api_field: testCaseConversationTurns.userInput.input.dtmf.digits + - api_field: testCaseConversationTurns.userInput.input.dtmf.finishDigit + - api_field: testCaseConversationTurns.userInput.input.event.event + - api_field: testCaseConversationTurns.userInput.input.languageCode + - api_field: testCaseConversationTurns.userInput.input.text.text + - api_field: testCaseConversationTurns.userInput.isWebhookEnabled + - api_field: testCaseConversationTurns.virtualAgentOutput.currentPage.displayName + - api_field: testCaseConversationTurns.virtualAgentOutput.currentPage.name + - api_field: testCaseConversationTurns.virtualAgentOutput.sessionParameters + json: true + - api_field: testCaseConversationTurns.virtualAgentOutput.textResponses.text + - api_field: testCaseConversationTurns.virtualAgentOutput.triggeredIntent.displayName + - api_field: testCaseConversationTurns.virtualAgentOutput.triggeredIntent.name + - api_field: testConfig.flow + - api_field: testConfig.page + - api_field: testConfig.trackingParameters diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_test.go b/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_test.go index 7a4797fc1b9..e4a9cd0a642 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_test.go +++ b/google/services/dialogflowcx/resource_dialogflow_cx_test_case_generated_test.go @@ -51,6 +51,7 @@ var ( ) func TestAccDialogflowCXTestCase_dialogflowcxTestCaseFullExample(t *testing.T) { + acctest.SkipIfVcr(t) t.Parallel() context := map[string]interface{}{ diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_test_case_test.go b/google/services/dialogflowcx/resource_dialogflow_cx_test_case_test.go index 5b2c319f920..983846b1857 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_test_case_test.go +++ b/google/services/dialogflowcx/resource_dialogflow_cx_test_case_test.go @@ -28,6 +28,10 @@ import ( func TestAccDialogflowCXTestCase_update(t *testing.T) { t.Parallel() + // Skip in VCR until the test issue is resolved + // https://github.com/hashicorp/terraform-provider-google/issues/25227 + acctest.SkipIfVcr(t) + context := map[string]interface{}{ "org_id": envvar.GetTestOrgFromEnv(t), "billing_account": envvar.GetTestBillingAccountFromEnv(t), diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_tool_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_tool_generated_meta.yaml index b31a91d1837..07b5862b797 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_tool_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_tool_generated_meta.yaml @@ -1,38 +1,38 @@ -resource: 'google_dialogflow_cx_tool' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Tool.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Tool' +resource: google_dialogflow_cx_tool +generation_type: mmv1 +source_file: products/dialogflowcx/Tool.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Tool fields: - - api_field: 'dataStoreSpec.dataStoreConnections.dataStore' - - api_field: 'dataStoreSpec.dataStoreConnections.dataStoreType' - - api_field: 'dataStoreSpec.dataStoreConnections.documentProcessingMode' - - api_field: 'dataStoreSpec.fallbackPrompt' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'functionSpec.inputSchema' - json: true - - api_field: 'functionSpec.outputSchema' - json: true - - api_field: 'name' - - api_field: 'openApiSpec.authentication.apiKeyConfig.apiKey' - - api_field: 'openApiSpec.authentication.apiKeyConfig.keyName' - - api_field: 'openApiSpec.authentication.apiKeyConfig.requestLocation' - - api_field: 'openApiSpec.authentication.apiKeyConfig.secretVersionForApiKey' - - api_field: 'openApiSpec.authentication.bearerTokenConfig.secretVersionForToken' - - api_field: 'openApiSpec.authentication.bearerTokenConfig.token' - - api_field: 'openApiSpec.authentication.oauthConfig.clientId' - - api_field: 'openApiSpec.authentication.oauthConfig.clientSecret' - - api_field: 'openApiSpec.authentication.oauthConfig.oauthGrantType' - - api_field: 'openApiSpec.authentication.oauthConfig.scopes' - - api_field: 'openApiSpec.authentication.oauthConfig.secretVersionForClientSecret' - - api_field: 'openApiSpec.authentication.oauthConfig.tokenEndpoint' - - api_field: 'openApiSpec.authentication.serviceAgentAuthConfig.serviceAgentAuth' - - api_field: 'openApiSpec.serviceDirectoryConfig.service' - - api_field: 'openApiSpec.textSchema' - - api_field: 'openApiSpec.tlsConfig.caCerts.cert' - - api_field: 'openApiSpec.tlsConfig.caCerts.displayName' - - field: 'parent' - provider_only: true - - api_field: 'toolType' + - api_field: dataStoreSpec.dataStoreConnections.dataStore + - api_field: dataStoreSpec.dataStoreConnections.dataStoreType + - api_field: dataStoreSpec.dataStoreConnections.documentProcessingMode + - api_field: dataStoreSpec.fallbackPrompt + - api_field: description + - api_field: displayName + - api_field: functionSpec.inputSchema + json: true + - api_field: functionSpec.outputSchema + json: true + - api_field: name + - api_field: openApiSpec.authentication.apiKeyConfig.apiKey + - api_field: openApiSpec.authentication.apiKeyConfig.keyName + - api_field: openApiSpec.authentication.apiKeyConfig.requestLocation + - api_field: openApiSpec.authentication.apiKeyConfig.secretVersionForApiKey + - api_field: openApiSpec.authentication.bearerTokenConfig.secretVersionForToken + - api_field: openApiSpec.authentication.bearerTokenConfig.token + - api_field: openApiSpec.authentication.oauthConfig.clientId + - api_field: openApiSpec.authentication.oauthConfig.clientSecret + - api_field: openApiSpec.authentication.oauthConfig.oauthGrantType + - api_field: openApiSpec.authentication.oauthConfig.scopes + - api_field: openApiSpec.authentication.oauthConfig.secretVersionForClientSecret + - api_field: openApiSpec.authentication.oauthConfig.tokenEndpoint + - api_field: openApiSpec.authentication.serviceAgentAuthConfig.serviceAgentAuth + - api_field: openApiSpec.serviceDirectoryConfig.service + - api_field: openApiSpec.textSchema + - api_field: openApiSpec.tlsConfig.caCerts.cert + - api_field: openApiSpec.tlsConfig.caCerts.displayName + - field: parent + provider_only: true + - api_field: toolType diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_version_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_version_generated_meta.yaml index f3621d9b8c2..cec65e48777 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_version_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_version_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_dialogflow_cx_version' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Version.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Version' +resource: google_dialogflow_cx_version +generation_type: mmv1 +source_file: products/dialogflowcx/Version.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Version fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'name' - - api_field: 'nluSettings.classificationThreshold' - - api_field: 'nluSettings.modelTrainingMode' - - api_field: 'nluSettings.modelType' - - field: 'parent' - provider_only: true - - api_field: 'state' + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: name + - api_field: nluSettings.classificationThreshold + - api_field: nluSettings.modelTrainingMode + - api_field: nluSettings.modelType + - field: parent + provider_only: true + - api_field: state diff --git a/google/services/dialogflowcx/resource_dialogflow_cx_webhook_generated_meta.yaml b/google/services/dialogflowcx/resource_dialogflow_cx_webhook_generated_meta.yaml index d1eba31c27d..2bdd5ccb7fe 100644 --- a/google/services/dialogflowcx/resource_dialogflow_cx_webhook_generated_meta.yaml +++ b/google/services/dialogflowcx/resource_dialogflow_cx_webhook_generated_meta.yaml @@ -1,48 +1,54 @@ -resource: 'google_dialogflow_cx_webhook' -generation_type: 'mmv1' -source_file: 'products/dialogflowcx/Webhook.yaml' -api_service_name: 'dialogflow.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Webhook' +resource: google_dialogflow_cx_webhook +generation_type: mmv1 +source_file: products/dialogflowcx/Webhook.yaml +api_service_name: dialogflow.googleapis.com +api_version: v3 +api_resource_type_kind: Webhook fields: - - api_field: 'disabled' - - api_field: 'displayName' - - api_field: 'enableSpellCorrection' - - api_field: 'enableStackdriverLogging' - - api_field: 'genericWebService.allowedCaCerts' - - api_field: 'genericWebService.httpMethod' - - api_field: 'genericWebService.oauthConfig.clientId' - - api_field: 'genericWebService.oauthConfig.clientSecret' - - api_field: 'genericWebService.oauthConfig.scopes' - - api_field: 'genericWebService.oauthConfig.secretVersionForClientSecret' - - api_field: 'genericWebService.oauthConfig.tokenEndpoint' - - api_field: 'genericWebService.parameterMapping' - - api_field: 'genericWebService.requestBody' - - api_field: 'genericWebService.requestHeaders' - - api_field: 'genericWebService.secretVersionForUsernamePassword' - - api_field: 'genericWebService.secretVersionsForRequestHeaders.secretVersionsForRequestHeader.secretVersion' - - api_field: 'genericWebService.serviceAgentAuth' - - api_field: 'genericWebService.uri' - - api_field: 'genericWebService.webhookType' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'securitySettings' - - api_field: 'serviceDirectory.genericWebService.allowedCaCerts' - - api_field: 'serviceDirectory.genericWebService.httpMethod' - - api_field: 'serviceDirectory.genericWebService.oauthConfig.clientId' - - api_field: 'serviceDirectory.genericWebService.oauthConfig.clientSecret' - - api_field: 'serviceDirectory.genericWebService.oauthConfig.scopes' - - api_field: 'serviceDirectory.genericWebService.oauthConfig.secretVersionForClientSecret' - - api_field: 'serviceDirectory.genericWebService.oauthConfig.tokenEndpoint' - - api_field: 'serviceDirectory.genericWebService.parameterMapping' - - api_field: 'serviceDirectory.genericWebService.requestBody' - - api_field: 'serviceDirectory.genericWebService.requestHeaders' - - api_field: 'serviceDirectory.genericWebService.secretVersionForUsernamePassword' - - api_field: 'serviceDirectory.genericWebService.secretVersionsForRequestHeaders.secretVersionsForRequestHeader.secretVersion' - - api_field: 'serviceDirectory.genericWebService.serviceAgentAuth' - - api_field: 'serviceDirectory.genericWebService.uri' - - api_field: 'serviceDirectory.genericWebService.webhookType' - - api_field: 'serviceDirectory.service' - - api_field: 'startFlow' - - api_field: 'timeout' + - api_field: disabled + - api_field: displayName + - api_field: enableSpellCorrection + - api_field: enableStackdriverLogging + - api_field: genericWebService.allowedCaCerts + - api_field: genericWebService.httpMethod + - api_field: genericWebService.oauthConfig.clientId + - api_field: genericWebService.oauthConfig.clientSecret + - api_field: genericWebService.oauthConfig.scopes + - api_field: genericWebService.oauthConfig.secretVersionForClientSecret + - api_field: genericWebService.oauthConfig.tokenEndpoint + - api_field: genericWebService.parameterMapping + - api_field: genericWebService.requestBody + - api_field: genericWebService.requestHeaders + - api_field: genericWebService.secretVersionForUsernamePassword + - api_field: genericWebService.secretVersionsForRequestHeaders.key + field: generic_web_service.secret_versions_for_request_headers.key + - api_field: genericWebService.secretVersionsForRequestHeaders.value.secretVersion + field: generic_web_service.secret_versions_for_request_headers.secret_version + - api_field: genericWebService.serviceAgentAuth + - api_field: genericWebService.uri + - api_field: genericWebService.webhookType + - api_field: name + - field: parent + provider_only: true + - api_field: securitySettings + - api_field: serviceDirectory.genericWebService.allowedCaCerts + - api_field: serviceDirectory.genericWebService.httpMethod + - api_field: serviceDirectory.genericWebService.oauthConfig.clientId + - api_field: serviceDirectory.genericWebService.oauthConfig.clientSecret + - api_field: serviceDirectory.genericWebService.oauthConfig.scopes + - api_field: serviceDirectory.genericWebService.oauthConfig.secretVersionForClientSecret + - api_field: serviceDirectory.genericWebService.oauthConfig.tokenEndpoint + - api_field: serviceDirectory.genericWebService.parameterMapping + - api_field: serviceDirectory.genericWebService.requestBody + - api_field: serviceDirectory.genericWebService.requestHeaders + - api_field: serviceDirectory.genericWebService.secretVersionForUsernamePassword + - api_field: serviceDirectory.genericWebService.secretVersionsForRequestHeaders.key + field: service_directory.generic_web_service.secret_versions_for_request_headers.key + - api_field: serviceDirectory.genericWebService.secretVersionsForRequestHeaders.value.secretVersion + field: service_directory.generic_web_service.secret_versions_for_request_headers.secret_version + - api_field: serviceDirectory.genericWebService.serviceAgentAuth + - api_field: serviceDirectory.genericWebService.uri + - api_field: serviceDirectory.genericWebService.webhookType + - api_field: serviceDirectory.service + - api_field: startFlow + - api_field: timeout diff --git a/google/services/discoveryengine/resource_discovery_engine_acl_config_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_acl_config_generated_meta.yaml index 9ccbb6b3141..0455a2c91bc 100644 --- a/google/services/discoveryengine/resource_discovery_engine_acl_config_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_acl_config_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_discovery_engine_acl_config' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/AclConfig.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AclConfig' +resource: google_discovery_engine_acl_config +generation_type: mmv1 +source_file: products/discoveryengine/AclConfig.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: AclConfig fields: - - api_field: 'idpConfig.externalIdpConfig.workforcePoolName' - - api_field: 'idpConfig.idpType' - - field: 'location' - provider_only: true - - api_field: 'name' + - api_field: idpConfig.externalIdpConfig.workforcePoolName + - api_field: idpConfig.idpType + - field: location + provider_only: true + - api_field: name diff --git a/google/services/discoveryengine/resource_discovery_engine_assistant_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_assistant_generated_meta.yaml index 155dc69d5dd..f2e9a17c852 100644 --- a/google/services/discoveryengine/resource_discovery_engine_assistant_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_assistant_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_discovery_engine_assistant' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/Assistant.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Assistant' +resource: google_discovery_engine_assistant +generation_type: mmv1 +source_file: products/discoveryengine/Assistant.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: Assistant fields: - - field: 'assistant_id' - provider_only: true - - field: 'collection_id' - provider_only: true - - api_field: 'customerPolicy.bannedPhrases.ignoreDiacritics' - - api_field: 'customerPolicy.bannedPhrases.matchType' - - api_field: 'customerPolicy.bannedPhrases.phrase' - - api_field: 'customerPolicy.modelArmorConfig.failureMode' - - api_field: 'customerPolicy.modelArmorConfig.responseTemplate' - - api_field: 'customerPolicy.modelArmorConfig.userPromptTemplate' - - api_field: 'description' - - api_field: 'displayName' - - field: 'engine_id' - provider_only: true - - api_field: 'generationConfig.defaultLanguage' - - api_field: 'generationConfig.systemInstruction.additionalSystemInstruction' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'webGroundingType' + - field: assistant_id + provider_only: true + - field: collection_id + provider_only: true + - api_field: customerPolicy.bannedPhrases.ignoreDiacritics + - api_field: customerPolicy.bannedPhrases.matchType + - api_field: customerPolicy.bannedPhrases.phrase + - api_field: customerPolicy.modelArmorConfig.failureMode + - api_field: customerPolicy.modelArmorConfig.responseTemplate + - api_field: customerPolicy.modelArmorConfig.userPromptTemplate + - api_field: description + - api_field: displayName + - field: engine_id + provider_only: true + - api_field: generationConfig.defaultLanguage + - api_field: generationConfig.systemInstruction.additionalSystemInstruction + - field: location + provider_only: true + - api_field: name + - api_field: webGroundingType diff --git a/google/services/discoveryengine/resource_discovery_engine_chat_engine_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_chat_engine_generated_meta.yaml index 7bf775bfc7f..bd0d019eba9 100644 --- a/google/services/discoveryengine/resource_discovery_engine_chat_engine_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_chat_engine_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_discovery_engine_chat_engine' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/ChatEngine.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Engine' +resource: google_discovery_engine_chat_engine +generation_type: mmv1 +source_file: products/discoveryengine/ChatEngine.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: Engine fields: - - api_field: 'chatEngineConfig.agentCreationConfig.business' - - api_field: 'chatEngineConfig.agentCreationConfig.defaultLanguageCode' - - api_field: 'chatEngineConfig.agentCreationConfig.location' - - api_field: 'chatEngineConfig.agentCreationConfig.timeZone' - - api_field: 'chatEngineConfig.allowCrossRegion' - - api_field: 'chatEngineConfig.dialogflowAgentToLink' - - api_field: 'chatEngineMetadata.dialogflowAgent' - - field: 'collection_id' - provider_only: true - - api_field: 'commonConfig.companyName' - - api_field: 'createTime' - - api_field: 'dataStoreIds' - - api_field: 'displayName' - - field: 'engine_id' - provider_only: true - - api_field: 'industryVertical' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' + - api_field: chatEngineConfig.agentCreationConfig.business + - api_field: chatEngineConfig.agentCreationConfig.defaultLanguageCode + - api_field: chatEngineConfig.agentCreationConfig.location + - api_field: chatEngineConfig.agentCreationConfig.timeZone + - api_field: chatEngineConfig.allowCrossRegion + - api_field: chatEngineConfig.dialogflowAgentToLink + - api_field: chatEngineMetadata.dialogflowAgent + - field: collection_id + provider_only: true + - api_field: commonConfig.companyName + - api_field: createTime + - api_field: dataStoreIds + - api_field: displayName + - field: engine_id + provider_only: true + - api_field: industryVertical + - field: location + provider_only: true + - api_field: name + - api_field: updateTime diff --git a/google/services/discoveryengine/resource_discovery_engine_cmek_config.go b/google/services/discoveryengine/resource_discovery_engine_cmek_config.go index fd0f80d033c..596ead2ddc7 100644 --- a/google/services/discoveryengine/resource_discovery_engine_cmek_config.go +++ b/google/services/discoveryengine/resource_discovery_engine_cmek_config.go @@ -117,7 +117,7 @@ func ResourceDiscoveryEngineCmekConfig() *schema.Resource { }, "cmek_config_id": { Type: schema.TypeString, - OptionalForImport: true, + RequiredForImport: true, }, "project": { Type: schema.TypeString, @@ -127,6 +127,12 @@ func ResourceDiscoveryEngineCmekConfig() *schema.Resource { }, }, Schema: map[string]*schema.Schema{ + "cmek_config_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The unique id of the cmek config.`, + }, "kms_key": { Type: schema.TypeString, Required: true, @@ -141,12 +147,6 @@ func ResourceDiscoveryEngineCmekConfig() *schema.Resource { Description: `The geographic location where the CMEK config should reside. The value can only be one of "us" and "eu".`, }, - "cmek_config_id": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Description: `The unique id of the cmek config.`, - }, "set_default": { Type: schema.TypeBool, Optional: true, diff --git a/google/services/discoveryengine/resource_discovery_engine_cmek_config_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_cmek_config_generated_meta.yaml index c5454e53c92..4f3cdfda8e7 100644 --- a/google/services/discoveryengine/resource_discovery_engine_cmek_config_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_cmek_config_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_discovery_engine_cmek_config' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/CmekConfig.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CmekConfig' +resource: google_discovery_engine_cmek_config +generation_type: mmv1 +source_file: products/discoveryengine/CmekConfig.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: CmekConfig fields: - - field: 'cmek_config_id' - provider_only: true - - api_field: 'isDefault' - - api_field: 'kmsKey' - - api_field: 'kmsKeyVersion' - - api_field: 'lastRotationTimestampMicros' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'notebooklmState' - - field: 'set_default' - provider_only: true - - api_field: 'singleRegionKeys.kmsKey' - - api_field: 'state' + - field: cmek_config_id + provider_only: true + - api_field: isDefault + - api_field: kmsKey + - api_field: kmsKeyVersion + - api_field: lastRotationTimestampMicros + - field: location + provider_only: true + - api_field: name + - api_field: notebooklmState + - field: set_default + provider_only: true + - api_field: singleRegionKeys.kmsKey + - api_field: state diff --git a/google/services/discoveryengine/resource_discovery_engine_cmek_config_test.go b/google/services/discoveryengine/resource_discovery_engine_cmek_config_test.go index 76558d0fe94..30afe768abe 100644 --- a/google/services/discoveryengine/resource_discovery_engine_cmek_config_test.go +++ b/google/services/discoveryengine/resource_discovery_engine_cmek_config_test.go @@ -27,11 +27,8 @@ func TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample_up t.Parallel() context := map[string]interface{}{ - "kms_key_name": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us", "tftest-shared-key-6").CryptoKey.Name, - "single_region_kms_key_name1": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us-east1", "tftest-shared-key-us-east1").CryptoKey.Name, - "single_region_kms_key_name2": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us-central1", "tftest-shared-key-us-central1").CryptoKey.Name, - "single_region_kms_key_name3": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us-west1", "tftest-shared-key-us-west1").CryptoKey.Name, - "random_suffix": acctest.RandString(t, 10), + "kms_key_name": acctest.BootstrapKMSKeyWithPurposeInLocationAndName(t, "ENCRYPT_DECRYPT", "us", "tftest-shared-key-"+acctest.RandString(t, 10)).CryptoKey.Name, + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -47,15 +44,6 @@ func TestAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample_up ImportStateVerify: true, ImportStateVerifyIgnore: []string{"cmek_config_id", "location", "project", "set_default"}, }, - { - Config: testAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample_update(context), - }, - { - ResourceName: "google_discovery_engine_cmek_config.default", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"cmek_config_id", "location", "project", "set_default"}, - }, }, }) } @@ -79,50 +67,3 @@ resource "google_kms_crypto_key_iam_member" "crypto_key" { } `, context) } - -func testAccDiscoveryEngineCmekConfig_discoveryengineCmekconfigDefaultExample_update(context map[string]interface{}) string { - return acctest.Nprintf(` -resource "google_discovery_engine_cmek_config" "default" { - location = "us" - cmek_config_id = "tf-test-cmek-config-id%{random_suffix}" - kms_key = "%{kms_key_name}" - set_default = false - single_region_keys { - kms_key = "%{single_region_kms_key_name1}" - } - single_region_keys { - kms_key = "%{single_region_kms_key_name2}" - } - single_region_keys { - kms_key = "%{single_region_kms_key_name3}" - } - depends_on = [google_kms_crypto_key_iam_member.crypto_key] -} - -data "google_project" "project" {} - -resource "google_kms_crypto_key_iam_member" "crypto_key" { - crypto_key_id = "%{kms_key_name}" - role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" - member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-alloydb.iam.gserviceaccount.com" -} - -resource "google_kms_crypto_key_iam_member" "single_region_crypto_key1" { - crypto_key_id = "%{single_region_kms_key_name1}" - role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" - member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-discoveryengine.iam.gserviceaccount.com" -} - -resource "google_kms_crypto_key_iam_member" "single_region_crypto_key2" { - crypto_key_id = "%{single_region_kms_key_name2}" - role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" - member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-discoveryengine.iam.gserviceaccount.com" -} - -resource "google_kms_crypto_key_iam_member" "single_region_crypto_key3" { - crypto_key_id = "%{single_region_kms_key_name3}" - role = "roles/cloudkms.cryptoKeyEncrypterDecrypter" - member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-discoveryengine.iam.gserviceaccount.com" -} -`, context) -} diff --git a/google/services/discoveryengine/resource_discovery_engine_control_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_control_generated_meta.yaml index 169196570af..5d2c2d1d976 100644 --- a/google/services/discoveryengine/resource_discovery_engine_control_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_control_generated_meta.yaml @@ -1,43 +1,43 @@ -resource: 'google_discovery_engine_control' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/Control.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Control' +resource: google_discovery_engine_control +generation_type: mmv1 +source_file: products/discoveryengine/Control.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: Control fields: - - api_field: 'boostAction.dataStore' - - api_field: 'boostAction.filter' - - api_field: 'boostAction.fixedBoost' - - api_field: 'boostAction.interpolationBoostSpec.attributeType' - - api_field: 'boostAction.interpolationBoostSpec.controlPoint.attributeValue' - - api_field: 'boostAction.interpolationBoostSpec.controlPoint.boostAmount' - - api_field: 'boostAction.interpolationBoostSpec.fieldName' - - api_field: 'boostAction.interpolationBoostSpec.interpolationType' - - field: 'collection_id' - provider_only: true - - api_field: 'conditions.activeTimeRange.endTime' - - api_field: 'conditions.activeTimeRange.startTime' - - api_field: 'conditions.queryRegex' - - api_field: 'conditions.queryTerms.fullMatch' - - api_field: 'conditions.queryTerms.value' - - field: 'control_id' - provider_only: true - - api_field: 'displayName' - - field: 'engine_id' - provider_only: true - - api_field: 'filterAction.dataStore' - - api_field: 'filterAction.filter' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'promoteAction.dataStore' - - api_field: 'promoteAction.searchLinkPromotion.description' - - api_field: 'promoteAction.searchLinkPromotion.document' - - api_field: 'promoteAction.searchLinkPromotion.enabled' - - api_field: 'promoteAction.searchLinkPromotion.imageUri' - - api_field: 'promoteAction.searchLinkPromotion.title' - - api_field: 'promoteAction.searchLinkPromotion.uri' - - api_field: 'redirectAction.redirectUri' - - api_field: 'solutionType' - - api_field: 'synonymsAction.synonyms' - - api_field: 'useCases' + - api_field: boostAction.dataStore + - api_field: boostAction.filter + - api_field: boostAction.fixedBoost + - api_field: boostAction.interpolationBoostSpec.attributeType + - api_field: boostAction.interpolationBoostSpec.controlPoint.attributeValue + - api_field: boostAction.interpolationBoostSpec.controlPoint.boostAmount + - api_field: boostAction.interpolationBoostSpec.fieldName + - api_field: boostAction.interpolationBoostSpec.interpolationType + - field: collection_id + provider_only: true + - api_field: conditions.activeTimeRange.endTime + - api_field: conditions.activeTimeRange.startTime + - api_field: conditions.queryRegex + - api_field: conditions.queryTerms.fullMatch + - api_field: conditions.queryTerms.value + - field: control_id + provider_only: true + - api_field: displayName + - field: engine_id + provider_only: true + - api_field: filterAction.dataStore + - api_field: filterAction.filter + - field: location + provider_only: true + - api_field: name + - api_field: promoteAction.dataStore + - api_field: promoteAction.searchLinkPromotion.description + - api_field: promoteAction.searchLinkPromotion.document + - api_field: promoteAction.searchLinkPromotion.enabled + - api_field: promoteAction.searchLinkPromotion.imageUri + - api_field: promoteAction.searchLinkPromotion.title + - api_field: promoteAction.searchLinkPromotion.uri + - api_field: redirectAction.redirectUri + - api_field: solutionType + - api_field: synonymsAction.synonyms + - api_field: useCases diff --git a/google/services/discoveryengine/resource_discovery_engine_data_connector_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_data_connector_generated_meta.yaml index e311900306a..412649ac3ed 100644 --- a/google/services/discoveryengine/resource_discovery_engine_data_connector_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_data_connector_generated_meta.yaml @@ -1,45 +1,45 @@ -resource: 'google_discovery_engine_data_connector' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/DataConnector.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataConnector' +resource: google_discovery_engine_data_connector +generation_type: mmv1 +source_file: products/discoveryengine/DataConnector.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: DataConnector api_variant_patterns: - - 'projects/{project}/locations/{location}/collections/{collection}/dataConnector' + - projects/{project}/locations/{location}/collections/{collection}/dataConnector fields: - - api_field: 'actionState' - - api_field: 'autoRunDisabled' - - api_field: 'blockingReasons' - - field: 'collection_display_name' - provider_only: true - - field: 'collection_id' - provider_only: true - - api_field: 'connectorModes' - - api_field: 'connectorType' - - api_field: 'createTime' - - api_field: 'dataSource' - - api_field: 'entities.dataStore' - - api_field: 'entities.entityName' - - api_field: 'entities.keyPropertyMappings' - - api_field: 'entities.params' - json: true - - api_field: 'errors.code' - - api_field: 'errors.message' - - api_field: 'incrementalRefreshInterval' - - api_field: 'incrementalSyncDisabled' - - api_field: 'jsonParams' - - api_field: 'kmsKeyName' - - api_field: 'lastSyncTime' - - api_field: 'latestPauseTime' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'params' - - api_field: 'privateConnectivityProjectId' - - api_field: 'realtimeState' - - api_field: 'refreshInterval' - - api_field: 'state' - - api_field: 'staticIpAddresses' - - api_field: 'staticIpEnabled' - - api_field: 'syncMode' - - api_field: 'updateTime' + - api_field: actionState + - api_field: autoRunDisabled + - api_field: blockingReasons + - field: collection_display_name + provider_only: true + - field: collection_id + provider_only: true + - api_field: connectorModes + - api_field: connectorType + - api_field: createTime + - api_field: dataSource + - api_field: entities.dataStore + - api_field: entities.entityName + - api_field: entities.keyPropertyMappings + - api_field: entities.params + json: true + - api_field: errors.code + - api_field: errors.message + - api_field: incrementalRefreshInterval + - api_field: incrementalSyncDisabled + - api_field: jsonParams + - api_field: kmsKeyName + - api_field: lastSyncTime + - api_field: latestPauseTime + - field: location + provider_only: true + - api_field: name + - api_field: params + - api_field: privateConnectivityProjectId + - api_field: realtimeState + - api_field: refreshInterval + - api_field: state + - api_field: staticIpAddresses + - api_field: staticIpEnabled + - api_field: syncMode + - api_field: updateTime diff --git a/google/services/discoveryengine/resource_discovery_engine_data_store_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_data_store_generated_meta.yaml index f01f3d09550..8c5ae5d9bf5 100644 --- a/google/services/discoveryengine/resource_discovery_engine_data_store_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_data_store_generated_meta.yaml @@ -1,46 +1,56 @@ -resource: 'google_discovery_engine_data_store' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/DataStore.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataStore' +resource: google_discovery_engine_data_store +generation_type: mmv1 +source_file: products/discoveryengine/DataStore.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: DataStore api_variant_patterns: - - 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}' + - projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} fields: - - api_field: 'advancedSiteSearchConfig.disableAutomaticRefresh' - - api_field: 'advancedSiteSearchConfig.disableInitialIndex' - - api_field: 'contentConfig' - - field: 'create_advanced_site_search' - provider_only: true - - api_field: 'createTime' - - field: 'data_store_id' - provider_only: true - - api_field: 'defaultSchemaId' - - api_field: 'displayName' - - api_field: 'documentProcessingConfig.chunkingConfig.layoutBasedChunkingConfig.chunkSize' - - api_field: 'documentProcessingConfig.chunkingConfig.layoutBasedChunkingConfig.includeAncestorHeadings' - - api_field: 'documentProcessingConfig.defaultParsingConfig.digitalParsingConfig' - - api_field: 'documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.enableImageAnnotation' - - api_field: 'documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.enableTableAnnotation' - - api_field: 'documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.excludeHtmlClasses' - - api_field: 'documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.excludeHtmlElements' - - api_field: 'documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.excludeHtmlIds' - - api_field: 'documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.structuredContentTypes' - - api_field: 'documentProcessingConfig.defaultParsingConfig.ocrParsingConfig.useNativeText' - - api_field: 'documentProcessingConfig.name' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.digitalParsingConfig' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.layoutParsingConfig.enableImageAnnotation' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.layoutParsingConfig.enableTableAnnotation' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.layoutParsingConfig.excludeHtmlClasses' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.layoutParsingConfig.excludeHtmlElements' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.layoutParsingConfig.excludeHtmlIds' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.layoutParsingConfig.structuredContentTypes' - - api_field: 'documentProcessingConfig.parsingConfigOverrides.parsingConfigOverrides.ocrParsingConfig.useNativeText' - - api_field: 'industryVertical' - - api_field: 'kmsKeyName' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'skip_default_schema_creation' - provider_only: true - - api_field: 'solutionTypes' + - api_field: advancedSiteSearchConfig.disableAutomaticRefresh + - api_field: advancedSiteSearchConfig.disableInitialIndex + - api_field: contentConfig + - field: create_advanced_site_search + provider_only: true + - api_field: createTime + - field: data_store_id + provider_only: true + - api_field: defaultSchemaId + - api_field: displayName + - api_field: documentProcessingConfig.chunkingConfig.layoutBasedChunkingConfig.chunkSize + - api_field: documentProcessingConfig.chunkingConfig.layoutBasedChunkingConfig.includeAncestorHeadings + - api_field: documentProcessingConfig.defaultParsingConfig.digitalParsingConfig + - api_field: documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.enableImageAnnotation + - api_field: documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.enableTableAnnotation + - api_field: documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.excludeHtmlClasses + - api_field: documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.excludeHtmlElements + - api_field: documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.excludeHtmlIds + - api_field: documentProcessingConfig.defaultParsingConfig.layoutParsingConfig.structuredContentTypes + - api_field: documentProcessingConfig.defaultParsingConfig.ocrParsingConfig.useNativeText + - api_field: documentProcessingConfig.name + - api_field: documentProcessingConfig.parsingConfigOverrides.key + field: document_processing_config.parsing_config_overrides.file_type + - api_field: documentProcessingConfig.parsingConfigOverrides.value.digitalParsingConfig + field: document_processing_config.parsing_config_overrides.digital_parsing_config + - api_field: documentProcessingConfig.parsingConfigOverrides.value.layoutParsingConfig.enableImageAnnotation + field: document_processing_config.parsing_config_overrides.layout_parsing_config.enable_image_annotation + - api_field: documentProcessingConfig.parsingConfigOverrides.value.layoutParsingConfig.enableTableAnnotation + field: document_processing_config.parsing_config_overrides.layout_parsing_config.enable_table_annotation + - api_field: documentProcessingConfig.parsingConfigOverrides.value.layoutParsingConfig.excludeHtmlClasses + field: document_processing_config.parsing_config_overrides.layout_parsing_config.exclude_html_classes + - api_field: documentProcessingConfig.parsingConfigOverrides.value.layoutParsingConfig.excludeHtmlElements + field: document_processing_config.parsing_config_overrides.layout_parsing_config.exclude_html_elements + - api_field: documentProcessingConfig.parsingConfigOverrides.value.layoutParsingConfig.excludeHtmlIds + field: document_processing_config.parsing_config_overrides.layout_parsing_config.exclude_html_ids + - api_field: documentProcessingConfig.parsingConfigOverrides.value.layoutParsingConfig.structuredContentTypes + field: document_processing_config.parsing_config_overrides.layout_parsing_config.structured_content_types + - api_field: documentProcessingConfig.parsingConfigOverrides.value.ocrParsingConfig.useNativeText + field: document_processing_config.parsing_config_overrides.ocr_parsing_config.use_native_text + - api_field: industryVertical + - api_field: kmsKeyName + - field: location + provider_only: true + - api_field: name + - field: skip_default_schema_creation + provider_only: true + - api_field: solutionTypes diff --git a/google/services/discoveryengine/resource_discovery_engine_license_config_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_license_config_generated_meta.yaml index 3045bb0f562..44c6d38ab13 100644 --- a/google/services/discoveryengine/resource_discovery_engine_license_config_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_license_config_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_discovery_engine_license_config' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/LicenseConfig.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'LicenseConfig' +resource: google_discovery_engine_license_config +generation_type: mmv1 +source_file: products/discoveryengine/LicenseConfig.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: LicenseConfig fields: - - api_field: 'autoRenew' - - api_field: 'endDate.day' - - api_field: 'endDate.month' - - api_field: 'endDate.year' - - api_field: 'freeTrial' - - field: 'license_config_id' - provider_only: true - - api_field: 'licenseCount' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'startDate.day' - - api_field: 'startDate.month' - - api_field: 'startDate.year' - - api_field: 'subscriptionTerm' - - api_field: 'subscriptionTier' + - api_field: autoRenew + - api_field: endDate.day + - api_field: endDate.month + - api_field: endDate.year + - api_field: freeTrial + - field: license_config_id + provider_only: true + - api_field: licenseCount + - field: location + provider_only: true + - api_field: name + - api_field: startDate.day + - api_field: startDate.month + - api_field: startDate.year + - api_field: subscriptionTerm + - api_field: subscriptionTier diff --git a/google/services/discoveryengine/resource_discovery_engine_recommendation_engine_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_recommendation_engine_generated_meta.yaml index 310932b6c95..660243e629f 100644 --- a/google/services/discoveryengine/resource_discovery_engine_recommendation_engine_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_recommendation_engine_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_discovery_engine_recommendation_engine' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/RecommendationEngine.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Engine' +resource: google_discovery_engine_recommendation_engine +generation_type: mmv1 +source_file: products/discoveryengine/RecommendationEngine.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: Engine fields: - - api_field: 'commonConfig.companyName' - - api_field: 'createTime' - - api_field: 'dataStoreIds' - - api_field: 'displayName' - - field: 'engine_id' - provider_only: true - - api_field: 'industryVertical' - - field: 'location' - provider_only: true - - api_field: 'mediaRecommendationEngineConfig.engineFeaturesConfig.mostPopularConfig.timeWindowDays' - - api_field: 'mediaRecommendationEngineConfig.engineFeaturesConfig.recommendedForYouConfig.contextEventType' - - api_field: 'mediaRecommendationEngineConfig.optimizationObjective' - - api_field: 'mediaRecommendationEngineConfig.optimizationObjectiveConfig.targetField' - - api_field: 'mediaRecommendationEngineConfig.optimizationObjectiveConfig.targetFieldValueFloat' - - api_field: 'mediaRecommendationEngineConfig.trainingState' - - api_field: 'mediaRecommendationEngineConfig.type' - - api_field: 'name' - - api_field: 'updateTime' + - api_field: commonConfig.companyName + - api_field: createTime + - api_field: dataStoreIds + - api_field: displayName + - field: engine_id + provider_only: true + - api_field: industryVertical + - field: location + provider_only: true + - api_field: mediaRecommendationEngineConfig.engineFeaturesConfig.mostPopularConfig.timeWindowDays + - api_field: mediaRecommendationEngineConfig.engineFeaturesConfig.recommendedForYouConfig.contextEventType + - api_field: mediaRecommendationEngineConfig.optimizationObjective + - api_field: mediaRecommendationEngineConfig.optimizationObjectiveConfig.targetField + - api_field: mediaRecommendationEngineConfig.optimizationObjectiveConfig.targetFieldValueFloat + - api_field: mediaRecommendationEngineConfig.trainingState + - api_field: mediaRecommendationEngineConfig.type + - api_field: name + - api_field: updateTime diff --git a/google/services/discoveryengine/resource_discovery_engine_schema_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_schema_generated_meta.yaml index 5815d8c30e2..15e96593c71 100644 --- a/google/services/discoveryengine/resource_discovery_engine_schema_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_schema_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_discovery_engine_schema' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/Schema.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Schema' +resource: google_discovery_engine_schema +generation_type: mmv1 +source_file: products/discoveryengine/Schema.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: Schema api_variant_patterns: - - 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/schemas/{schema}' + - projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/schemas/{schema} fields: - - field: 'data_store_id' - provider_only: true - - api_field: 'jsonSchema' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'schema_id' - provider_only: true + - field: data_store_id + provider_only: true + - api_field: jsonSchema + - field: location + provider_only: true + - api_field: name + - field: schema_id + provider_only: true diff --git a/google/services/discoveryengine/resource_discovery_engine_search_engine_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_search_engine_generated_meta.yaml index 20f1be04d01..073e271ef67 100644 --- a/google/services/discoveryengine/resource_discovery_engine_search_engine_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_search_engine_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_discovery_engine_search_engine' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/SearchEngine.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Engine' +resource: google_discovery_engine_search_engine +generation_type: mmv1 +source_file: products/discoveryengine/SearchEngine.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: Engine fields: - - api_field: 'appType' - - field: 'collection_id' - provider_only: true - - api_field: 'commonConfig.companyName' - - api_field: 'createTime' - - api_field: 'dataStoreIds' - - api_field: 'displayName' - - field: 'engine_id' - provider_only: true - - api_field: 'features' - - api_field: 'industryVertical' - - api_field: 'kmsKeyName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'searchEngineConfig.searchAddOns' - - api_field: 'searchEngineConfig.searchTier' - - api_field: 'updateTime' + - api_field: appType + - field: collection_id + provider_only: true + - api_field: commonConfig.companyName + - api_field: createTime + - api_field: dataStoreIds + - api_field: displayName + - field: engine_id + provider_only: true + - api_field: features + - api_field: industryVertical + - api_field: kmsKeyName + - field: location + provider_only: true + - api_field: name + - api_field: searchEngineConfig.searchAddOns + - api_field: searchEngineConfig.searchTier + - api_field: updateTime diff --git a/google/services/discoveryengine/resource_discovery_engine_serving_config_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_serving_config_generated_meta.yaml index 705472c567d..1c0f837631e 100644 --- a/google/services/discoveryengine/resource_discovery_engine_serving_config_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_serving_config_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_discovery_engine_serving_config' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/ServingConfig.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServingConfig' +resource: google_discovery_engine_serving_config +generation_type: mmv1 +source_file: products/discoveryengine/ServingConfig.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: ServingConfig fields: - - api_field: 'boostControlIds' - - field: 'collection_id' - provider_only: true - - field: 'engine_id' - provider_only: true - - api_field: 'filterControlIds' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'promoteControlIds' - - api_field: 'redirectControlIds' - - field: 'serving_config_id' - provider_only: true - - api_field: 'synonymsControlIds' + - api_field: boostControlIds + - field: collection_id + provider_only: true + - field: engine_id + provider_only: true + - api_field: filterControlIds + - field: location + provider_only: true + - api_field: name + - api_field: promoteControlIds + - api_field: redirectControlIds + - field: serving_config_id + provider_only: true + - api_field: synonymsControlIds diff --git a/google/services/discoveryengine/resource_discovery_engine_sitemap_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_sitemap_generated_meta.yaml index f82fc80c4ea..7a4ad74b2c9 100644 --- a/google/services/discoveryengine/resource_discovery_engine_sitemap_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_sitemap_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_discovery_engine_sitemap' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/Sitemap.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Sitemap' +resource: google_discovery_engine_sitemap +generation_type: mmv1 +source_file: products/discoveryengine/Sitemap.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: Sitemap fields: - - api_field: 'createTime' - - field: 'data_store_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'sitemap_id' - provider_only: true - - api_field: 'uri' + - api_field: createTime + - field: data_store_id + provider_only: true + - field: location + provider_only: true + - api_field: name + - field: sitemap_id + provider_only: true + - api_field: uri diff --git a/google/services/discoveryengine/resource_discovery_engine_target_site_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_target_site_generated_meta.yaml index 30c2b53d7a4..cec180aa931 100644 --- a/google/services/discoveryengine/resource_discovery_engine_target_site_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_target_site_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_discovery_engine_target_site' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/TargetSite.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TargetSite' +resource: google_discovery_engine_target_site +generation_type: mmv1 +source_file: products/discoveryengine/TargetSite.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: TargetSite api_variant_patterns: - - 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/siteSearchEngine/targetSites/{targetSite}' + - projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/siteSearchEngine/targetSites/{targetSite} fields: - - field: 'data_store_id' - provider_only: true - - api_field: 'exactMatch' - - api_field: 'failureReason.quotaFailure.totalRequiredQuota' - - api_field: 'generatedUriPattern' - - api_field: 'indexingStatus' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'providedUriPattern' - - api_field: 'rootDomainUri' - - api_field: 'siteVerificationInfo.siteVerificationState' - - api_field: 'siteVerificationInfo.verifyTime' - - field: 'target_site_id' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - field: data_store_id + provider_only: true + - api_field: exactMatch + - api_field: failureReason.quotaFailure.totalRequiredQuota + - api_field: generatedUriPattern + - api_field: indexingStatus + - field: location + provider_only: true + - api_field: name + - api_field: providedUriPattern + - api_field: rootDomainUri + - api_field: siteVerificationInfo.siteVerificationState + - api_field: siteVerificationInfo.verifyTime + - field: target_site_id + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/discoveryengine/resource_discovery_engine_user_store_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_user_store_generated_meta.yaml index d691c2cba50..e5552912eed 100644 --- a/google/services/discoveryengine/resource_discovery_engine_user_store_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_user_store_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_discovery_engine_user_store' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/UserStore.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'UserStore' +resource: google_discovery_engine_user_store +generation_type: mmv1 +source_file: products/discoveryengine/UserStore.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: UserStore fields: - - api_field: 'defaultLicenseConfig' - - api_field: 'enableExpiredLicenseAutoUpdate' - - api_field: 'enableLicenseAutoRegister' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'user_store_id' - provider_only: true + - api_field: defaultLicenseConfig + - api_field: enableExpiredLicenseAutoUpdate + - api_field: enableLicenseAutoRegister + - field: location + provider_only: true + - api_field: name + - field: user_store_id + provider_only: true diff --git a/google/services/discoveryengine/resource_discovery_engine_widget_config_generated_meta.yaml b/google/services/discoveryengine/resource_discovery_engine_widget_config_generated_meta.yaml index 2b4c04bbccc..7072f96548e 100644 --- a/google/services/discoveryengine/resource_discovery_engine_widget_config_generated_meta.yaml +++ b/google/services/discoveryengine/resource_discovery_engine_widget_config_generated_meta.yaml @@ -1,52 +1,57 @@ -resource: 'google_discovery_engine_widget_config' -generation_type: 'mmv1' -source_file: 'products/discoveryengine/WidgetConfig.yaml' -api_service_name: 'discoveryengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WidgetConfig' +resource: google_discovery_engine_widget_config +generation_type: mmv1 +source_file: products/discoveryengine/WidgetConfig.yaml +api_service_name: discoveryengine.googleapis.com +api_version: v1 +api_resource_type_kind: WidgetConfig fields: - - api_field: 'accessSettings.allowPublicAccess' - - api_field: 'accessSettings.allowlistedDomains' - - api_field: 'accessSettings.enableWebApp' - - api_field: 'accessSettings.languageCode' - - api_field: 'accessSettings.workforceIdentityPoolProvider' - - field: 'collection_id' - provider_only: true - - field: 'engine_id' - provider_only: true - - api_field: 'homepageSetting.shortcuts.destinationUri' - - api_field: 'homepageSetting.shortcuts.icon.url' - - api_field: 'homepageSetting.shortcuts.title' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'uiBranding.logo.url' - - api_field: 'uiSettings.dataStoreUiConfigs.facetField.displayName' - - api_field: 'uiSettings.dataStoreUiConfigs.facetField.field' - - api_field: 'uiSettings.dataStoreUiConfigs.fieldsUiComponentsMap.fieldsUiComponentsMap.deviceVisibility' - - api_field: 'uiSettings.dataStoreUiConfigs.fieldsUiComponentsMap.fieldsUiComponentsMap.displayTemplate' - - api_field: 'uiSettings.dataStoreUiConfigs.fieldsUiComponentsMap.fieldsUiComponentsMap.field' - - api_field: 'uiSettings.dataStoreUiConfigs.name' - - api_field: 'uiSettings.defaultSearchRequestOrderBy' - - api_field: 'uiSettings.disableUserEventsCollection' - - api_field: 'uiSettings.enableAutocomplete' - - api_field: 'uiSettings.enableCreateAgentButton' - - api_field: 'uiSettings.enablePeopleSearch' - - api_field: 'uiSettings.enableQualityFeedback' - - api_field: 'uiSettings.enableSafeSearch' - - api_field: 'uiSettings.enableSearchAsYouType' - - api_field: 'uiSettings.enableVisualContentSummary' - - api_field: 'uiSettings.generativeAnswerConfig.disableRelatedQuestions' - - api_field: 'uiSettings.generativeAnswerConfig.ignoreAdversarialQuery' - - api_field: 'uiSettings.generativeAnswerConfig.ignoreLowRelevantContent' - - api_field: 'uiSettings.generativeAnswerConfig.ignoreNonAnswerSeekingQuery' - - api_field: 'uiSettings.generativeAnswerConfig.imageSource' - - api_field: 'uiSettings.generativeAnswerConfig.languageCode' - - api_field: 'uiSettings.generativeAnswerConfig.maxRephraseSteps' - - api_field: 'uiSettings.generativeAnswerConfig.modelPromptPreamble' - - api_field: 'uiSettings.generativeAnswerConfig.modelVersion' - - api_field: 'uiSettings.generativeAnswerConfig.resultCount' - - api_field: 'uiSettings.interactionType' - - api_field: 'uiSettings.resultDescriptionType' - - field: 'widget_config_id' - provider_only: true + - api_field: accessSettings.allowPublicAccess + - api_field: accessSettings.allowlistedDomains + - api_field: accessSettings.enableWebApp + - api_field: accessSettings.languageCode + - api_field: accessSettings.workforceIdentityPoolProvider + - field: collection_id + provider_only: true + - field: engine_id + provider_only: true + - api_field: homepageSetting.shortcuts.destinationUri + - api_field: homepageSetting.shortcuts.icon.url + - api_field: homepageSetting.shortcuts.title + - field: location + provider_only: true + - api_field: name + - api_field: uiBranding.logo.url + - api_field: uiSettings.dataStoreUiConfigs.facetField.displayName + - api_field: uiSettings.dataStoreUiConfigs.facetField.field + - api_field: uiSettings.dataStoreUiConfigs.fieldsUiComponentsMap.key + field: ui_settings.data_store_ui_configs.fields_ui_components_map.ui_component + - api_field: uiSettings.dataStoreUiConfigs.fieldsUiComponentsMap.value.deviceVisibility + field: ui_settings.data_store_ui_configs.fields_ui_components_map.device_visibility + - api_field: uiSettings.dataStoreUiConfigs.fieldsUiComponentsMap.value.displayTemplate + field: ui_settings.data_store_ui_configs.fields_ui_components_map.display_template + - api_field: uiSettings.dataStoreUiConfigs.fieldsUiComponentsMap.value.field + field: ui_settings.data_store_ui_configs.fields_ui_components_map.field + - api_field: uiSettings.dataStoreUiConfigs.name + - api_field: uiSettings.defaultSearchRequestOrderBy + - api_field: uiSettings.disableUserEventsCollection + - api_field: uiSettings.enableAutocomplete + - api_field: uiSettings.enableCreateAgentButton + - api_field: uiSettings.enablePeopleSearch + - api_field: uiSettings.enableQualityFeedback + - api_field: uiSettings.enableSafeSearch + - api_field: uiSettings.enableSearchAsYouType + - api_field: uiSettings.enableVisualContentSummary + - api_field: uiSettings.generativeAnswerConfig.disableRelatedQuestions + - api_field: uiSettings.generativeAnswerConfig.ignoreAdversarialQuery + - api_field: uiSettings.generativeAnswerConfig.ignoreLowRelevantContent + - api_field: uiSettings.generativeAnswerConfig.ignoreNonAnswerSeekingQuery + - api_field: uiSettings.generativeAnswerConfig.imageSource + - api_field: uiSettings.generativeAnswerConfig.languageCode + - api_field: uiSettings.generativeAnswerConfig.maxRephraseSteps + - api_field: uiSettings.generativeAnswerConfig.modelPromptPreamble + - api_field: uiSettings.generativeAnswerConfig.modelVersion + - api_field: uiSettings.generativeAnswerConfig.resultCount + - api_field: uiSettings.interactionType + - api_field: uiSettings.resultDescriptionType + - field: widget_config_id + provider_only: true diff --git a/google/services/dns/iam_dns_managed_zone_generated_test.go b/google/services/dns/iam_dns_managed_zone_generated_test.go index 2558960540b..540ae3e61a4 100644 --- a/google/services/dns/iam_dns_managed_zone_generated_test.go +++ b/google/services/dns/iam_dns_managed_zone_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccDNSManagedZoneIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dns_managed_zone_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/managedZones/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-zone-googlecloudexample%s", context["random_suffix"])), + ImportStateIdFunc: generateDNSManagedZoneIAMBindingStateID("google_dns_managed_zone_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccDNSManagedZoneIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_dns_managed_zone_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/managedZones/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-zone-googlecloudexample%s", context["random_suffix"])), + ImportStateIdFunc: generateDNSManagedZoneIAMBindingStateID("google_dns_managed_zone_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccDNSManagedZoneIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_dns_managed_zone_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/managedZones/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-zone-googlecloudexample%s", context["random_suffix"])), + ImportStateIdFunc: generateDNSManagedZoneIAMMemberStateID("google_dns_managed_zone_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccDNSManagedZoneIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dns_managed_zone_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/managedZones/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-zone-googlecloudexample%s", context["random_suffix"])), + ImportStateIdFunc: generateDNSManagedZoneIAMPolicyStateID("google_dns_managed_zone_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccDNSManagedZoneIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_dns_managed_zone_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/managedZones/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-zone-googlecloudexample%s", context["random_suffix"])), + ImportStateIdFunc: generateDNSManagedZoneIAMPolicyStateID("google_dns_managed_zone_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -482,3 +483,54 @@ resource "google_dns_managed_zone_iam_binding" "foo" { } `, context) } + +func generateDNSManagedZoneIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + managed_zone := tpgresource.GetResourceNameFromSelfLink(rawState["managed_zone"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/managedZones/%s", project, managed_zone), "", "", rawState["condition.0.title"]), nil + } +} + +func generateDNSManagedZoneIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + managed_zone := tpgresource.GetResourceNameFromSelfLink(rawState["managed_zone"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/managedZones/%s", project, managed_zone), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateDNSManagedZoneIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + managed_zone := tpgresource.GetResourceNameFromSelfLink(rawState["managed_zone"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/managedZones/%s", project, managed_zone), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/dns/resource_dns_managed_zone_generated_meta.yaml b/google/services/dns/resource_dns_managed_zone_generated_meta.yaml index 8d4018f5570..fc598ed85f1 100644 --- a/google/services/dns/resource_dns_managed_zone_generated_meta.yaml +++ b/google/services/dns/resource_dns_managed_zone_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_dns_managed_zone' -generation_type: 'mmv1' -source_file: 'products/dns/ManagedZone.yaml' -api_service_name: 'dns.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ManagedZone' +resource: google_dns_managed_zone +generation_type: mmv1 +source_file: products/dns/ManagedZone.yaml +api_service_name: dns.googleapis.com +api_version: v1 +api_resource_type_kind: ManagedZone fields: - - api_field: 'cloudLoggingConfig.enableLogging' - - api_field: 'creationTime' - - api_field: 'description' - - api_field: 'dnsName' - - api_field: 'dnssecConfig.defaultKeySpecs.algorithm' - - api_field: 'dnssecConfig.defaultKeySpecs.keyLength' - - api_field: 'dnssecConfig.defaultKeySpecs.keyType' - - api_field: 'dnssecConfig.defaultKeySpecs.kind' - - api_field: 'dnssecConfig.kind' - - api_field: 'dnssecConfig.nonExistence' - - api_field: 'dnssecConfig.state' - - field: 'effective_labels' - provider_only: true - - field: 'force_destroy' - provider_only: true - - api_field: 'forwardingConfig.targetNameServers.domainName' - - api_field: 'forwardingConfig.targetNameServers.forwardingPath' - - api_field: 'forwardingConfig.targetNameServers.ipv4Address' - - api_field: 'forwardingConfig.targetNameServers.ipv6Address' - - api_field: 'labels' - - api_field: 'id' - field: 'managed_zone_id' - - api_field: 'name' - - api_field: 'nameServers' - - api_field: 'peeringConfig.targetNetwork.networkUrl' - - api_field: 'privateVisibilityConfig.gkeClusters.gkeClusterName' - - api_field: 'privateVisibilityConfig.networks.networkUrl' - - field: 'terraform_labels' - provider_only: true - - api_field: 'visibility' + - api_field: cloudLoggingConfig.enableLogging + - api_field: creationTime + - api_field: description + - api_field: dnsName + - api_field: dnssecConfig.defaultKeySpecs.algorithm + - api_field: dnssecConfig.defaultKeySpecs.keyLength + - api_field: dnssecConfig.defaultKeySpecs.keyType + - api_field: dnssecConfig.defaultKeySpecs.kind + - api_field: dnssecConfig.kind + - api_field: dnssecConfig.nonExistence + - api_field: dnssecConfig.state + - field: effective_labels + provider_only: true + - field: force_destroy + provider_only: true + - api_field: forwardingConfig.targetNameServers.domainName + - api_field: forwardingConfig.targetNameServers.forwardingPath + - api_field: forwardingConfig.targetNameServers.ipv4Address + - api_field: forwardingConfig.targetNameServers.ipv6Address + - api_field: labels + - api_field: id + field: managed_zone_id + - api_field: name + - api_field: nameServers + - api_field: peeringConfig.targetNetwork.networkUrl + - api_field: privateVisibilityConfig.gkeClusters.gkeClusterName + - api_field: privateVisibilityConfig.networks.networkUrl + - field: terraform_labels + provider_only: true + - api_field: visibility diff --git a/google/services/dns/resource_dns_policy_generated_meta.yaml b/google/services/dns/resource_dns_policy_generated_meta.yaml index 4b99bc850dc..4cb83553667 100644 --- a/google/services/dns/resource_dns_policy_generated_meta.yaml +++ b/google/services/dns/resource_dns_policy_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_dns_policy' -generation_type: 'mmv1' -source_file: 'products/dns/Policy.yaml' -api_service_name: 'dns.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Policy' +resource: google_dns_policy +generation_type: mmv1 +source_file: products/dns/Policy.yaml +api_service_name: dns.googleapis.com +api_version: v1 +api_resource_type_kind: Policy fields: - - api_field: 'alternativeNameServerConfig.targetNameServers.forwardingPath' - - api_field: 'alternativeNameServerConfig.targetNameServers.ipv4Address' - - api_field: 'description' - - api_field: 'dns64Config.scope.allQueries' - - api_field: 'enableInboundForwarding' - - api_field: 'enableLogging' - - api_field: 'name' - - api_field: 'networks.networkUrl' + - api_field: alternativeNameServerConfig.targetNameServers.forwardingPath + - api_field: alternativeNameServerConfig.targetNameServers.ipv4Address + - api_field: description + - api_field: dns64Config.scope.allQueries + - api_field: enableInboundForwarding + - api_field: enableLogging + - api_field: name + - api_field: networks.networkUrl diff --git a/google/services/dns/resource_dns_response_policy_generated_meta.yaml b/google/services/dns/resource_dns_response_policy_generated_meta.yaml index a5d4b39e406..1f22eb31fb4 100644 --- a/google/services/dns/resource_dns_response_policy_generated_meta.yaml +++ b/google/services/dns/resource_dns_response_policy_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_dns_response_policy' -generation_type: 'mmv1' -source_file: 'products/dns/ResponsePolicy.yaml' -api_service_name: 'dns.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ResponsePolicy' +resource: google_dns_response_policy +generation_type: mmv1 +source_file: products/dns/ResponsePolicy.yaml +api_service_name: dns.googleapis.com +api_version: v1 +api_resource_type_kind: ResponsePolicy fields: - - api_field: 'description' - - api_field: 'gkeClusters.gkeClusterName' - - api_field: 'networks.networkUrl' - - api_field: 'responsePolicyName' + - api_field: description + - api_field: gkeClusters.gkeClusterName + - api_field: networks.networkUrl + - api_field: responsePolicyName diff --git a/google/services/dns/resource_dns_response_policy_rule_generated_meta.yaml b/google/services/dns/resource_dns_response_policy_rule_generated_meta.yaml index 6cc38efadd3..23a737a458b 100644 --- a/google/services/dns/resource_dns_response_policy_rule_generated_meta.yaml +++ b/google/services/dns/resource_dns_response_policy_rule_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_dns_response_policy_rule' -generation_type: 'mmv1' -source_file: 'products/dns/ResponsePolicyRule.yaml' -api_service_name: 'dns.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ResponsePolicyRule' +resource: google_dns_response_policy_rule +generation_type: mmv1 +source_file: products/dns/ResponsePolicyRule.yaml +api_service_name: dns.googleapis.com +api_version: v1 +api_resource_type_kind: ResponsePolicyRule fields: - - api_field: 'dnsName' - - api_field: 'localData.localDatas.name' - - api_field: 'localData.localDatas.rrdatas' - - api_field: 'localData.localDatas.ttl' - - api_field: 'localData.localDatas.type' - - field: 'response_policy' - provider_only: true - - api_field: 'ruleName' + - api_field: dnsName + - api_field: localData.localDatas.name + - api_field: localData.localDatas.rrdatas + - api_field: localData.localDatas.ttl + - api_field: localData.localDatas.type + - field: response_policy + provider_only: true + - api_field: ruleName diff --git a/google/services/documentai/resource_document_ai_processor_default_version_generated_meta.yaml b/google/services/documentai/resource_document_ai_processor_default_version_generated_meta.yaml index 02f84d0d868..da27a4afa8c 100644 --- a/google/services/documentai/resource_document_ai_processor_default_version_generated_meta.yaml +++ b/google/services/documentai/resource_document_ai_processor_default_version_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_document_ai_processor_default_version' -generation_type: 'mmv1' -source_file: 'products/documentai/ProcessorDefaultVersion.yaml' -api_service_name: 'documentai.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Processor' +resource: google_document_ai_processor_default_version +generation_type: mmv1 +source_file: products/documentai/ProcessorDefaultVersion.yaml +api_service_name: documentai.googleapis.com +api_version: v1 +api_resource_type_kind: Processor fields: - - api_field: 'processor' - - api_field: 'defaultProcessorVersion' - field: 'version' + - api_field: processor + - api_field: defaultProcessorVersion + field: version diff --git a/google/services/documentai/resource_document_ai_processor_generated_meta.yaml b/google/services/documentai/resource_document_ai_processor_generated_meta.yaml index 00fb6be671a..44c05998ee5 100644 --- a/google/services/documentai/resource_document_ai_processor_generated_meta.yaml +++ b/google/services/documentai/resource_document_ai_processor_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_document_ai_processor' -generation_type: 'mmv1' -source_file: 'products/documentai/Processor.yaml' -api_service_name: 'documentai.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Processor' +resource: google_document_ai_processor +generation_type: mmv1 +source_file: products/documentai/Processor.yaml +api_service_name: documentai.googleapis.com +api_version: v1 +api_resource_type_kind: Processor fields: - - api_field: 'displayName' - - api_field: 'kmsKeyName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'type' + - api_field: displayName + - api_field: kmsKeyName + - field: location + provider_only: true + - api_field: name + - api_field: type diff --git a/google/services/documentaiwarehouse/resource_document_ai_warehouse_document_schema_generated_meta.yaml b/google/services/documentaiwarehouse/resource_document_ai_warehouse_document_schema_generated_meta.yaml index 2459d8d0151..e2274700347 100644 --- a/google/services/documentaiwarehouse/resource_document_ai_warehouse_document_schema_generated_meta.yaml +++ b/google/services/documentaiwarehouse/resource_document_ai_warehouse_document_schema_generated_meta.yaml @@ -1,52 +1,52 @@ -resource: 'google_document_ai_warehouse_document_schema' -generation_type: 'mmv1' -source_file: 'products/documentaiwarehouse/DocumentSchema.yaml' -api_service_name: 'contentwarehouse.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DocumentSchema' +resource: google_document_ai_warehouse_document_schema +generation_type: mmv1 +source_file: products/documentaiwarehouse/DocumentSchema.yaml +api_service_name: contentwarehouse.googleapis.com +api_version: v1 +api_resource_type_kind: DocumentSchema api_variant_patterns: - - 'projects/{project}/locations/{location}/documentSchemas/{documentSchema}' + - projects/{project}/locations/{location}/documentSchemas/{documentSchema} fields: - - api_field: 'displayName' - - api_field: 'documentIsFolder' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'project_number' - provider_only: true - - api_field: 'propertyDefinitions.dateTimeTypeOptions' - - api_field: 'propertyDefinitions.displayName' - - api_field: 'propertyDefinitions.enumTypeOptions.possibleValues' - - api_field: 'propertyDefinitions.enumTypeOptions.validationCheckDisabled' - - api_field: 'propertyDefinitions.floatTypeOptions' - - api_field: 'propertyDefinitions.integerTypeOptions' - - api_field: 'propertyDefinitions.isFilterable' - - api_field: 'propertyDefinitions.isMetadata' - - api_field: 'propertyDefinitions.isRepeatable' - - api_field: 'propertyDefinitions.isRequired' - - api_field: 'propertyDefinitions.isSearchable' - - api_field: 'propertyDefinitions.mapTypeOptions' - - api_field: 'propertyDefinitions.name' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.dateTimeTypeOptions' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.displayName' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.enumTypeOptions.possibleValues' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.enumTypeOptions.validationCheckDisabled' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.floatTypeOptions' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.integerTypeOptions' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.isFilterable' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.isMetadata' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.isRepeatable' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.isRequired' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.isSearchable' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.mapTypeOptions' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.name' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.retrievalImportance' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.schemaSources.name' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.schemaSources.processorType' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.textTypeOptions' - - api_field: 'propertyDefinitions.propertyTypeOptions.propertyDefinitions.timestampTypeOptions' - - api_field: 'propertyDefinitions.retrievalImportance' - - api_field: 'propertyDefinitions.schemaSources.name' - - api_field: 'propertyDefinitions.schemaSources.processorType' - - api_field: 'propertyDefinitions.textTypeOptions' - - api_field: 'propertyDefinitions.timestampTypeOptions' + - api_field: displayName + - api_field: documentIsFolder + - field: location + provider_only: true + - api_field: name + - field: project_number + provider_only: true + - api_field: propertyDefinitions.dateTimeTypeOptions + - api_field: propertyDefinitions.displayName + - api_field: propertyDefinitions.enumTypeOptions.possibleValues + - api_field: propertyDefinitions.enumTypeOptions.validationCheckDisabled + - api_field: propertyDefinitions.floatTypeOptions + - api_field: propertyDefinitions.integerTypeOptions + - api_field: propertyDefinitions.isFilterable + - api_field: propertyDefinitions.isMetadata + - api_field: propertyDefinitions.isRepeatable + - api_field: propertyDefinitions.isRequired + - api_field: propertyDefinitions.isSearchable + - api_field: propertyDefinitions.mapTypeOptions + - api_field: propertyDefinitions.name + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.dateTimeTypeOptions + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.displayName + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.enumTypeOptions.possibleValues + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.enumTypeOptions.validationCheckDisabled + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.floatTypeOptions + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.integerTypeOptions + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.isFilterable + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.isMetadata + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.isRepeatable + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.isRequired + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.isSearchable + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.mapTypeOptions + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.name + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.retrievalImportance + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.schemaSources.name + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.schemaSources.processorType + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.textTypeOptions + - api_field: propertyDefinitions.propertyTypeOptions.propertyDefinitions.timestampTypeOptions + - api_field: propertyDefinitions.retrievalImportance + - api_field: propertyDefinitions.schemaSources.name + - api_field: propertyDefinitions.schemaSources.processorType + - api_field: propertyDefinitions.textTypeOptions + - api_field: propertyDefinitions.timestampTypeOptions diff --git a/google/services/documentaiwarehouse/resource_document_ai_warehouse_location_generated_meta.yaml b/google/services/documentaiwarehouse/resource_document_ai_warehouse_location_generated_meta.yaml index afe4714b0c7..5328c5fe9aa 100644 --- a/google/services/documentaiwarehouse/resource_document_ai_warehouse_location_generated_meta.yaml +++ b/google/services/documentaiwarehouse/resource_document_ai_warehouse_location_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_document_ai_warehouse_location' -generation_type: 'mmv1' -source_file: 'products/documentaiwarehouse/Location.yaml' -api_service_name: 'contentwarehouse.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Location' +resource: google_document_ai_warehouse_location +generation_type: mmv1 +source_file: products/documentaiwarehouse/Location.yaml +api_service_name: contentwarehouse.googleapis.com +api_version: v1 +api_resource_type_kind: Location fields: - - api_field: 'accessControlMode' - - api_field: 'databaseType' - - api_field: 'documentCreatorDefaultRole' - - api_field: 'kmsKey' - - field: 'location' - provider_only: true - - field: 'project_number' - provider_only: true + - api_field: accessControlMode + - api_field: databaseType + - api_field: documentCreatorDefaultRole + - api_field: kmsKey + - field: location + provider_only: true + - field: project_number + provider_only: true diff --git a/google/services/edgecontainer/resource_edgecontainer_cluster_generated_meta.yaml b/google/services/edgecontainer/resource_edgecontainer_cluster_generated_meta.yaml index 5df85e7996d..1d709399eb4 100644 --- a/google/services/edgecontainer/resource_edgecontainer_cluster_generated_meta.yaml +++ b/google/services/edgecontainer/resource_edgecontainer_cluster_generated_meta.yaml @@ -1,64 +1,64 @@ -resource: 'google_edgecontainer_cluster' -generation_type: 'mmv1' -source_file: 'products/edgecontainer/Cluster.yaml' -api_service_name: 'edgecontainer.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Cluster' +resource: google_edgecontainer_cluster +generation_type: mmv1 +source_file: products/edgecontainer/Cluster.yaml +api_service_name: edgecontainer.googleapis.com +api_version: v1 +api_resource_type_kind: Cluster fields: - - api_field: 'authorization.adminUsers.username' - - api_field: 'clusterCaCertificate' - - api_field: 'controlPlane.local.machineFilter' - - api_field: 'controlPlane.local.nodeCount' - - api_field: 'controlPlane.local.nodeLocation' - - api_field: 'controlPlane.local.sharedDeploymentPolicy' - - api_field: 'controlPlane.remote.nodeLocation' - - api_field: 'controlPlaneEncryption.kmsKey' - - api_field: 'controlPlaneEncryption.kmsKeyActiveVersion' - - api_field: 'controlPlaneEncryption.kmsKeyState' - - api_field: 'controlPlaneEncryption.kmsStatus.code' - - api_field: 'controlPlaneEncryption.kmsStatus.message' - - api_field: 'controlPlaneVersion' - - api_field: 'createTime' - - api_field: 'defaultMaxPodsPerNode' - - field: 'effective_labels' - provider_only: true - - api_field: 'endpoint' - - api_field: 'externalLoadBalancerIpv4AddressPools' - - api_field: 'fleet.membership' - - api_field: 'fleet.project' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'maintenanceEvents.createTime' - - api_field: 'maintenanceEvents.endTime' - - api_field: 'maintenanceEvents.operation' - - api_field: 'maintenanceEvents.schedule' - - api_field: 'maintenanceEvents.startTime' - - api_field: 'maintenanceEvents.state' - - api_field: 'maintenanceEvents.targetVersion' - - api_field: 'maintenanceEvents.type' - - api_field: 'maintenanceEvents.updateTime' - - api_field: 'maintenanceEvents.uuid' - - api_field: 'maintenancePolicy.maintenanceExclusions.id' - - api_field: 'maintenancePolicy.maintenanceExclusions.window.endTime' - - api_field: 'maintenancePolicy.maintenanceExclusions.window.startTime' - - api_field: 'maintenancePolicy.window.recurringWindow.recurrence' - - api_field: 'maintenancePolicy.window.recurringWindow.window.endTime' - - api_field: 'maintenancePolicy.window.recurringWindow.window.startTime' - - field: 'name' - provider_only: true - - api_field: 'networking.clusterIpv4CidrBlocks' - - api_field: 'networking.clusterIpv6CidrBlocks' - - api_field: 'networking.networkType' - - api_field: 'networking.servicesIpv4CidrBlocks' - - api_field: 'networking.servicesIpv6CidrBlocks' - - api_field: 'nodeVersion' - - api_field: 'port' - - api_field: 'releaseChannel' - - api_field: 'status' - - api_field: 'systemAddonsConfig.ingress.disabled' - - api_field: 'systemAddonsConfig.ingress.ipv4Vip' - - api_field: 'targetVersion' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: authorization.adminUsers.username + - api_field: clusterCaCertificate + - api_field: controlPlane.local.machineFilter + - api_field: controlPlane.local.nodeCount + - api_field: controlPlane.local.nodeLocation + - api_field: controlPlane.local.sharedDeploymentPolicy + - api_field: controlPlane.remote.nodeLocation + - api_field: controlPlaneEncryption.kmsKey + - api_field: controlPlaneEncryption.kmsKeyActiveVersion + - api_field: controlPlaneEncryption.kmsKeyState + - api_field: controlPlaneEncryption.kmsStatus.code + - api_field: controlPlaneEncryption.kmsStatus.message + - api_field: controlPlaneVersion + - api_field: createTime + - api_field: defaultMaxPodsPerNode + - field: effective_labels + provider_only: true + - api_field: endpoint + - api_field: externalLoadBalancerIpv4AddressPools + - api_field: fleet.membership + - api_field: fleet.project + - api_field: labels + - field: location + provider_only: true + - api_field: maintenanceEvents.createTime + - api_field: maintenanceEvents.endTime + - api_field: maintenanceEvents.operation + - api_field: maintenanceEvents.schedule + - api_field: maintenanceEvents.startTime + - api_field: maintenanceEvents.state + - api_field: maintenanceEvents.targetVersion + - api_field: maintenanceEvents.type + - api_field: maintenanceEvents.updateTime + - api_field: maintenanceEvents.uuid + - api_field: maintenancePolicy.maintenanceExclusions.id + - api_field: maintenancePolicy.maintenanceExclusions.window.endTime + - api_field: maintenancePolicy.maintenanceExclusions.window.startTime + - api_field: maintenancePolicy.window.recurringWindow.recurrence + - api_field: maintenancePolicy.window.recurringWindow.window.endTime + - api_field: maintenancePolicy.window.recurringWindow.window.startTime + - field: name + provider_only: true + - api_field: networking.clusterIpv4CidrBlocks + - api_field: networking.clusterIpv6CidrBlocks + - api_field: networking.networkType + - api_field: networking.servicesIpv4CidrBlocks + - api_field: networking.servicesIpv6CidrBlocks + - api_field: nodeVersion + - api_field: port + - api_field: releaseChannel + - api_field: status + - api_field: systemAddonsConfig.ingress.disabled + - api_field: systemAddonsConfig.ingress.ipv4Vip + - api_field: targetVersion + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/edgecontainer/resource_edgecontainer_node_pool_generated_meta.yaml b/google/services/edgecontainer/resource_edgecontainer_node_pool_generated_meta.yaml index 52ade29715b..72d8c948d9d 100644 --- a/google/services/edgecontainer/resource_edgecontainer_node_pool_generated_meta.yaml +++ b/google/services/edgecontainer/resource_edgecontainer_node_pool_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_edgecontainer_node_pool' -generation_type: 'mmv1' -source_file: 'products/edgecontainer/NodePool.yaml' -api_service_name: 'edgecontainer.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NodePool' +resource: google_edgecontainer_node_pool +generation_type: mmv1 +source_file: products/edgecontainer/NodePool.yaml +api_service_name: edgecontainer.googleapis.com +api_version: v1 +api_resource_type_kind: NodePool fields: - - field: 'cluster' - provider_only: true - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'localDiskEncryption.kmsKey' - - api_field: 'localDiskEncryption.kmsKeyActiveVersion' - - api_field: 'localDiskEncryption.kmsKeyState' - - field: 'location' - provider_only: true - - api_field: 'machineFilter' - - field: 'name' - provider_only: true - - api_field: 'nodeConfig.labels' - - api_field: 'nodeCount' - - api_field: 'nodeLocation' - - api_field: 'nodeVersion' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: cluster + provider_only: true + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: localDiskEncryption.kmsKey + - api_field: localDiskEncryption.kmsKeyActiveVersion + - api_field: localDiskEncryption.kmsKeyState + - field: location + provider_only: true + - api_field: machineFilter + - field: name + provider_only: true + - api_field: nodeConfig.labels + - api_field: nodeCount + - api_field: nodeLocation + - api_field: nodeVersion + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/edgecontainer/resource_edgecontainer_vpn_connection_generated_meta.yaml b/google/services/edgecontainer/resource_edgecontainer_vpn_connection_generated_meta.yaml index d155e85f38c..775267ec855 100644 --- a/google/services/edgecontainer/resource_edgecontainer_vpn_connection_generated_meta.yaml +++ b/google/services/edgecontainer/resource_edgecontainer_vpn_connection_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_edgecontainer_vpn_connection' -generation_type: 'mmv1' -source_file: 'products/edgecontainer/VpnConnection.yaml' -api_service_name: 'edgecontainer.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VpnConnection' +resource: google_edgecontainer_vpn_connection +generation_type: mmv1 +source_file: products/edgecontainer/VpnConnection.yaml +api_service_name: edgecontainer.googleapis.com +api_version: v1 +api_resource_type_kind: VpnConnection fields: - - api_field: 'cluster' - - api_field: 'createTime' - - api_field: 'details.cloudRouter.name' - - api_field: 'details.cloudVpns.gateway' - - api_field: 'details.error' - - api_field: 'details.state' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableHighAvailability' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'natGatewayIp' - - api_field: 'router' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'vpc' - - api_field: 'vpcProject.projectId' + - api_field: cluster + - api_field: createTime + - api_field: details.cloudRouter.name + - api_field: details.cloudVpns.gateway + - api_field: details.error + - api_field: details.state + - field: effective_labels + provider_only: true + - api_field: enableHighAvailability + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: natGatewayIp + - api_field: router + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: vpc + - api_field: vpcProject.projectId diff --git a/google/services/edgenetwork/resource_edgenetwork_interconnect_attachment_generated_meta.yaml b/google/services/edgenetwork/resource_edgenetwork_interconnect_attachment_generated_meta.yaml index 6356c8754cb..e2ac53bd724 100644 --- a/google/services/edgenetwork/resource_edgenetwork_interconnect_attachment_generated_meta.yaml +++ b/google/services/edgenetwork/resource_edgenetwork_interconnect_attachment_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_edgenetwork_interconnect_attachment' -generation_type: 'mmv1' -source_file: 'products/edgenetwork/InterconnectAttachment.yaml' -api_service_name: 'edgenetwork.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterconnectAttachment' +resource: google_edgenetwork_interconnect_attachment +generation_type: mmv1 +source_file: products/edgenetwork/InterconnectAttachment.yaml +api_service_name: edgenetwork.googleapis.com +api_version: v1 +api_resource_type_kind: InterconnectAttachment fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'interconnect' - - field: 'interconnect_attachment_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mtu' - - api_field: 'name' - - api_field: 'network' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'vlanId' - - field: 'zone' - provider_only: true + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: interconnect + - field: interconnect_attachment_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: mtu + - api_field: name + - api_field: network + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: vlanId + - field: zone + provider_only: true diff --git a/google/services/edgenetwork/resource_edgenetwork_network_generated_meta.yaml b/google/services/edgenetwork/resource_edgenetwork_network_generated_meta.yaml index b66a084bb14..b52fe0efdc6 100644 --- a/google/services/edgenetwork/resource_edgenetwork_network_generated_meta.yaml +++ b/google/services/edgenetwork/resource_edgenetwork_network_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_edgenetwork_network' -generation_type: 'mmv1' -source_file: 'products/edgenetwork/Network.yaml' -api_service_name: 'edgenetwork.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Network' +resource: google_edgenetwork_network +generation_type: mmv1 +source_file: products/edgenetwork/Network.yaml +api_service_name: edgenetwork.googleapis.com +api_version: v1 +api_resource_type_kind: Network fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mtu' - - api_field: 'name' - - field: 'network_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - field: 'zone' - provider_only: true + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: mtu + - api_field: name + - field: network_id + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime + - field: zone + provider_only: true diff --git a/google/services/edgenetwork/resource_edgenetwork_subnet_generated_meta.yaml b/google/services/edgenetwork/resource_edgenetwork_subnet_generated_meta.yaml index 09d9ce285cb..a1fe2048147 100644 --- a/google/services/edgenetwork/resource_edgenetwork_subnet_generated_meta.yaml +++ b/google/services/edgenetwork/resource_edgenetwork_subnet_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_edgenetwork_subnet' -generation_type: 'mmv1' -source_file: 'products/edgenetwork/Subnet.yaml' -api_service_name: 'edgenetwork.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Subnet' +resource: google_edgenetwork_subnet +generation_type: mmv1 +source_file: products/edgenetwork/Subnet.yaml +api_service_name: edgenetwork.googleapis.com +api_version: v1 +api_resource_type_kind: Subnet fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'ipv4Cidr' - - api_field: 'ipv6Cidr' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'state' - - field: 'subnet_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'vlanId' - - field: 'zone' - provider_only: true + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: ipv4Cidr + - api_field: ipv6Cidr + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: network + - api_field: state + - field: subnet_id + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: vlanId + - field: zone + provider_only: true diff --git a/google/services/essentialcontacts/resource_essential_contacts_contact_generated_meta.yaml b/google/services/essentialcontacts/resource_essential_contacts_contact_generated_meta.yaml index b6fe3dc03e0..0fc6a737d07 100644 --- a/google/services/essentialcontacts/resource_essential_contacts_contact_generated_meta.yaml +++ b/google/services/essentialcontacts/resource_essential_contacts_contact_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_essential_contacts_contact' -generation_type: 'mmv1' -source_file: 'products/essentialcontacts/Contact.yaml' -api_service_name: 'essentialcontacts.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Contact' +resource: google_essential_contacts_contact +generation_type: mmv1 +source_file: products/essentialcontacts/Contact.yaml +api_service_name: essentialcontacts.googleapis.com +api_version: v1 +api_resource_type_kind: Contact api_variant_patterns: - - 'folders/{folder}/contacts/{contact}' - - 'organizations/{organization}/contacts/{contact}' - - 'projects/{project}/contacts/{contact}' + - folders/{folder}/contacts/{contact} + - organizations/{organization}/contacts/{contact} + - projects/{project}/contacts/{contact} fields: - - api_field: 'email' - - api_field: 'languageTag' - - api_field: 'name' - - api_field: 'notificationCategorySubscriptions' - - field: 'parent' - provider_only: true + - api_field: email + - api_field: languageTag + - api_field: name + - api_field: notificationCategorySubscriptions + - field: parent + provider_only: true diff --git a/google/services/eventarc/resource_eventarc_channel_generated_meta.yaml b/google/services/eventarc/resource_eventarc_channel_generated_meta.yaml index d9fcea331a2..ad65c4c939e 100644 --- a/google/services/eventarc/resource_eventarc_channel_generated_meta.yaml +++ b/google/services/eventarc/resource_eventarc_channel_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_eventarc_channel' -generation_type: 'mmv1' -source_file: 'products/eventarc/Channel.yaml' -api_service_name: 'eventarc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Channel' +resource: google_eventarc_channel +generation_type: mmv1 +source_file: products/eventarc/Channel.yaml +api_service_name: eventarc.googleapis.com +api_version: v1 +api_resource_type_kind: Channel fields: - - api_field: 'activationToken' - - api_field: 'createTime' - - api_field: 'cryptoKeyName' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'pubsubTopic' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'provider' - field: 'third_party_provider' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: activationToken + - api_field: createTime + - api_field: cryptoKeyName + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: pubsubTopic + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: provider + field: third_party_provider + - api_field: uid + - api_field: updateTime diff --git a/google/services/eventarc/resource_eventarc_enrollment_generated_meta.yaml b/google/services/eventarc/resource_eventarc_enrollment_generated_meta.yaml index a7d9ced4724..1c5bd3865ef 100644 --- a/google/services/eventarc/resource_eventarc_enrollment_generated_meta.yaml +++ b/google/services/eventarc/resource_eventarc_enrollment_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_eventarc_enrollment' -generation_type: 'mmv1' -source_file: 'products/eventarc/Enrollment.yaml' -api_service_name: 'eventarc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Enrollment' +resource: google_eventarc_enrollment +generation_type: mmv1 +source_file: products/eventarc/Enrollment.yaml +api_service_name: eventarc.googleapis.com +api_version: v1 +api_resource_type_kind: Enrollment fields: - - api_field: 'annotations' - - api_field: 'celMatch' - - api_field: 'createTime' - - api_field: 'destination' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - field: 'enrollment_id' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'messageBus' - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: celMatch + - api_field: createTime + - api_field: destination + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - field: enrollment_id + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: messageBus + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/eventarc/resource_eventarc_google_api_source_generated_meta.yaml b/google/services/eventarc/resource_eventarc_google_api_source_generated_meta.yaml index 120512bfce4..813bfb3a40b 100644 --- a/google/services/eventarc/resource_eventarc_google_api_source_generated_meta.yaml +++ b/google/services/eventarc/resource_eventarc_google_api_source_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_eventarc_google_api_source' -generation_type: 'mmv1' -source_file: 'products/eventarc/GoogleApiSource.yaml' -api_service_name: 'eventarc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GoogleApiSource' +resource: google_eventarc_google_api_source +generation_type: mmv1 +source_file: products/eventarc/GoogleApiSource.yaml +api_service_name: eventarc.googleapis.com +api_version: v1 +api_resource_type_kind: GoogleApiSource fields: - - api_field: 'annotations' - - api_field: 'createTime' - - api_field: 'cryptoKeyName' - - api_field: 'destination' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - field: 'google_api_source_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'loggingConfig.logSeverity' - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - api_field: cryptoKeyName + - api_field: destination + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - field: google_api_source_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: loggingConfig.logSeverity + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/eventarc/resource_eventarc_google_channel_config_generated_meta.yaml b/google/services/eventarc/resource_eventarc_google_channel_config_generated_meta.yaml index 130f1f8f607..3305853908f 100644 --- a/google/services/eventarc/resource_eventarc_google_channel_config_generated_meta.yaml +++ b/google/services/eventarc/resource_eventarc_google_channel_config_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_eventarc_google_channel_config' -generation_type: 'mmv1' -source_file: 'products/eventarc/GoogleChannelConfig.yaml' -api_service_name: 'eventarc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GoogleChannelConfig' +resource: google_eventarc_google_channel_config +generation_type: mmv1 +source_file: products/eventarc/GoogleChannelConfig.yaml +api_service_name: eventarc.googleapis.com +api_version: v1 +api_resource_type_kind: GoogleChannelConfig fields: - - api_field: 'cryptoKeyName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' + - api_field: cryptoKeyName + - field: location + provider_only: true + - api_field: name + - api_field: updateTime diff --git a/google/services/eventarc/resource_eventarc_message_bus_generated_meta.yaml b/google/services/eventarc/resource_eventarc_message_bus_generated_meta.yaml index efcf501861c..3a1b0e96e39 100644 --- a/google/services/eventarc/resource_eventarc_message_bus_generated_meta.yaml +++ b/google/services/eventarc/resource_eventarc_message_bus_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_eventarc_message_bus' -generation_type: 'mmv1' -source_file: 'products/eventarc/MessageBus.yaml' -api_service_name: 'eventarc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MessageBus' +resource: google_eventarc_message_bus +generation_type: mmv1 +source_file: products/eventarc/MessageBus.yaml +api_service_name: eventarc.googleapis.com +api_version: v1 +api_resource_type_kind: MessageBus fields: - - api_field: 'annotations' - - api_field: 'createTime' - - api_field: 'cryptoKeyName' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'loggingConfig.logSeverity' - - field: 'message_bus_id' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - api_field: cryptoKeyName + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: loggingConfig.logSeverity + - field: message_bus_id + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/eventarc/resource_eventarc_pipeline_generated_meta.yaml b/google/services/eventarc/resource_eventarc_pipeline_generated_meta.yaml index 04a24bf0413..edb5bb47459 100644 --- a/google/services/eventarc/resource_eventarc_pipeline_generated_meta.yaml +++ b/google/services/eventarc/resource_eventarc_pipeline_generated_meta.yaml @@ -1,47 +1,47 @@ -resource: 'google_eventarc_pipeline' -generation_type: 'mmv1' -source_file: 'products/eventarc/Pipeline.yaml' -api_service_name: 'eventarc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Pipeline' +resource: google_eventarc_pipeline +generation_type: mmv1 +source_file: products/eventarc/Pipeline.yaml +api_service_name: eventarc.googleapis.com +api_version: v1 +api_resource_type_kind: Pipeline fields: - - api_field: 'annotations' - - api_field: 'createTime' - - api_field: 'cryptoKeyName' - - api_field: 'destinations.authenticationConfig.googleOidc.audience' - - api_field: 'destinations.authenticationConfig.googleOidc.serviceAccount' - - api_field: 'destinations.authenticationConfig.oauthToken.scope' - - api_field: 'destinations.authenticationConfig.oauthToken.serviceAccount' - - api_field: 'destinations.httpEndpoint.messageBindingTemplate' - - api_field: 'destinations.httpEndpoint.uri' - - api_field: 'destinations.messageBus' - - api_field: 'destinations.networkConfig.networkAttachment' - - api_field: 'destinations.outputPayloadFormat.avro.schemaDefinition' - - api_field: 'destinations.outputPayloadFormat.json' - - api_field: 'destinations.outputPayloadFormat.protobuf.schemaDefinition' - - api_field: 'destinations.topic' - - api_field: 'destinations.workflow' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'inputPayloadFormat.avro.schemaDefinition' - - api_field: 'inputPayloadFormat.json' - - api_field: 'inputPayloadFormat.protobuf.schemaDefinition' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'loggingConfig.logSeverity' - - api_field: 'mediations.transformation.transformationTemplate' - - api_field: 'name' - - field: 'pipeline_id' - provider_only: true - - api_field: 'retryPolicy.maxAttempts' - - api_field: 'retryPolicy.maxRetryDelay' - - api_field: 'retryPolicy.minRetryDelay' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - api_field: cryptoKeyName + - api_field: destinations.authenticationConfig.googleOidc.audience + - api_field: destinations.authenticationConfig.googleOidc.serviceAccount + - api_field: destinations.authenticationConfig.oauthToken.scope + - api_field: destinations.authenticationConfig.oauthToken.serviceAccount + - api_field: destinations.httpEndpoint.messageBindingTemplate + - api_field: destinations.httpEndpoint.uri + - api_field: destinations.messageBus + - api_field: destinations.networkConfig.networkAttachment + - api_field: destinations.outputPayloadFormat.avro.schemaDefinition + - api_field: destinations.outputPayloadFormat.json + - api_field: destinations.outputPayloadFormat.protobuf.schemaDefinition + - api_field: destinations.topic + - api_field: destinations.workflow + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: inputPayloadFormat.avro.schemaDefinition + - api_field: inputPayloadFormat.json + - api_field: inputPayloadFormat.protobuf.schemaDefinition + - api_field: labels + - field: location + provider_only: true + - api_field: loggingConfig.logSeverity + - api_field: mediations.transformation.transformationTemplate + - api_field: name + - field: pipeline_id + provider_only: true + - api_field: retryPolicy.maxAttempts + - api_field: retryPolicy.maxRetryDelay + - api_field: retryPolicy.minRetryDelay + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/eventarc/resource_eventarc_trigger_generated_meta.yaml b/google/services/eventarc/resource_eventarc_trigger_generated_meta.yaml index 63292a9a1d6..c58d3476ee5 100644 --- a/google/services/eventarc/resource_eventarc_trigger_generated_meta.yaml +++ b/google/services/eventarc/resource_eventarc_trigger_generated_meta.yaml @@ -1,47 +1,47 @@ -resource: 'google_eventarc_trigger' -generation_type: 'mmv1' -source_file: 'products/eventarc/Trigger.yaml' -api_service_name: 'eventarc.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Trigger' +resource: google_eventarc_trigger +generation_type: mmv1 +source_file: products/eventarc/Trigger.yaml +api_service_name: eventarc.googleapis.com +api_version: v1 +api_resource_type_kind: Trigger fields: - - api_field: 'channel' - - api_field: 'conditions' - - api_field: 'createTime' - - api_field: 'destination.cloudFunction' - - api_field: 'destination.cloudRun.path' - field: 'destination.cloud_run_service.path' - - api_field: 'destination.cloudRun.region' - field: 'destination.cloud_run_service.region' - - api_field: 'destination.cloudRun.service' - field: 'destination.cloud_run_service.service' - - api_field: 'destination.gke.cluster' - - api_field: 'destination.gke.location' - - api_field: 'destination.gke.namespace' - - api_field: 'destination.gke.path' - - api_field: 'destination.gke.service' - - api_field: 'destination.httpEndpoint.uri' - - api_field: 'destination.networkConfig.networkAttachment' - - api_field: 'destination.workflow' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'eventDataContentType' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'eventFilters.attribute' - field: 'matching_criteria.attribute' - - api_field: 'eventFilters.operator' - field: 'matching_criteria.operator' - - api_field: 'eventFilters.value' - field: 'matching_criteria.value' - - api_field: 'name' - - api_field: 'retryPolicy.maxAttempts' - - api_field: 'serviceAccount' - - field: 'terraform_labels' - provider_only: true - - api_field: 'transport.pubsub.subscription' - - api_field: 'transport.pubsub.topic' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: channel + - api_field: conditions + - api_field: createTime + - api_field: destination.cloudFunction + - api_field: destination.cloudRun.path + field: destination.cloud_run_service.path + - api_field: destination.cloudRun.region + field: destination.cloud_run_service.region + - api_field: destination.cloudRun.service + field: destination.cloud_run_service.service + - api_field: destination.gke.cluster + - api_field: destination.gke.location + - api_field: destination.gke.namespace + - api_field: destination.gke.path + - api_field: destination.gke.service + - api_field: destination.httpEndpoint.uri + - api_field: destination.networkConfig.networkAttachment + - api_field: destination.workflow + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: eventDataContentType + - api_field: labels + - field: location + provider_only: true + - api_field: eventFilters.attribute + field: matching_criteria.attribute + - api_field: eventFilters.operator + field: matching_criteria.operator + - api_field: eventFilters.value + field: matching_criteria.value + - api_field: name + - api_field: retryPolicy.maxAttempts + - api_field: serviceAccount + - field: terraform_labels + provider_only: true + - api_field: transport.pubsub.subscription + - api_field: transport.pubsub.topic + - api_field: uid + - api_field: updateTime diff --git a/google/services/filestore/resource_filestore_backup_generated_meta.yaml b/google/services/filestore/resource_filestore_backup_generated_meta.yaml index 97364f69ca4..5ea3032b9c8 100644 --- a/google/services/filestore/resource_filestore_backup_generated_meta.yaml +++ b/google/services/filestore/resource_filestore_backup_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_filestore_backup' -generation_type: 'mmv1' -source_file: 'products/filestore/Backup.yaml' -api_service_name: 'file.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Backup' +resource: google_filestore_backup +generation_type: mmv1 +source_file: products/filestore/Backup.yaml +api_service_name: file.googleapis.com +api_version: v1 +api_resource_type_kind: Backup fields: - - api_field: 'capacityGb' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'downloadBytes' - - field: 'effective_labels' - provider_only: true - - api_field: 'kmsKeyName' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'sourceFileShare' - - api_field: 'sourceInstance' - - api_field: 'sourceInstanceTier' - - api_field: 'state' - - api_field: 'storageBytes' - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true + - api_field: capacityGb + - api_field: createTime + - api_field: description + - api_field: downloadBytes + - field: effective_labels + provider_only: true + - api_field: kmsKeyName + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: sourceFileShare + - api_field: sourceInstance + - api_field: sourceInstanceTier + - api_field: state + - api_field: storageBytes + - api_field: tags + - field: terraform_labels + provider_only: true diff --git a/google/services/filestore/resource_filestore_instance_generated_meta.yaml b/google/services/filestore/resource_filestore_instance_generated_meta.yaml index 854929bf0b9..30cf53c521b 100644 --- a/google/services/filestore/resource_filestore_instance_generated_meta.yaml +++ b/google/services/filestore/resource_filestore_instance_generated_meta.yaml @@ -1,62 +1,62 @@ -resource: 'google_filestore_instance' -generation_type: 'mmv1' -source_file: 'products/filestore/Instance.yaml' -api_service_name: 'file.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_filestore_instance +generation_type: mmv1 +source_file: products/filestore/Instance.yaml +api_service_name: file.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'createTime' - - api_field: 'deletionProtectionEnabled' - - api_field: 'deletionProtectionReason' - - api_field: 'description' - - api_field: 'directoryServices.ldap.domain' - - api_field: 'directoryServices.ldap.groupsOu' - - api_field: 'directoryServices.ldap.servers' - - api_field: 'directoryServices.ldap.usersOu' - - field: 'effective_labels' - provider_only: true - - api_field: 'replication.replicas.lastActiveSyncTime' - field: 'effective_replication.replicas.last_active_sync_time' - - api_field: 'replication.replicas.peerInstance' - field: 'effective_replication.replicas.peer_instance' - - api_field: 'replication.replicas.state' - field: 'effective_replication.replicas.state' - - api_field: 'replication.replicas.stateReasons' - field: 'effective_replication.replicas.state_reasons' - - api_field: 'replication.role' - field: 'effective_replication.role' - - api_field: 'etag' - - api_field: 'fileShares.capacityGb' - - api_field: 'fileShares.name' - - api_field: 'fileShares.nfsExportOptions.accessMode' - - api_field: 'fileShares.nfsExportOptions.anonGid' - - api_field: 'fileShares.nfsExportOptions.anonUid' - - api_field: 'fileShares.nfsExportOptions.ipRanges' - - api_field: 'fileShares.nfsExportOptions.network' - - api_field: 'fileShares.nfsExportOptions.squashMode' - - api_field: 'fileShares.sourceBackup' - - api_field: 'replication.replicas.peerInstance' - field: 'initial_replication.replicas.peer_instance' - - api_field: 'replication.role' - field: 'initial_replication.role' - - api_field: 'kmsKeyName' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'networks.connectMode' - - api_field: 'networks.ipAddresses' - - api_field: 'networks.modes' - - api_field: 'networks.network' - - api_field: 'networks.pscConfig.endpointProject' - - api_field: 'networks.reservedIpRange' - - api_field: 'performanceConfig.fixedIops.maxIops' - - api_field: 'performanceConfig.iopsPerTb.maxIopsPerTb' - - api_field: 'protocol' - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true - - api_field: 'tier' - - field: 'zone' - provider_only: true + - api_field: createTime + - api_field: deletionProtectionEnabled + - api_field: deletionProtectionReason + - api_field: description + - api_field: directoryServices.ldap.domain + - api_field: directoryServices.ldap.groupsOu + - api_field: directoryServices.ldap.servers + - api_field: directoryServices.ldap.usersOu + - field: effective_labels + provider_only: true + - api_field: replication.replicas.lastActiveSyncTime + field: effective_replication.replicas.last_active_sync_time + - api_field: replication.replicas.peerInstance + field: effective_replication.replicas.peer_instance + - api_field: replication.replicas.state + field: effective_replication.replicas.state + - api_field: replication.replicas.stateReasons + field: effective_replication.replicas.state_reasons + - api_field: replication.role + field: effective_replication.role + - api_field: etag + - api_field: fileShares.capacityGb + - api_field: fileShares.name + - api_field: fileShares.nfsExportOptions.accessMode + - api_field: fileShares.nfsExportOptions.anonGid + - api_field: fileShares.nfsExportOptions.anonUid + - api_field: fileShares.nfsExportOptions.ipRanges + - api_field: fileShares.nfsExportOptions.network + - api_field: fileShares.nfsExportOptions.squashMode + - api_field: fileShares.sourceBackup + - api_field: replication.replicas.peerInstance + field: initial_replication.replicas.peer_instance + - api_field: replication.role + field: initial_replication.role + - api_field: kmsKeyName + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: networks.connectMode + - api_field: networks.ipAddresses + - api_field: networks.modes + - api_field: networks.network + - api_field: networks.pscConfig.endpointProject + - api_field: networks.reservedIpRange + - api_field: performanceConfig.fixedIops.maxIops + - api_field: performanceConfig.iopsPerTb.maxIopsPerTb + - api_field: protocol + - api_field: tags + - field: terraform_labels + provider_only: true + - api_field: tier + - field: zone + provider_only: true diff --git a/google/services/filestore/resource_filestore_snapshot_generated_meta.yaml b/google/services/filestore/resource_filestore_snapshot_generated_meta.yaml index f98f7578aa5..df70c9e7a95 100644 --- a/google/services/filestore/resource_filestore_snapshot_generated_meta.yaml +++ b/google/services/filestore/resource_filestore_snapshot_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_filestore_snapshot' -generation_type: 'mmv1' -source_file: 'products/filestore/Snapshot.yaml' -api_service_name: 'file.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Snapshot' +resource: google_filestore_snapshot +generation_type: mmv1 +source_file: products/filestore/Snapshot.yaml +api_service_name: file.googleapis.com +api_version: v1 +api_resource_type_kind: Snapshot fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'filesystemUsedBytes' - - field: 'instance' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: filesystemUsedBytes + - field: instance + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true diff --git a/google/services/firebaseappcheck/resource_firebase_app_check_app_attest_config_generated_meta.yaml b/google/services/firebaseappcheck/resource_firebase_app_check_app_attest_config_generated_meta.yaml index be9d6b805c8..43b119d8636 100644 --- a/google/services/firebaseappcheck/resource_firebase_app_check_app_attest_config_generated_meta.yaml +++ b/google/services/firebaseappcheck/resource_firebase_app_check_app_attest_config_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_firebase_app_check_app_attest_config' -generation_type: 'mmv1' -source_file: 'products/firebaseappcheck/AppAttestConfig.yaml' -api_service_name: 'firebaseappcheck.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AppAttestConfig' +resource: google_firebase_app_check_app_attest_config +generation_type: mmv1 +source_file: products/firebaseappcheck/AppAttestConfig.yaml +api_service_name: firebaseappcheck.googleapis.com +api_version: v1 +api_resource_type_kind: AppAttestConfig fields: - - field: 'app_id' - provider_only: true - - api_field: 'name' - - api_field: 'tokenTtl' + - field: app_id + provider_only: true + - api_field: name + - api_field: tokenTtl diff --git a/google/services/firebaseappcheck/resource_firebase_app_check_debug_token_generated_meta.yaml b/google/services/firebaseappcheck/resource_firebase_app_check_debug_token_generated_meta.yaml index cc5acf1e80f..f1e8660a166 100644 --- a/google/services/firebaseappcheck/resource_firebase_app_check_debug_token_generated_meta.yaml +++ b/google/services/firebaseappcheck/resource_firebase_app_check_debug_token_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_firebase_app_check_debug_token' -generation_type: 'mmv1' -source_file: 'products/firebaseappcheck/DebugToken.yaml' -api_service_name: 'firebaseappcheck.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DebugToken' +resource: google_firebase_app_check_debug_token +generation_type: mmv1 +source_file: products/firebaseappcheck/DebugToken.yaml +api_service_name: firebaseappcheck.googleapis.com +api_version: v1 +api_resource_type_kind: DebugToken fields: - - field: 'app_id' - provider_only: true - - api_field: 'name' - field: 'debug_token_id' - - api_field: 'displayName' - - api_field: 'token' + - field: app_id + provider_only: true + - api_field: name + field: debug_token_id + - api_field: displayName + - api_field: token diff --git a/google/services/firebaseappcheck/resource_firebase_app_check_device_check_config_generated_meta.yaml b/google/services/firebaseappcheck/resource_firebase_app_check_device_check_config_generated_meta.yaml index b5937d7d3ca..3e920020c00 100644 --- a/google/services/firebaseappcheck/resource_firebase_app_check_device_check_config_generated_meta.yaml +++ b/google/services/firebaseappcheck/resource_firebase_app_check_device_check_config_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_firebase_app_check_device_check_config' -generation_type: 'mmv1' -source_file: 'products/firebaseappcheck/DeviceCheckConfig.yaml' -api_service_name: 'firebaseappcheck.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DeviceCheckConfig' +resource: google_firebase_app_check_device_check_config +generation_type: mmv1 +source_file: products/firebaseappcheck/DeviceCheckConfig.yaml +api_service_name: firebaseappcheck.googleapis.com +api_version: v1 +api_resource_type_kind: DeviceCheckConfig fields: - - field: 'app_id' - provider_only: true - - api_field: 'keyId' - - api_field: 'name' - - api_field: 'privateKey' - - api_field: 'privateKeySet' - - api_field: 'tokenTtl' + - field: app_id + provider_only: true + - api_field: keyId + - api_field: name + - api_field: privateKey + - api_field: privateKeySet + - api_field: tokenTtl diff --git a/google/services/firebaseappcheck/resource_firebase_app_check_play_integrity_config_generated_meta.yaml b/google/services/firebaseappcheck/resource_firebase_app_check_play_integrity_config_generated_meta.yaml index 787c2133bba..56765e6bb8b 100644 --- a/google/services/firebaseappcheck/resource_firebase_app_check_play_integrity_config_generated_meta.yaml +++ b/google/services/firebaseappcheck/resource_firebase_app_check_play_integrity_config_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_firebase_app_check_play_integrity_config' -generation_type: 'mmv1' -source_file: 'products/firebaseappcheck/PlayIntegrityConfig.yaml' -api_service_name: 'firebaseappcheck.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PlayIntegrityConfig' +resource: google_firebase_app_check_play_integrity_config +generation_type: mmv1 +source_file: products/firebaseappcheck/PlayIntegrityConfig.yaml +api_service_name: firebaseappcheck.googleapis.com +api_version: v1 +api_resource_type_kind: PlayIntegrityConfig fields: - - field: 'app_id' - provider_only: true - - api_field: 'name' - - api_field: 'tokenTtl' + - field: app_id + provider_only: true + - api_field: name + - api_field: tokenTtl diff --git a/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_enterprise_config_generated_meta.yaml b/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_enterprise_config_generated_meta.yaml index fb722893270..7e139d9b9ef 100644 --- a/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_enterprise_config_generated_meta.yaml +++ b/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_enterprise_config_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_firebase_app_check_recaptcha_enterprise_config' -generation_type: 'mmv1' -source_file: 'products/firebaseappcheck/RecaptchaEnterpriseConfig.yaml' -api_service_name: 'firebaseappcheck.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RecaptchaEnterpriseConfig' +resource: google_firebase_app_check_recaptcha_enterprise_config +generation_type: mmv1 +source_file: products/firebaseappcheck/RecaptchaEnterpriseConfig.yaml +api_service_name: firebaseappcheck.googleapis.com +api_version: v1 +api_resource_type_kind: RecaptchaEnterpriseConfig fields: - - field: 'app_id' - provider_only: true - - api_field: 'name' - - api_field: 'siteKey' - - api_field: 'tokenTtl' + - field: app_id + provider_only: true + - api_field: name + - api_field: siteKey + - api_field: tokenTtl diff --git a/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_v3_config_generated_meta.yaml b/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_v3_config_generated_meta.yaml index cf83e2dfc96..7cbf83ccf58 100644 --- a/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_v3_config_generated_meta.yaml +++ b/google/services/firebaseappcheck/resource_firebase_app_check_recaptcha_v3_config_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_firebase_app_check_recaptcha_v3_config' -generation_type: 'mmv1' -source_file: 'products/firebaseappcheck/RecaptchaV3Config.yaml' -api_service_name: 'firebaseappcheck.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RecaptchaConfig' +resource: google_firebase_app_check_recaptcha_v3_config +generation_type: mmv1 +source_file: products/firebaseappcheck/RecaptchaV3Config.yaml +api_service_name: firebaseappcheck.googleapis.com +api_version: v1 +api_resource_type_kind: RecaptchaConfig api_variant_patterns: - - 'projects/{project}/apps/{app}/recaptchaV3Config' + - projects/{project}/apps/{app}/recaptchaV3Config fields: - - field: 'app_id' - provider_only: true - - api_field: 'name' - - api_field: 'siteSecret' - - api_field: 'siteSecretSet' - - api_field: 'tokenTtl' + - field: app_id + provider_only: true + - api_field: name + - api_field: siteSecret + - api_field: siteSecretSet + - api_field: tokenTtl diff --git a/google/services/firebaseappcheck/resource_firebase_app_check_service_config_generated_meta.yaml b/google/services/firebaseappcheck/resource_firebase_app_check_service_config_generated_meta.yaml index 75c14ca5b45..a35eb19973b 100644 --- a/google/services/firebaseappcheck/resource_firebase_app_check_service_config_generated_meta.yaml +++ b/google/services/firebaseappcheck/resource_firebase_app_check_service_config_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_firebase_app_check_service_config' -generation_type: 'mmv1' -source_file: 'products/firebaseappcheck/ServiceConfig.yaml' -api_service_name: 'firebaseappcheck.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' +resource: google_firebase_app_check_service_config +generation_type: mmv1 +source_file: products/firebaseappcheck/ServiceConfig.yaml +api_service_name: firebaseappcheck.googleapis.com +api_version: v1 +api_resource_type_kind: Service fields: - - api_field: 'enforcementMode' - - api_field: 'name' - - field: 'service_id' - provider_only: true + - api_field: enforcementMode + - api_field: name + - field: service_id + provider_only: true diff --git a/google/services/firebaseapphosting/resource_firebase_app_hosting_backend_generated_meta.yaml b/google/services/firebaseapphosting/resource_firebase_app_hosting_backend_generated_meta.yaml index c4d380575fd..259527b3848 100644 --- a/google/services/firebaseapphosting/resource_firebase_app_hosting_backend_generated_meta.yaml +++ b/google/services/firebaseapphosting/resource_firebase_app_hosting_backend_generated_meta.yaml @@ -1,35 +1,35 @@ -resource: 'google_firebase_app_hosting_backend' -generation_type: 'mmv1' -source_file: 'products/firebaseapphosting/Backend.yaml' -api_service_name: 'firebaseapphosting.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Backend' +resource: google_firebase_app_hosting_backend +generation_type: mmv1 +source_file: products/firebaseapphosting/Backend.yaml +api_service_name: firebaseapphosting.googleapis.com +api_version: v1 +api_resource_type_kind: Backend autogen_status: true fields: - - api_field: 'annotations' - - api_field: 'appId' - - field: 'backend_id' - provider_only: true - - api_field: 'codebase.repository' - - api_field: 'codebase.rootDirectory' - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'environment' - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'managedResources.runService.service' - - api_field: 'name' - - api_field: 'serviceAccount' - - api_field: 'servingLocality' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'uri' + - api_field: annotations + - api_field: appId + - field: backend_id + provider_only: true + - api_field: codebase.repository + - api_field: codebase.rootDirectory + - api_field: createTime + - api_field: deleteTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: environment + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: managedResources.runService.service + - api_field: name + - api_field: serviceAccount + - api_field: servingLocality + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime + - api_field: uri diff --git a/google/services/firebaseapphosting/resource_firebase_app_hosting_build_generated_meta.yaml b/google/services/firebaseapphosting/resource_firebase_app_hosting_build_generated_meta.yaml index 30546969714..7f570b09c16 100644 --- a/google/services/firebaseapphosting/resource_firebase_app_hosting_build_generated_meta.yaml +++ b/google/services/firebaseapphosting/resource_firebase_app_hosting_build_generated_meta.yaml @@ -1,47 +1,47 @@ -resource: 'google_firebase_app_hosting_build' -generation_type: 'mmv1' -source_file: 'products/firebaseapphosting/Build.yaml' -api_service_name: 'firebaseapphosting.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Build' +resource: google_firebase_app_hosting_build +generation_type: mmv1 +source_file: products/firebaseapphosting/Build.yaml +api_service_name: firebaseapphosting.googleapis.com +api_version: v1 +api_resource_type_kind: Build autogen_status: true fields: - - api_field: 'annotations' - - field: 'backend' - provider_only: true - - field: 'build_id' - provider_only: true - - api_field: 'buildLogsUri' - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'environment' - - api_field: 'error.code' - - api_field: 'error.details' - - api_field: 'error.message' - - api_field: 'errorSource' - - api_field: 'etag' - - api_field: 'image' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'source.codebase.author.displayName' - - api_field: 'source.codebase.author.email' - - api_field: 'source.codebase.author.imageUri' - - api_field: 'source.codebase.branch' - - api_field: 'source.codebase.commit' - - api_field: 'source.codebase.commitMessage' - - api_field: 'source.codebase.commitTime' - - api_field: 'source.codebase.displayName' - - api_field: 'source.codebase.hash' - - api_field: 'source.codebase.uri' - - api_field: 'source.container.image' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - field: backend + provider_only: true + - field: build_id + provider_only: true + - api_field: buildLogsUri + - api_field: createTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: environment + - api_field: error.code + - api_field: error.details + - api_field: error.message + - api_field: errorSource + - api_field: etag + - api_field: image + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: source.codebase.author.displayName + - api_field: source.codebase.author.email + - api_field: source.codebase.author.imageUri + - api_field: source.codebase.branch + - api_field: source.codebase.commit + - api_field: source.codebase.commitMessage + - api_field: source.codebase.commitTime + - api_field: source.codebase.displayName + - api_field: source.codebase.hash + - api_field: source.codebase.uri + - api_field: source.container.image + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/firebaseapphosting/resource_firebase_app_hosting_default_domain_generated_meta.yaml b/google/services/firebaseapphosting/resource_firebase_app_hosting_default_domain_generated_meta.yaml index 813653e3fc4..96eed54d22d 100644 --- a/google/services/firebaseapphosting/resource_firebase_app_hosting_default_domain_generated_meta.yaml +++ b/google/services/firebaseapphosting/resource_firebase_app_hosting_default_domain_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_firebase_app_hosting_default_domain' -generation_type: 'mmv1' -source_file: 'products/firebaseapphosting/DefaultDomain.yaml' -api_service_name: 'firebaseapphosting.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DefaultDomain' +resource: google_firebase_app_hosting_default_domain +generation_type: mmv1 +source_file: products/firebaseapphosting/DefaultDomain.yaml +api_service_name: firebaseapphosting.googleapis.com +api_version: v1 +api_resource_type_kind: DefaultDomain autogen_status: true fields: - - field: 'backend' - provider_only: true - - api_field: 'createTime' - - api_field: 'disabled' - - field: 'domain_id' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'uid' - - api_field: 'updateTime' + - field: backend + provider_only: true + - api_field: createTime + - api_field: disabled + - field: domain_id + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: name + - api_field: uid + - api_field: updateTime diff --git a/google/services/firebaseapphosting/resource_firebase_app_hosting_domain_generated_meta.yaml b/google/services/firebaseapphosting/resource_firebase_app_hosting_domain_generated_meta.yaml index d8a6785d5d8..71e74f7a72b 100644 --- a/google/services/firebaseapphosting/resource_firebase_app_hosting_domain_generated_meta.yaml +++ b/google/services/firebaseapphosting/resource_firebase_app_hosting_domain_generated_meta.yaml @@ -1,52 +1,52 @@ -resource: 'google_firebase_app_hosting_domain' -generation_type: 'mmv1' -source_file: 'products/firebaseapphosting/Domain.yaml' -api_service_name: 'firebaseapphosting.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Domain' +resource: google_firebase_app_hosting_domain +generation_type: mmv1 +source_file: products/firebaseapphosting/Domain.yaml +api_service_name: firebaseapphosting.googleapis.com +api_version: v1 +api_resource_type_kind: Domain autogen_status: true fields: - - field: 'backend' - provider_only: true - - api_field: 'createTime' - - api_field: 'customDomainStatus.certState' - - api_field: 'customDomainStatus.hostState' - - api_field: 'customDomainStatus.issues.code' - - api_field: 'customDomainStatus.issues.details' - json: true - - api_field: 'customDomainStatus.issues.message' - - api_field: 'customDomainStatus.ownershipState' - - api_field: 'customDomainStatus.requiredDnsUpdates.checkTime' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.checkError.code' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.checkError.details' - json: true - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.checkError.message' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.domainName' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.records.domainName' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.records.rdata' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.records.relevantState' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.records.requiredAction' - - api_field: 'customDomainStatus.requiredDnsUpdates.desired.records.type' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.checkError.code' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.checkError.details' - json: true - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.checkError.message' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.domainName' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.records.domainName' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.records.rdata' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.records.relevantState' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.records.requiredAction' - - api_field: 'customDomainStatus.requiredDnsUpdates.discovered.records.type' - - api_field: 'customDomainStatus.requiredDnsUpdates.domainName' - - api_field: 'deleteTime' - - field: 'domain_id' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'purgeTime' - - api_field: 'serve.redirect.status' - - api_field: 'serve.redirect.uri' - - api_field: 'uid' - - api_field: 'updateTime' + - field: backend + provider_only: true + - api_field: createTime + - api_field: customDomainStatus.certState + - api_field: customDomainStatus.hostState + - api_field: customDomainStatus.issues.code + - api_field: customDomainStatus.issues.details + json: true + - api_field: customDomainStatus.issues.message + - api_field: customDomainStatus.ownershipState + - api_field: customDomainStatus.requiredDnsUpdates.checkTime + - api_field: customDomainStatus.requiredDnsUpdates.desired.checkError.code + - api_field: customDomainStatus.requiredDnsUpdates.desired.checkError.details + json: true + - api_field: customDomainStatus.requiredDnsUpdates.desired.checkError.message + - api_field: customDomainStatus.requiredDnsUpdates.desired.domainName + - api_field: customDomainStatus.requiredDnsUpdates.desired.records.domainName + - api_field: customDomainStatus.requiredDnsUpdates.desired.records.rdata + - api_field: customDomainStatus.requiredDnsUpdates.desired.records.relevantState + - api_field: customDomainStatus.requiredDnsUpdates.desired.records.requiredAction + - api_field: customDomainStatus.requiredDnsUpdates.desired.records.type + - api_field: customDomainStatus.requiredDnsUpdates.discovered.checkError.code + - api_field: customDomainStatus.requiredDnsUpdates.discovered.checkError.details + json: true + - api_field: customDomainStatus.requiredDnsUpdates.discovered.checkError.message + - api_field: customDomainStatus.requiredDnsUpdates.discovered.domainName + - api_field: customDomainStatus.requiredDnsUpdates.discovered.records.domainName + - api_field: customDomainStatus.requiredDnsUpdates.discovered.records.rdata + - api_field: customDomainStatus.requiredDnsUpdates.discovered.records.relevantState + - api_field: customDomainStatus.requiredDnsUpdates.discovered.records.requiredAction + - api_field: customDomainStatus.requiredDnsUpdates.discovered.records.type + - api_field: customDomainStatus.requiredDnsUpdates.domainName + - api_field: deleteTime + - field: domain_id + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: name + - api_field: purgeTime + - api_field: serve.redirect.status + - api_field: serve.redirect.uri + - api_field: uid + - api_field: updateTime diff --git a/google/services/firebaseapphosting/resource_firebase_app_hosting_traffic_generated_meta.yaml b/google/services/firebaseapphosting/resource_firebase_app_hosting_traffic_generated_meta.yaml index 2003ac9cc7b..e9734c07fb7 100644 --- a/google/services/firebaseapphosting/resource_firebase_app_hosting_traffic_generated_meta.yaml +++ b/google/services/firebaseapphosting/resource_firebase_app_hosting_traffic_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_firebase_app_hosting_traffic' -generation_type: 'mmv1' -source_file: 'products/firebaseapphosting/Traffic.yaml' -api_service_name: 'firebaseapphosting.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Traffic' +resource: google_firebase_app_hosting_traffic +generation_type: mmv1 +source_file: products/firebaseapphosting/Traffic.yaml +api_service_name: firebaseapphosting.googleapis.com +api_version: v1 +api_resource_type_kind: Traffic fields: - - field: 'backend' - provider_only: true - - api_field: 'createTime' - - api_field: 'current.splits.build' - - api_field: 'current.splits.percent' - - api_field: 'deleteTime' - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'rolloutPolicy.codebaseBranch' - - api_field: 'rolloutPolicy.disabled' - - api_field: 'rolloutPolicy.disabledTime' - - api_field: 'target.splits.build' - - api_field: 'target.splits.percent' - - api_field: 'uid' - - api_field: 'updateTime' + - field: backend + provider_only: true + - api_field: createTime + - api_field: current.splits.build + - api_field: current.splits.percent + - api_field: deleteTime + - api_field: etag + - field: location + provider_only: true + - api_field: name + - api_field: rolloutPolicy.codebaseBranch + - api_field: rolloutPolicy.disabled + - api_field: rolloutPolicy.disabledTime + - api_field: target.splits.build + - api_field: target.splits.percent + - api_field: uid + - api_field: updateTime diff --git a/google/services/firebasedataconnect/resource_firebase_data_connect_service_generated_meta.yaml b/google/services/firebasedataconnect/resource_firebase_data_connect_service_generated_meta.yaml index aafa49e4e21..f394eb3234e 100644 --- a/google/services/firebasedataconnect/resource_firebase_data_connect_service_generated_meta.yaml +++ b/google/services/firebasedataconnect/resource_firebase_data_connect_service_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_firebase_data_connect_service' -generation_type: 'mmv1' -source_file: 'products/firebasedataconnect/Service.yaml' -api_service_name: 'firebasedataconnect.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' +resource: google_firebase_data_connect_service +generation_type: mmv1 +source_file: products/firebasedataconnect/Service.yaml +api_service_name: firebasedataconnect.googleapis.com +api_version: v1 +api_resource_type_kind: Service autogen_status: true fields: - - api_field: 'annotations' - - api_field: 'createTime' - - field: 'deletion_policy' - provider_only: true - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - field: 'service_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - field: deletion_policy + provider_only: true + - api_field: displayName + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: reconciling + - field: service_id + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/firestore/resource_firestore_backup_schedule_generated_meta.yaml b/google/services/firestore/resource_firestore_backup_schedule_generated_meta.yaml index ebcdaf3c16b..a9ebb9a0242 100644 --- a/google/services/firestore/resource_firestore_backup_schedule_generated_meta.yaml +++ b/google/services/firestore/resource_firestore_backup_schedule_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_firestore_backup_schedule' -generation_type: 'mmv1' -source_file: 'products/firestore/BackupSchedule.yaml' -api_service_name: 'firestore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupSchedule' +resource: google_firestore_backup_schedule +generation_type: mmv1 +source_file: products/firestore/BackupSchedule.yaml +api_service_name: firestore.googleapis.com +api_version: v1 +api_resource_type_kind: BackupSchedule fields: - - api_field: 'dailyRecurrence' - - field: 'database' - provider_only: true - - api_field: 'name' - - api_field: 'retention' - - api_field: 'weeklyRecurrence.day' + - api_field: dailyRecurrence + - field: database + provider_only: true + - api_field: name + - api_field: retention + - api_field: weeklyRecurrence.day diff --git a/google/services/firestore/resource_firestore_database_generated_meta.yaml b/google/services/firestore/resource_firestore_database_generated_meta.yaml index ffafb51256a..226ec80a931 100644 --- a/google/services/firestore/resource_firestore_database_generated_meta.yaml +++ b/google/services/firestore/resource_firestore_database_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_firestore_database' -generation_type: 'mmv1' -source_file: 'products/firestore/Database.yaml' -api_service_name: 'firestore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Database' +resource: google_firestore_database +generation_type: mmv1 +source_file: products/firestore/Database.yaml +api_service_name: firestore.googleapis.com +api_version: v1 +api_resource_type_kind: Database fields: - - api_field: 'appEngineIntegrationMode' - - api_field: 'cmekConfig.activeKeyVersion' - - api_field: 'cmekConfig.kmsKeyName' - - api_field: 'concurrencyMode' - - api_field: 'createTime' - - api_field: 'databaseEdition' - - api_field: 'deleteProtectionState' - - field: 'deletion_policy' - provider_only: true - - api_field: 'earliestVersionTime' - - api_field: 'etag' - - api_field: 'keyPrefix' - - api_field: 'locationId' - - api_field: 'name' - - api_field: 'pointInTimeRecoveryEnablement' - - api_field: 'tags' - - api_field: 'type' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'versionRetentionPeriod' + - api_field: appEngineIntegrationMode + - api_field: cmekConfig.activeKeyVersion + - api_field: cmekConfig.kmsKeyName + - api_field: concurrencyMode + - api_field: createTime + - api_field: databaseEdition + - api_field: deleteProtectionState + - field: deletion_policy + provider_only: true + - api_field: earliestVersionTime + - api_field: etag + - api_field: keyPrefix + - api_field: locationId + - api_field: name + - api_field: pointInTimeRecoveryEnablement + - api_field: tags + - api_field: type + - api_field: uid + - api_field: updateTime + - api_field: versionRetentionPeriod diff --git a/google/services/firestore/resource_firestore_document_generated_meta.yaml b/google/services/firestore/resource_firestore_document_generated_meta.yaml index 54abc84b5d4..1afe8a17108 100644 --- a/google/services/firestore/resource_firestore_document_generated_meta.yaml +++ b/google/services/firestore/resource_firestore_document_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_firestore_document' -generation_type: 'mmv1' -source_file: 'products/firestore/Document.yaml' -api_service_name: 'firestore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Document' +resource: google_firestore_document +generation_type: mmv1 +source_file: products/firestore/Document.yaml +api_service_name: firestore.googleapis.com +api_version: v1 +api_resource_type_kind: Document fields: - - field: 'collection' - provider_only: true - - api_field: 'createTime' - - field: 'database' - provider_only: true - - field: 'document_id' - provider_only: true - - api_field: 'fields' - json: true - - api_field: 'name' - - api_field: 'path' - - api_field: 'updateTime' + - field: collection + provider_only: true + - api_field: createTime + - field: database + provider_only: true + - field: document_id + provider_only: true + - api_field: fields + json: true + - api_field: name + - api_field: path + - api_field: updateTime diff --git a/google/services/firestore/resource_firestore_field_generated_meta.yaml b/google/services/firestore/resource_firestore_field_generated_meta.yaml index f3a66cfe23e..46e609f8c37 100644 --- a/google/services/firestore/resource_firestore_field_generated_meta.yaml +++ b/google/services/firestore/resource_firestore_field_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_firestore_field' -generation_type: 'mmv1' -source_file: 'products/firestore/Field.yaml' -api_service_name: 'firestore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Field' +resource: google_firestore_field +generation_type: mmv1 +source_file: products/firestore/Field.yaml +api_service_name: firestore.googleapis.com +api_version: v1 +api_resource_type_kind: Field fields: - - field: 'collection' - provider_only: true - - field: 'database' - provider_only: true - - field: 'field' - provider_only: true - - api_field: 'indexConfig.indexes.arrayConfig' - - api_field: 'indexConfig.indexes.order' - - api_field: 'indexConfig.indexes.queryScope' - - api_field: 'name' - - api_field: 'ttlConfig.state' + - field: collection + provider_only: true + - field: database + provider_only: true + - field: field + provider_only: true + - api_field: indexConfig.indexes.arrayConfig + - api_field: indexConfig.indexes.order + - api_field: indexConfig.indexes.queryScope + - api_field: name + - api_field: ttlConfig.state diff --git a/google/services/firestore/resource_firestore_index_generated_meta.yaml b/google/services/firestore/resource_firestore_index_generated_meta.yaml index badb4248067..892afa38200 100644 --- a/google/services/firestore/resource_firestore_index_generated_meta.yaml +++ b/google/services/firestore/resource_firestore_index_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_firestore_index' -generation_type: 'mmv1' -source_file: 'products/firestore/Index.yaml' -api_service_name: 'firestore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Index' +resource: google_firestore_index +generation_type: mmv1 +source_file: products/firestore/Index.yaml +api_service_name: firestore.googleapis.com +api_version: v1 +api_resource_type_kind: Index fields: - - api_field: 'apiScope' - - api_field: 'collection' - - api_field: 'database' - - api_field: 'density' - - api_field: 'fields.arrayConfig' - - api_field: 'fields.fieldPath' - - api_field: 'fields.order' - - api_field: 'fields.vectorConfig.dimension' - - api_field: 'fields.vectorConfig.flat' - - api_field: 'multikey' - - api_field: 'name' - - api_field: 'queryScope' - - api_field: 'unique' + - api_field: apiScope + - api_field: collection + - api_field: database + - api_field: density + - api_field: fields.arrayConfig + - api_field: fields.fieldPath + - api_field: fields.order + - api_field: fields.vectorConfig.dimension + - api_field: fields.vectorConfig.flat + - api_field: multikey + - api_field: name + - api_field: queryScope + - api_field: unique diff --git a/google/services/firestore/resource_firestore_user_creds_generated_meta.yaml b/google/services/firestore/resource_firestore_user_creds_generated_meta.yaml index 7a30f0b2439..7699cfa20d3 100644 --- a/google/services/firestore/resource_firestore_user_creds_generated_meta.yaml +++ b/google/services/firestore/resource_firestore_user_creds_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_firestore_user_creds' -generation_type: 'mmv1' -source_file: 'products/firestore/UserCreds.yaml' -api_service_name: 'firestore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'UserCreds' +resource: google_firestore_user_creds +generation_type: mmv1 +source_file: products/firestore/UserCreds.yaml +api_service_name: firestore.googleapis.com +api_version: v1 +api_resource_type_kind: UserCreds fields: - - api_field: 'createTime' - - field: 'database' - provider_only: true - - api_field: 'name' - - api_field: 'resourceIdentity.principal' - - api_field: 'securePassword' - - api_field: 'state' - - api_field: 'updateTime' + - api_field: createTime + - field: database + provider_only: true + - api_field: name + - api_field: resourceIdentity.principal + - api_field: securePassword + - api_field: state + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_code_repository_index_generated_meta.yaml b/google/services/gemini/resource_gemini_code_repository_index_generated_meta.yaml index cde267101a0..89768eae28a 100644 --- a/google/services/gemini/resource_gemini_code_repository_index_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_code_repository_index_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_gemini_code_repository_index' -generation_type: 'mmv1' -source_file: 'products/gemini/CodeRepositoryIndex.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CodeRepositoryIndex' +resource: google_gemini_code_repository_index +generation_type: mmv1 +source_file: products/gemini/CodeRepositoryIndex.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: CodeRepositoryIndex fields: - - field: 'code_repository_index_id' - provider_only: true - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - field: 'force_destroy' - provider_only: true - - api_field: 'kmsKey' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: code_repository_index_id + provider_only: true + - api_field: createTime + - field: effective_labels + provider_only: true + - field: force_destroy + provider_only: true + - api_field: kmsKey + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_code_tools_setting_binding_generated_meta.yaml b/google/services/gemini/resource_gemini_code_tools_setting_binding_generated_meta.yaml index d0c55303c48..a1a018d879f 100644 --- a/google/services/gemini/resource_gemini_code_tools_setting_binding_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_code_tools_setting_binding_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_gemini_code_tools_setting_binding' -generation_type: 'mmv1' -source_file: 'products/gemini/CodeToolsSettingBinding.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SettingBinding' +resource: google_gemini_code_tools_setting_binding +generation_type: mmv1 +source_file: products/gemini/CodeToolsSettingBinding.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: SettingBinding autogen_status: true fields: - - field: 'code_tools_setting_id' - provider_only: true - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'product' - - field: 'setting_binding_id' - provider_only: true - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: code_tools_setting_id + provider_only: true + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: product + - field: setting_binding_id + provider_only: true + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_code_tools_setting_generated_meta.yaml b/google/services/gemini/resource_gemini_code_tools_setting_generated_meta.yaml index c8a92871898..a3c05a1c4e9 100644 --- a/google/services/gemini/resource_gemini_code_tools_setting_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_code_tools_setting_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_gemini_code_tools_setting' -generation_type: 'mmv1' -source_file: 'products/gemini/CodeToolsSetting.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CodeToolsSetting' +resource: google_gemini_code_tools_setting +generation_type: mmv1 +source_file: products/gemini/CodeToolsSetting.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: CodeToolsSetting autogen_status: true fields: - - field: 'code_tools_setting_id' - provider_only: true - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'enabledTool.accountConnector' - - api_field: 'enabledTool.config.key' - - api_field: 'enabledTool.config.value' - - api_field: 'enabledTool.handle' - - api_field: 'enabledTool.tool' - - api_field: 'enabledTool.uriOverride' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: code_tools_setting_id + provider_only: true + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: enabledTool.accountConnector + - api_field: enabledTool.config.key + - api_field: enabledTool.config.value + - api_field: enabledTool.handle + - api_field: enabledTool.tool + - api_field: enabledTool.uriOverride + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_data_sharing_with_google_setting_binding_generated_meta.yaml b/google/services/gemini/resource_gemini_data_sharing_with_google_setting_binding_generated_meta.yaml index 4b9de85a8ae..56cd76a1453 100644 --- a/google/services/gemini/resource_gemini_data_sharing_with_google_setting_binding_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_data_sharing_with_google_setting_binding_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_gemini_data_sharing_with_google_setting_binding' -generation_type: 'mmv1' -source_file: 'products/gemini/DataSharingWithGoogleSettingBinding.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SettingBinding' +resource: google_gemini_data_sharing_with_google_setting_binding +generation_type: mmv1 +source_file: products/gemini/DataSharingWithGoogleSettingBinding.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: SettingBinding api_variant_patterns: - - 'projects/{project}/locations/{location}/dataSharingWithGoogleSettings/{dataSharingWithGoogleSetting}/settingBindings/{settingBinding}' + - projects/{project}/locations/{location}/dataSharingWithGoogleSettings/{dataSharingWithGoogleSetting}/settingBindings/{settingBinding} autogen_status: true fields: - - api_field: 'createTime' - - field: 'data_sharing_with_google_setting_id' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'product' - - field: 'setting_binding_id' - provider_only: true - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: data_sharing_with_google_setting_id + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: product + - field: setting_binding_id + provider_only: true + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_data_sharing_with_google_setting_generated_meta.yaml b/google/services/gemini/resource_gemini_data_sharing_with_google_setting_generated_meta.yaml index ef5e0564008..b4c0870a5c6 100644 --- a/google/services/gemini/resource_gemini_data_sharing_with_google_setting_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_data_sharing_with_google_setting_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_gemini_data_sharing_with_google_setting' -generation_type: 'mmv1' -source_file: 'products/gemini/DataSharingWithGoogleSetting.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataSharingWithGoogleSetting' +resource: google_gemini_data_sharing_with_google_setting +generation_type: mmv1 +source_file: products/gemini/DataSharingWithGoogleSetting.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: DataSharingWithGoogleSetting autogen_status: true fields: - - api_field: 'createTime' - - field: 'data_sharing_with_google_setting_id' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'enableDataSharing' - - api_field: 'enablePreviewDataSharing' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: data_sharing_with_google_setting_id + provider_only: true + - field: effective_labels + provider_only: true + - api_field: enableDataSharing + - api_field: enablePreviewDataSharing + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_binding_generated_meta.yaml b/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_binding_generated_meta.yaml index b9ec16fea01..8e0d6feb588 100644 --- a/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_binding_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_binding_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_gemini_gemini_gcp_enablement_setting_binding' -generation_type: 'mmv1' -source_file: 'products/gemini/GeminiGcpEnablementSettingBinding.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SettingBinding' +resource: google_gemini_gemini_gcp_enablement_setting_binding +generation_type: mmv1 +source_file: products/gemini/GeminiGcpEnablementSettingBinding.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: SettingBinding api_variant_patterns: - - 'projects/{project}/locations/{location}/geminiGcpEnablementSettings/{geminiGcpEnablementSetting}/settingBindings/{settingBinding}' + - projects/{project}/locations/{location}/geminiGcpEnablementSettings/{geminiGcpEnablementSetting}/settingBindings/{settingBinding} autogen_status: true fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - field: 'gemini_gcp_enablement_setting_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'product' - - field: 'setting_binding_id' - provider_only: true - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - field: gemini_gcp_enablement_setting_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: product + - field: setting_binding_id + provider_only: true + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_generated_meta.yaml b/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_generated_meta.yaml index 198cf8806a6..f797fe24c82 100644 --- a/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_gemini_gcp_enablement_setting_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_gemini_gemini_gcp_enablement_setting' -generation_type: 'mmv1' -source_file: 'products/gemini/GeminiGcpEnablementSetting.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GeminiGcpEnablementSetting' +resource: google_gemini_gemini_gcp_enablement_setting +generation_type: mmv1 +source_file: products/gemini/GeminiGcpEnablementSetting.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: GeminiGcpEnablementSetting autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'disableWebGrounding' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableCustomerDataSharing' - - field: 'gemini_gcp_enablement_setting_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'webGroundingType' + - api_field: createTime + - api_field: disableWebGrounding + - field: effective_labels + provider_only: true + - api_field: enableCustomerDataSharing + - field: gemini_gcp_enablement_setting_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: webGroundingType diff --git a/google/services/gemini/resource_gemini_logging_setting_binding_generated_meta.yaml b/google/services/gemini/resource_gemini_logging_setting_binding_generated_meta.yaml index 6c75cf68801..bfb50c003ec 100644 --- a/google/services/gemini/resource_gemini_logging_setting_binding_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_logging_setting_binding_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_gemini_logging_setting_binding' -generation_type: 'mmv1' -source_file: 'products/gemini/LoggingSettingBinding.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SettingBinding' +resource: google_gemini_logging_setting_binding +generation_type: mmv1 +source_file: products/gemini/LoggingSettingBinding.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: SettingBinding api_variant_patterns: - - 'projects/{project}/locations/{location}/loggingSettings/{loggingSetting}/settingBindings/{settingBinding}' + - projects/{project}/locations/{location}/loggingSettings/{loggingSetting}/settingBindings/{settingBinding} autogen_status: true fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'logging_setting_id' - provider_only: true - - api_field: 'name' - - api_field: 'product' - - field: 'setting_binding_id' - provider_only: true - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: logging_setting_id + provider_only: true + - api_field: name + - api_field: product + - field: setting_binding_id + provider_only: true + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_logging_setting_generated_meta.yaml b/google/services/gemini/resource_gemini_logging_setting_generated_meta.yaml index d3c6b242057..3bef260f108 100644 --- a/google/services/gemini/resource_gemini_logging_setting_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_logging_setting_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_gemini_logging_setting' -generation_type: 'mmv1' -source_file: 'products/gemini/LoggingSetting.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'LoggingSetting' +resource: google_gemini_logging_setting +generation_type: mmv1 +source_file: products/gemini/LoggingSetting.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: LoggingSetting autogen_status: true fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'logMetadata' - - api_field: 'logPromptsAndResponses' - - field: 'logging_setting_id' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: logMetadata + - api_field: logPromptsAndResponses + - field: logging_setting_id + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_release_channel_setting_binding_generated_meta.yaml b/google/services/gemini/resource_gemini_release_channel_setting_binding_generated_meta.yaml index 3e07678f127..a5cbfd57aa3 100644 --- a/google/services/gemini/resource_gemini_release_channel_setting_binding_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_release_channel_setting_binding_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_gemini_release_channel_setting_binding' -generation_type: 'mmv1' -source_file: 'products/gemini/ReleaseChannelSettingBinding.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SettingBinding' +resource: google_gemini_release_channel_setting_binding +generation_type: mmv1 +source_file: products/gemini/ReleaseChannelSettingBinding.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: SettingBinding api_variant_patterns: - - 'projects/{project}/locations/{location}/releaseChannelSettings/{releaseChannelSetting}/settingBindings/{settingBinding}' + - projects/{project}/locations/{location}/releaseChannelSettings/{releaseChannelSetting}/settingBindings/{settingBinding} autogen_status: true fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'product' - - field: 'release_channel_setting_id' - provider_only: true - - field: 'setting_binding_id' - provider_only: true - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: product + - field: release_channel_setting_id + provider_only: true + - field: setting_binding_id + provider_only: true + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_release_channel_setting_generated_meta.yaml b/google/services/gemini/resource_gemini_release_channel_setting_generated_meta.yaml index 3a85171ca6f..deac41afa8c 100644 --- a/google/services/gemini/resource_gemini_release_channel_setting_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_release_channel_setting_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_gemini_release_channel_setting' -generation_type: 'mmv1' -source_file: 'products/gemini/ReleaseChannelSetting.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ReleaseChannelSetting' +resource: google_gemini_release_channel_setting +generation_type: mmv1 +source_file: products/gemini/ReleaseChannelSetting.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: ReleaseChannelSetting autogen_status: true fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'releaseChannel' - - field: 'release_channel_setting_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: releaseChannel + - field: release_channel_setting_id + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gemini/resource_gemini_repository_group_generated_meta.yaml b/google/services/gemini/resource_gemini_repository_group_generated_meta.yaml index 91dcf6c19db..f2807654251 100644 --- a/google/services/gemini/resource_gemini_repository_group_generated_meta.yaml +++ b/google/services/gemini/resource_gemini_repository_group_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_gemini_repository_group' -generation_type: 'mmv1' -source_file: 'products/gemini/RepositoryGroup.yaml' -api_service_name: 'cloudaicompanion.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RepositoryGroup' +resource: google_gemini_repository_group +generation_type: mmv1 +source_file: products/gemini/RepositoryGroup.yaml +api_service_name: cloudaicompanion.googleapis.com +api_version: v1 +api_resource_type_kind: RepositoryGroup fields: - - field: 'code_repository_index' - provider_only: true - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'repositories.branchPattern' - - api_field: 'repositories.resource' - - field: 'repository_group_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: code_repository_index + provider_only: true + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: repositories.branchPattern + - api_field: repositories.resource + - field: repository_group_id + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gkebackup/iam_gke_backup_backup_plan_generated_test.go b/google/services/gkebackup/iam_gke_backup_backup_plan_generated_test.go index 3997129210f..d17b740487c 100644 --- a/google/services/gkebackup/iam_gke_backup_backup_plan_generated_test.go +++ b/google/services/gkebackup/iam_gke_backup_backup_plan_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccGKEBackupBackupPlanIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_backup_plan_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-basic-plan%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupBackupPlanIAMBindingStateID("google_gke_backup_backup_plan_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccGKEBackupBackupPlanIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_backup_plan_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-basic-plan%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupBackupPlanIAMBindingStateID("google_gke_backup_backup_plan_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccGKEBackupBackupPlanIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_backup_plan_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-basic-plan%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupBackupPlanIAMMemberStateID("google_gke_backup_backup_plan_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccGKEBackupBackupPlanIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_backup_plan_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-basic-plan%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupBackupPlanIAMPolicyStateID("google_gke_backup_backup_plan_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccGKEBackupBackupPlanIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_backup_plan_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-basic-plan%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupBackupPlanIAMPolicyStateID("google_gke_backup_backup_plan_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -365,3 +366,57 @@ resource "google_gke_backup_backup_plan_iam_binding" "foo" { } `, context) } + +func generateGKEBackupBackupPlanIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateGKEBackupBackupPlanIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateGKEBackupBackupPlanIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/backupPlans/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/gkebackup/iam_gke_backup_restore_plan_generated_test.go b/google/services/gkebackup/iam_gke_backup_restore_plan_generated_test.go index 5f1da80ab43..04cb4185bf2 100644 --- a/google/services/gkebackup/iam_gke_backup_restore_plan_generated_test.go +++ b/google/services/gkebackup/iam_gke_backup_restore_plan_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccGKEBackupRestorePlanIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_restore_plan_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-restore-all-ns%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupRestorePlanIAMBindingStateID("google_gke_backup_restore_plan_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccGKEBackupRestorePlanIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_restore_plan_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-restore-all-ns%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupRestorePlanIAMBindingStateID("google_gke_backup_restore_plan_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccGKEBackupRestorePlanIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_restore_plan_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-restore-all-ns%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupRestorePlanIAMMemberStateID("google_gke_backup_restore_plan_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccGKEBackupRestorePlanIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_restore_plan_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-restore-all-ns%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupRestorePlanIAMPolicyStateID("google_gke_backup_restore_plan_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccGKEBackupRestorePlanIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_backup_restore_plan_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-restore-all-ns%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEBackupRestorePlanIAMPolicyStateID("google_gke_backup_restore_plan_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -445,3 +446,57 @@ resource "google_gke_backup_restore_plan_iam_binding" "foo" { } `, context) } + +func generateGKEBackupRestorePlanIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateGKEBackupRestorePlanIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateGKEBackupRestorePlanIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/restorePlans/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/gkebackup/resource_gke_backup_backup_channel_generated_meta.yaml b/google/services/gkebackup/resource_gke_backup_backup_channel_generated_meta.yaml index ddf52423cc9..966c8806dcf 100644 --- a/google/services/gkebackup/resource_gke_backup_backup_channel_generated_meta.yaml +++ b/google/services/gkebackup/resource_gke_backup_backup_channel_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_gke_backup_backup_channel' -generation_type: 'mmv1' -source_file: 'products/gkebackup/BackupChannel.yaml' -api_service_name: 'gkebackup.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupChannel' +resource: google_gke_backup_backup_channel +generation_type: mmv1 +source_file: products/gkebackup/BackupChannel.yaml +api_service_name: gkebackup.googleapis.com +api_version: v1 +api_resource_type_kind: BackupChannel fields: - - api_field: 'description' - - api_field: 'destinationProject' - - api_field: 'destinationProjectId' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' + - api_field: description + - api_field: destinationProject + - api_field: destinationProjectId + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: uid diff --git a/google/services/gkebackup/resource_gke_backup_backup_plan_generated_meta.yaml b/google/services/gkebackup/resource_gke_backup_backup_plan_generated_meta.yaml index 12bb9689d88..d6d4349b434 100644 --- a/google/services/gkebackup/resource_gke_backup_backup_plan_generated_meta.yaml +++ b/google/services/gkebackup/resource_gke_backup_backup_plan_generated_meta.yaml @@ -1,49 +1,49 @@ -resource: 'google_gke_backup_backup_plan' -generation_type: 'mmv1' -source_file: 'products/gkebackup/BackupPlan.yaml' -api_service_name: 'gkebackup.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupPlan' +resource: google_gke_backup_backup_plan +generation_type: mmv1 +source_file: products/gkebackup/BackupPlan.yaml +api_service_name: gkebackup.googleapis.com +api_version: v1 +api_resource_type_kind: BackupPlan fields: - - api_field: 'backupConfig.allNamespaces' - - api_field: 'backupConfig.encryptionKey.gcpKmsEncryptionKey' - - api_field: 'backupConfig.includeSecrets' - - api_field: 'backupConfig.includeVolumeData' - - api_field: 'backupConfig.permissiveMode' - - api_field: 'backupConfig.selectedApplications.namespacedNames.name' - - api_field: 'backupConfig.selectedApplications.namespacedNames.namespace' - - api_field: 'backupConfig.selectedNamespaceLabels.resourceLabels.key' - - api_field: 'backupConfig.selectedNamespaceLabels.resourceLabels.value' - - api_field: 'backupConfig.selectedNamespaces.namespaces' - - api_field: 'backupSchedule.cronSchedule' - - api_field: 'backupSchedule.paused' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.daily' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.daysOfWeek.daysOfWeek' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.duration' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.singleOccurrenceDate.day' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.singleOccurrenceDate.month' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.singleOccurrenceDate.year' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.startTime.hours' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.startTime.minutes' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.startTime.nanos' - - api_field: 'backupSchedule.rpoConfig.exclusionWindows.startTime.seconds' - - api_field: 'backupSchedule.rpoConfig.targetRpoMinutes' - - api_field: 'cluster' - - api_field: 'deactivated' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'protectedPodCount' - - api_field: 'retentionPolicy.backupDeleteLockDays' - - api_field: 'retentionPolicy.backupRetainDays' - - api_field: 'retentionPolicy.locked' - - api_field: 'state' - - api_field: 'stateReason' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' + - api_field: backupConfig.allNamespaces + - api_field: backupConfig.encryptionKey.gcpKmsEncryptionKey + - api_field: backupConfig.includeSecrets + - api_field: backupConfig.includeVolumeData + - api_field: backupConfig.permissiveMode + - api_field: backupConfig.selectedApplications.namespacedNames.name + - api_field: backupConfig.selectedApplications.namespacedNames.namespace + - api_field: backupConfig.selectedNamespaceLabels.resourceLabels.key + - api_field: backupConfig.selectedNamespaceLabels.resourceLabels.value + - api_field: backupConfig.selectedNamespaces.namespaces + - api_field: backupSchedule.cronSchedule + - api_field: backupSchedule.paused + - api_field: backupSchedule.rpoConfig.exclusionWindows.daily + - api_field: backupSchedule.rpoConfig.exclusionWindows.daysOfWeek.daysOfWeek + - api_field: backupSchedule.rpoConfig.exclusionWindows.duration + - api_field: backupSchedule.rpoConfig.exclusionWindows.singleOccurrenceDate.day + - api_field: backupSchedule.rpoConfig.exclusionWindows.singleOccurrenceDate.month + - api_field: backupSchedule.rpoConfig.exclusionWindows.singleOccurrenceDate.year + - api_field: backupSchedule.rpoConfig.exclusionWindows.startTime.hours + - api_field: backupSchedule.rpoConfig.exclusionWindows.startTime.minutes + - api_field: backupSchedule.rpoConfig.exclusionWindows.startTime.nanos + - api_field: backupSchedule.rpoConfig.exclusionWindows.startTime.seconds + - api_field: backupSchedule.rpoConfig.targetRpoMinutes + - api_field: cluster + - api_field: deactivated + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: protectedPodCount + - api_field: retentionPolicy.backupDeleteLockDays + - api_field: retentionPolicy.backupRetainDays + - api_field: retentionPolicy.locked + - api_field: state + - api_field: stateReason + - field: terraform_labels + provider_only: true + - api_field: uid diff --git a/google/services/gkebackup/resource_gke_backup_restore_channel_generated_meta.yaml b/google/services/gkebackup/resource_gke_backup_restore_channel_generated_meta.yaml index 79fc7da0ba1..bb2ca68fb65 100644 --- a/google/services/gkebackup/resource_gke_backup_restore_channel_generated_meta.yaml +++ b/google/services/gkebackup/resource_gke_backup_restore_channel_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_gke_backup_restore_channel' -generation_type: 'mmv1' -source_file: 'products/gkebackup/RestoreChannel.yaml' -api_service_name: 'gkebackup.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RestoreChannel' +resource: google_gke_backup_restore_channel +generation_type: mmv1 +source_file: products/gkebackup/RestoreChannel.yaml +api_service_name: gkebackup.googleapis.com +api_version: v1 +api_resource_type_kind: RestoreChannel fields: - - api_field: 'description' - - api_field: 'destinationProject' - - api_field: 'destinationProjectId' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' + - api_field: description + - api_field: destinationProject + - api_field: destinationProjectId + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: uid diff --git a/google/services/gkebackup/resource_gke_backup_restore_plan_generated_meta.yaml b/google/services/gkebackup/resource_gke_backup_restore_plan_generated_meta.yaml index 1c846af0534..4958d695db4 100644 --- a/google/services/gkebackup/resource_gke_backup_restore_plan_generated_meta.yaml +++ b/google/services/gkebackup/resource_gke_backup_restore_plan_generated_meta.yaml @@ -1,51 +1,51 @@ -resource: 'google_gke_backup_restore_plan' -generation_type: 'mmv1' -source_file: 'products/gkebackup/RestorePlan.yaml' -api_service_name: 'gkebackup.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RestorePlan' +resource: google_gke_backup_restore_plan +generation_type: mmv1 +source_file: products/gkebackup/RestorePlan.yaml +api_service_name: gkebackup.googleapis.com +api_version: v1 +api_resource_type_kind: RestorePlan fields: - - api_field: 'backupPlan' - - api_field: 'cluster' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'restoreConfig.allNamespaces' - - api_field: 'restoreConfig.clusterResourceConflictPolicy' - - api_field: 'restoreConfig.clusterResourceRestoreScope.allGroupKinds' - - api_field: 'restoreConfig.clusterResourceRestoreScope.excludedGroupKinds.resourceGroup' - - api_field: 'restoreConfig.clusterResourceRestoreScope.excludedGroupKinds.resourceKind' - - api_field: 'restoreConfig.clusterResourceRestoreScope.noGroupKinds' - - api_field: 'restoreConfig.clusterResourceRestoreScope.selectedGroupKinds.resourceGroup' - - api_field: 'restoreConfig.clusterResourceRestoreScope.selectedGroupKinds.resourceKind' - - api_field: 'restoreConfig.excludedNamespaces.namespaces' - - api_field: 'restoreConfig.namespacedResourceRestoreMode' - - api_field: 'restoreConfig.noNamespaces' - - api_field: 'restoreConfig.restoreOrder.groupKindDependencies.requiring.resourceGroup' - - api_field: 'restoreConfig.restoreOrder.groupKindDependencies.requiring.resourceKind' - - api_field: 'restoreConfig.restoreOrder.groupKindDependencies.satisfying.resourceGroup' - - api_field: 'restoreConfig.restoreOrder.groupKindDependencies.satisfying.resourceKind' - - api_field: 'restoreConfig.selectedApplications.namespacedNames.name' - - api_field: 'restoreConfig.selectedApplications.namespacedNames.namespace' - - api_field: 'restoreConfig.selectedNamespaces.namespaces' - - api_field: 'restoreConfig.transformationRules.description' - - api_field: 'restoreConfig.transformationRules.fieldActions.fromPath' - - api_field: 'restoreConfig.transformationRules.fieldActions.op' - - api_field: 'restoreConfig.transformationRules.fieldActions.path' - - api_field: 'restoreConfig.transformationRules.fieldActions.value' - - api_field: 'restoreConfig.transformationRules.resourceFilter.groupKinds.resourceGroup' - - api_field: 'restoreConfig.transformationRules.resourceFilter.groupKinds.resourceKind' - - api_field: 'restoreConfig.transformationRules.resourceFilter.jsonPath' - - api_field: 'restoreConfig.transformationRules.resourceFilter.namespaces' - - api_field: 'restoreConfig.volumeDataRestorePolicy' - - api_field: 'restoreConfig.volumeDataRestorePolicyBindings.policy' - - api_field: 'restoreConfig.volumeDataRestorePolicyBindings.volumeType' - - api_field: 'state' - - api_field: 'stateReason' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' + - api_field: backupPlan + - api_field: cluster + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: restoreConfig.allNamespaces + - api_field: restoreConfig.clusterResourceConflictPolicy + - api_field: restoreConfig.clusterResourceRestoreScope.allGroupKinds + - api_field: restoreConfig.clusterResourceRestoreScope.excludedGroupKinds.resourceGroup + - api_field: restoreConfig.clusterResourceRestoreScope.excludedGroupKinds.resourceKind + - api_field: restoreConfig.clusterResourceRestoreScope.noGroupKinds + - api_field: restoreConfig.clusterResourceRestoreScope.selectedGroupKinds.resourceGroup + - api_field: restoreConfig.clusterResourceRestoreScope.selectedGroupKinds.resourceKind + - api_field: restoreConfig.excludedNamespaces.namespaces + - api_field: restoreConfig.namespacedResourceRestoreMode + - api_field: restoreConfig.noNamespaces + - api_field: restoreConfig.restoreOrder.groupKindDependencies.requiring.resourceGroup + - api_field: restoreConfig.restoreOrder.groupKindDependencies.requiring.resourceKind + - api_field: restoreConfig.restoreOrder.groupKindDependencies.satisfying.resourceGroup + - api_field: restoreConfig.restoreOrder.groupKindDependencies.satisfying.resourceKind + - api_field: restoreConfig.selectedApplications.namespacedNames.name + - api_field: restoreConfig.selectedApplications.namespacedNames.namespace + - api_field: restoreConfig.selectedNamespaces.namespaces + - api_field: restoreConfig.transformationRules.description + - api_field: restoreConfig.transformationRules.fieldActions.fromPath + - api_field: restoreConfig.transformationRules.fieldActions.op + - api_field: restoreConfig.transformationRules.fieldActions.path + - api_field: restoreConfig.transformationRules.fieldActions.value + - api_field: restoreConfig.transformationRules.resourceFilter.groupKinds.resourceGroup + - api_field: restoreConfig.transformationRules.resourceFilter.groupKinds.resourceKind + - api_field: restoreConfig.transformationRules.resourceFilter.jsonPath + - api_field: restoreConfig.transformationRules.resourceFilter.namespaces + - api_field: restoreConfig.volumeDataRestorePolicy + - api_field: restoreConfig.volumeDataRestorePolicyBindings.policy + - api_field: restoreConfig.volumeDataRestorePolicyBindings.volumeType + - api_field: state + - api_field: stateReason + - field: terraform_labels + provider_only: true + - api_field: uid diff --git a/google/services/gkehub/iam_gke_hub_membership_generated_test.go b/google/services/gkehub/iam_gke_hub_membership_generated_test.go index 956a4c4c6cc..0ccec6cbe2c 100644 --- a/google/services/gkehub/iam_gke_hub_membership_generated_test.go +++ b/google/services/gkehub/iam_gke_hub_membership_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccGKEHubMembershipIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_membership_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/memberships/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("basic%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHubMembershipIAMBindingStateID("google_gke_hub_membership_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccGKEHubMembershipIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_membership_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/memberships/%s roles/viewer", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("basic%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHubMembershipIAMBindingStateID("google_gke_hub_membership_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccGKEHubMembershipIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_membership_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/memberships/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("basic%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHubMembershipIAMMemberStateID("google_gke_hub_membership_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccGKEHubMembershipIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_membership_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/memberships/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("basic%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHubMembershipIAMPolicyStateID("google_gke_hub_membership_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccGKEHubMembershipIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_membership_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/memberships/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("basic%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHubMembershipIAMPolicyStateID("google_gke_hub_membership_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -320,3 +321,57 @@ resource "google_gke_hub_membership_iam_binding" "foo" { } `, context) } + +func generateGKEHubMembershipIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + membership_id := tpgresource.GetResourceNameFromSelfLink(rawState["membership_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/memberships/%s", project, location, membership_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateGKEHubMembershipIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + membership_id := tpgresource.GetResourceNameFromSelfLink(rawState["membership_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/memberships/%s", project, location, membership_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateGKEHubMembershipIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + membership_id := tpgresource.GetResourceNameFromSelfLink(rawState["membership_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/memberships/%s", project, location, membership_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/gkehub/resource_gke_hub_membership_generated_meta.yaml b/google/services/gkehub/resource_gke_hub_membership_generated_meta.yaml index c580bb46a18..8922cfb0e78 100644 --- a/google/services/gkehub/resource_gke_hub_membership_generated_meta.yaml +++ b/google/services/gkehub/resource_gke_hub_membership_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_gke_hub_membership' -generation_type: 'mmv1' -source_file: 'products/gkehub/Membership.yaml' -api_service_name: 'gkehub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Membership' +resource: google_gke_hub_membership +generation_type: mmv1 +source_file: products/gkehub/Membership.yaml +api_service_name: gkehub.googleapis.com +api_version: v1 +api_resource_type_kind: Membership fields: - - api_field: 'authority.issuer' - - field: 'effective_labels' - provider_only: true - - api_field: 'endpoint.gkeCluster.resourceLink' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'membership_id' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true + - api_field: authority.issuer + - field: effective_labels + provider_only: true + - api_field: endpoint.gkeCluster.resourceLink + - api_field: labels + - field: location + provider_only: true + - field: membership_id + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true diff --git a/google/services/gkehub2/iam_gke_hub_scope_generated_test.go b/google/services/gkehub2/iam_gke_hub_scope_generated_test.go index f4770561059..200658b290c 100644 --- a/google/services/gkehub2/iam_gke_hub_scope_generated_test.go +++ b/google/services/gkehub2/iam_gke_hub_scope_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccGKEHub2ScopeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_scope_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/scopes/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-scope%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHub2ScopeIAMBindingStateID("google_gke_hub_scope_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccGKEHub2ScopeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_scope_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/scopes/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-scope%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHub2ScopeIAMBindingStateID("google_gke_hub_scope_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccGKEHub2ScopeIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_scope_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/scopes/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-scope%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHub2ScopeIAMMemberStateID("google_gke_hub_scope_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccGKEHub2ScopeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_scope_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/scopes/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-scope%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHub2ScopeIAMPolicyStateID("google_gke_hub_scope_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccGKEHub2ScopeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_gke_hub_scope_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/global/scopes/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-my-scope%s", context["random_suffix"])), + ImportStateIdFunc: generateGKEHub2ScopeIAMPolicyStateID("google_gke_hub_scope_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,3 +278,54 @@ resource "google_gke_hub_scope_iam_binding" "foo" { } `, context) } + +func generateGKEHub2ScopeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + scope_id := tpgresource.GetResourceNameFromSelfLink(rawState["scope_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/global/scopes/%s", project, scope_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateGKEHub2ScopeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + scope_id := tpgresource.GetResourceNameFromSelfLink(rawState["scope_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/global/scopes/%s", project, scope_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateGKEHub2ScopeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + scope_id := tpgresource.GetResourceNameFromSelfLink(rawState["scope_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/global/scopes/%s", project, scope_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/gkehub2/resource_gke_hub_feature.go b/google/services/gkehub2/resource_gke_hub_feature.go index 89c8acb7645..49971e69677 100644 --- a/google/services/gkehub2/resource_gke_hub_feature.go +++ b/google/services/gkehub2/resource_gke_hub_feature.go @@ -321,6 +321,7 @@ func ResourceGKEHub2Feature() *schema.Resource { }, "audit_interval_seconds": { Type: schema.TypeInt, + Computed: true, Optional: true, Description: `Interval for Policy Controller Audit scans (in seconds). When set to 0, this disables audit functionality altogether.`, }, diff --git a/google/services/gkehub2/resource_gke_hub_feature_generated_meta.yaml b/google/services/gkehub2/resource_gke_hub_feature_generated_meta.yaml index 202c041f15d..5a8ba6c7629 100644 --- a/google/services/gkehub2/resource_gke_hub_feature_generated_meta.yaml +++ b/google/services/gkehub2/resource_gke_hub_feature_generated_meta.yaml @@ -1,79 +1,90 @@ -resource: 'google_gke_hub_feature' -generation_type: 'mmv1' -source_file: 'products/gkehub2/Feature.yaml' -api_service_name: 'gkehub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Feature' +resource: google_gke_hub_feature +generation_type: mmv1 +source_file: products/gkehub2/Feature.yaml +api_service_name: gkehub.googleapis.com +api_version: v1 +api_resource_type_kind: Feature fields: - - api_field: 'createTime' - - api_field: 'deleteTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.enabled' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.gcpServiceAccountEmail' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.httpsProxy' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.policyDir' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.secretType' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.syncBranch' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.syncRepo' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.syncRev' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.git.syncWaitSecs' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.metricsGcpServiceAccountEmail' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.oci.gcpServiceAccountEmail' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.oci.policyDir' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.oci.secretType' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.oci.syncRepo' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.oci.syncWaitSecs' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.oci.version' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.preventDrift' - - api_field: 'fleetDefaultMemberConfig.configmanagement.configSync.sourceFormat' - - api_field: 'fleetDefaultMemberConfig.configmanagement.management' - - api_field: 'fleetDefaultMemberConfig.configmanagement.version' - - api_field: 'fleetDefaultMemberConfig.mesh.management' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.auditIntervalSeconds' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.constraintViolationLimit' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.containerResources.limits.cpu' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.containerResources.limits.memory' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.containerResources.requests.cpu' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.containerResources.requests.memory' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.podAffinity' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.podTolerations.effect' - field: 'fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.deployment_config.pod_toleration.effect' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.podTolerations.key' - field: 'fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.deployment_config.pod_toleration.key' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.podTolerations.operator' - field: 'fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.deployment_config.pod_toleration.operator' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.podTolerations.value' - field: 'fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.deployment_config.pod_toleration.value' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.deploymentConfig.replicaCount' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.exemptableNamespaces' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.installSpec' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.logDeniesEnabled' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.monitoring.backends' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.mutationEnabled' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.policyContent.bundles.bundleInstallSpec.exemptedNamespaces' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.policyContent.templateLibrary.installation' - - api_field: 'fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.referentialRulesEnabled' - - api_field: 'fleetDefaultMemberConfig.policycontroller.version' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'resourceState.hasResources' - - api_field: 'resourceState.state' - - api_field: 'spec.clusterupgrade.gkeUpgradeOverrides.postConditions.soaking' - - api_field: 'spec.clusterupgrade.gkeUpgradeOverrides.upgrade.name' - - api_field: 'spec.clusterupgrade.gkeUpgradeOverrides.upgrade.version' - - api_field: 'spec.clusterupgrade.postConditions.soaking' - - api_field: 'spec.clusterupgrade.upstreamFleets' - - api_field: 'spec.fleetobservability.loggingConfig.defaultConfig.mode' - - api_field: 'spec.fleetobservability.loggingConfig.fleetScopeLogsConfig.mode' - - api_field: 'spec.multiclusteringress.configMembership' - - api_field: 'spec.rbacrolebindingactuation.allowedCustomRoles' - - api_field: 'state.state.code' - - api_field: 'state.state.description' - - api_field: 'state.state.updateTime' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: deleteTime + - field: effective_labels + provider_only: true + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.enabled + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.gcpServiceAccountEmail + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.httpsProxy + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.policyDir + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.secretType + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.syncBranch + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.syncRepo + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.syncRev + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.git.syncWaitSecs + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.metricsGcpServiceAccountEmail + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.oci.gcpServiceAccountEmail + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.oci.policyDir + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.oci.secretType + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.oci.syncRepo + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.oci.syncWaitSecs + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.oci.version + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.preventDrift + - api_field: fleetDefaultMemberConfig.configmanagement.configSync.sourceFormat + - api_field: fleetDefaultMemberConfig.configmanagement.management + - api_field: fleetDefaultMemberConfig.configmanagement.version + - api_field: fleetDefaultMemberConfig.mesh.management + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.auditIntervalSeconds + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.constraintViolationLimit + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.key + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.component + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.containerResources.limits.cpu + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.container_resources.limits.cpu + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.containerResources.limits.memory + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.container_resources.limits.memory + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.containerResources.requests.cpu + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.container_resources.requests.cpu + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.containerResources.requests.memory + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.container_resources.requests.memory + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.podAffinity + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.pod_affinity + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.podTolerations.effect + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.pod_toleration.effect + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.podTolerations.key + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.pod_toleration.key + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.podTolerations.operator + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.pod_toleration.operator + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.podTolerations.value + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.pod_toleration.value + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.deploymentConfigs.value.replicaCount + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.deployment_configs.replica_count + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.exemptableNamespaces + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.installSpec + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.logDeniesEnabled + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.monitoring.backends + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.mutationEnabled + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.policyContent.bundles.key + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.policy_content.bundles.bundle + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.policyContent.bundles.value.exemptedNamespaces + field: fleet_default_member_config.policycontroller.policy_controller_hub_config.policy_content.bundles.exempted_namespaces + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.policyContent.templateLibrary.installation + - api_field: fleetDefaultMemberConfig.policycontroller.policyControllerHubConfig.referentialRulesEnabled + - api_field: fleetDefaultMemberConfig.policycontroller.version + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: resourceState.hasResources + - api_field: resourceState.state + - api_field: spec.clusterupgrade.gkeUpgradeOverrides.postConditions.soaking + - api_field: spec.clusterupgrade.gkeUpgradeOverrides.upgrade.name + - api_field: spec.clusterupgrade.gkeUpgradeOverrides.upgrade.version + - api_field: spec.clusterupgrade.postConditions.soaking + - api_field: spec.clusterupgrade.upstreamFleets + - api_field: spec.fleetobservability.loggingConfig.defaultConfig.mode + - api_field: spec.fleetobservability.loggingConfig.fleetScopeLogsConfig.mode + - api_field: spec.multiclusteringress.configMembership + - api_field: spec.rbacrolebindingactuation.allowedCustomRoles + - api_field: state.state.code + - api_field: state.state.description + - api_field: state.state.updateTime + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/gkehub2/resource_gke_hub_fleet_generated_meta.yaml b/google/services/gkehub2/resource_gke_hub_fleet_generated_meta.yaml index 1c875b1d6f8..f98cfc2420e 100644 --- a/google/services/gkehub2/resource_gke_hub_fleet_generated_meta.yaml +++ b/google/services/gkehub2/resource_gke_hub_fleet_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_gke_hub_fleet' -generation_type: 'mmv1' -source_file: 'products/gkehub2/Fleet.yaml' -api_service_name: 'gkehub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Fleet' +resource: google_gke_hub_fleet +generation_type: mmv1 +source_file: products/gkehub2/Fleet.yaml +api_service_name: gkehub.googleapis.com +api_version: v1 +api_resource_type_kind: Fleet fields: - - api_field: 'createTime' - - api_field: 'defaultClusterConfig.binaryAuthorizationConfig.evaluationMode' - - api_field: 'defaultClusterConfig.binaryAuthorizationConfig.policyBindings.name' - - api_field: 'defaultClusterConfig.securityPostureConfig.mode' - - api_field: 'defaultClusterConfig.securityPostureConfig.vulnerabilityMode' - - api_field: 'deleteTime' - - api_field: 'displayName' - - api_field: 'state.code' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: defaultClusterConfig.binaryAuthorizationConfig.evaluationMode + - api_field: defaultClusterConfig.binaryAuthorizationConfig.policyBindings.name + - api_field: defaultClusterConfig.securityPostureConfig.mode + - api_field: defaultClusterConfig.securityPostureConfig.vulnerabilityMode + - api_field: deleteTime + - api_field: displayName + - api_field: state.code + - api_field: uid + - api_field: updateTime diff --git a/google/services/gkehub2/resource_gke_hub_membership_binding_generated_meta.yaml b/google/services/gkehub2/resource_gke_hub_membership_binding_generated_meta.yaml index 942121aadb1..1693f3ed7b0 100644 --- a/google/services/gkehub2/resource_gke_hub_membership_binding_generated_meta.yaml +++ b/google/services/gkehub2/resource_gke_hub_membership_binding_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_gke_hub_membership_binding' -generation_type: 'mmv1' -source_file: 'products/gkehub2/MembershipBinding.yaml' -api_service_name: 'gkehub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MembershipBinding' +resource: google_gke_hub_membership_binding +generation_type: mmv1 +source_file: products/gkehub2/MembershipBinding.yaml +api_service_name: gkehub.googleapis.com +api_version: v1 +api_resource_type_kind: MembershipBinding fields: - - api_field: 'createTime' - - api_field: 'deleteTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'membership_binding_id' - provider_only: true - - field: 'membership_id' - provider_only: true - - api_field: 'name' - - api_field: 'scope' - - api_field: 'state.code' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: deleteTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: membership_binding_id + provider_only: true + - field: membership_id + provider_only: true + - api_field: name + - api_field: scope + - api_field: state.code + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/gkehub2/resource_gke_hub_namespace_generated_meta.yaml b/google/services/gkehub2/resource_gke_hub_namespace_generated_meta.yaml index 2393b4edf36..7dbd6f4f0b4 100644 --- a/google/services/gkehub2/resource_gke_hub_namespace_generated_meta.yaml +++ b/google/services/gkehub2/resource_gke_hub_namespace_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_gke_hub_namespace' -generation_type: 'mmv1' -source_file: 'products/gkehub2/Namespace.yaml' -api_service_name: 'gkehub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Namespace' +resource: google_gke_hub_namespace +generation_type: mmv1 +source_file: products/gkehub2/Namespace.yaml +api_service_name: gkehub.googleapis.com +api_version: v1 +api_resource_type_kind: Namespace fields: - - api_field: 'createTime' - - api_field: 'deleteTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'namespaceLabels' - - api_field: 'scope' - - field: 'scope_id' - provider_only: true - - field: 'scope_namespace_id' - provider_only: true - - api_field: 'state.code' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: deleteTime + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: namespaceLabels + - api_field: scope + - field: scope_id + provider_only: true + - field: scope_namespace_id + provider_only: true + - api_field: state.code + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/gkehub2/resource_gke_hub_scope_generated_meta.yaml b/google/services/gkehub2/resource_gke_hub_scope_generated_meta.yaml index e393a42127c..aa119a54521 100644 --- a/google/services/gkehub2/resource_gke_hub_scope_generated_meta.yaml +++ b/google/services/gkehub2/resource_gke_hub_scope_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_gke_hub_scope' -generation_type: 'mmv1' -source_file: 'products/gkehub2/Scope.yaml' -api_service_name: 'gkehub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Scope' +resource: google_gke_hub_scope +generation_type: mmv1 +source_file: products/gkehub2/Scope.yaml +api_service_name: gkehub.googleapis.com +api_version: v1 +api_resource_type_kind: Scope fields: - - api_field: 'createTime' - - api_field: 'deleteTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'namespaceLabels' - - field: 'scope_id' - provider_only: true - - api_field: 'state.code' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: deleteTime + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: namespaceLabels + - field: scope_id + provider_only: true + - api_field: state.code + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/gkehub2/resource_gke_hub_scope_rbac_role_binding_generated_meta.yaml b/google/services/gkehub2/resource_gke_hub_scope_rbac_role_binding_generated_meta.yaml index 690c9b9d113..3c5a57e3a5e 100644 --- a/google/services/gkehub2/resource_gke_hub_scope_rbac_role_binding_generated_meta.yaml +++ b/google/services/gkehub2/resource_gke_hub_scope_rbac_role_binding_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_gke_hub_scope_rbac_role_binding' -generation_type: 'mmv1' -source_file: 'products/gkehub2/ScopeRBACRoleBinding.yaml' -api_service_name: 'gkehub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RBACRoleBinding' +resource: google_gke_hub_scope_rbac_role_binding +generation_type: mmv1 +source_file: products/gkehub2/ScopeRBACRoleBinding.yaml +api_service_name: gkehub.googleapis.com +api_version: v1 +api_resource_type_kind: RBACRoleBinding fields: - - api_field: 'createTime' - - api_field: 'deleteTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'group' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'role.customRole' - - api_field: 'role.predefinedRole' - - field: 'scope_id' - provider_only: true - - field: 'scope_rbac_role_binding_id' - provider_only: true - - api_field: 'state.code' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'user' + - api_field: createTime + - api_field: deleteTime + - field: effective_labels + provider_only: true + - api_field: group + - api_field: labels + - api_field: name + - api_field: role.customRole + - api_field: role.predefinedRole + - field: scope_id + provider_only: true + - field: scope_rbac_role_binding_id + provider_only: true + - api_field: state.code + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime + - api_field: user diff --git a/google/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster_generated_meta.yaml b/google/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster_generated_meta.yaml index 2ffadd639e7..aa96b3388a7 100644 --- a/google/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster_generated_meta.yaml +++ b/google/services/gkeonprem/resource_gkeonprem_bare_metal_admin_cluster_generated_meta.yaml @@ -1,85 +1,85 @@ -resource: 'google_gkeonprem_bare_metal_admin_cluster' -generation_type: 'mmv1' -source_file: 'products/gkeonprem/BareMetalAdminCluster.yaml' -api_service_name: 'gkeonprem.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BareMetalAdminCluster' +resource: google_gkeonprem_bare_metal_admin_cluster +generation_type: mmv1 +source_file: products/gkeonprem/BareMetalAdminCluster.yaml +api_service_name: gkeonprem.googleapis.com +api_version: v1 +api_resource_type_kind: BareMetalAdminCluster fields: - - api_field: 'annotations' - - api_field: 'bareMetalVersion' - - api_field: 'clusterOperations.enableApplicationLogs' - - api_field: 'controlPlane.apiServerArgs.argument' - - api_field: 'controlPlane.apiServerArgs.value' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.labels' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.labels' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.operatingSystem' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.effect' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.key' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.value' - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - api_field: 'endpoint' - - api_field: 'etag' - - api_field: 'fleet.membership' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.addresses' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.avoidBuggyIps' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.manualAssign' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.pool' - - api_field: 'loadBalancer.bgpLbConfig.asn' - - api_field: 'loadBalancer.bgpLbConfig.bgpPeerConfigs.asn' - - api_field: 'loadBalancer.bgpLbConfig.bgpPeerConfigs.controlPlaneNodes' - - api_field: 'loadBalancer.bgpLbConfig.bgpPeerConfigs.ipAddress' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryBurst' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryPullQps' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.serializeImagePullsDisabled' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.labels' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.labels' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.operatingSystem' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.effect' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.key' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.value' - - api_field: 'loadBalancer.manualLbConfig.enabled' - - api_field: 'loadBalancer.portConfig.controlPlaneLoadBalancerPort' - - api_field: 'loadBalancer.vipConfig.controlPlaneVip' - - api_field: 'localName' - - field: 'location' - provider_only: true - - api_field: 'maintenanceConfig.maintenanceAddressCidrBlocks' - - field: 'name' - provider_only: true - - api_field: 'networkConfig.advancedNetworking' - - api_field: 'networkConfig.islandModeCidr.podAddressCidrBlocks' - - api_field: 'networkConfig.islandModeCidr.serviceAddressCidrBlocks' - - api_field: 'networkConfig.multipleNetworkInterfacesConfig.enabled' - - api_field: 'nodeAccessConfig.loginUser' - - api_field: 'nodeConfig.maxPodsPerNode' - - api_field: 'proxy.noProxy' - - api_field: 'proxy.uri' - - api_field: 'reconciling' - - api_field: 'securityConfig.authorization.adminUsers.username' - - api_field: 'state' - - api_field: 'status.conditions.lastTransitionTime' - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.state' - - api_field: 'status.conditions.type' - - api_field: 'status.errorMessage' - - api_field: 'storage.lvpNodeMountsConfig.path' - - api_field: 'storage.lvpNodeMountsConfig.storageClass' - - api_field: 'storage.lvpShareConfig.lvpConfig.path' - - api_field: 'storage.lvpShareConfig.lvpConfig.storageClass' - - api_field: 'storage.lvpShareConfig.sharedPathPvCount' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'validationCheck.options' - - api_field: 'validationCheck.scenario' - - api_field: 'validationCheck.status.result.category' - - api_field: 'validationCheck.status.result.description' - - api_field: 'validationCheck.status.result.details' - - api_field: 'validationCheck.status.result.options' - - api_field: 'validationCheck.status.result.reason' + - api_field: annotations + - api_field: bareMetalVersion + - api_field: clusterOperations.enableApplicationLogs + - api_field: controlPlane.apiServerArgs.argument + - api_field: controlPlane.apiServerArgs.value + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.labels + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.labels + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.operatingSystem + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.effect + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.key + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.value + - api_field: createTime + - api_field: deleteTime + - api_field: description + - field: effective_annotations + provider_only: true + - api_field: endpoint + - api_field: etag + - api_field: fleet.membership + - api_field: loadBalancer.bgpLbConfig.addressPools.addresses + - api_field: loadBalancer.bgpLbConfig.addressPools.avoidBuggyIps + - api_field: loadBalancer.bgpLbConfig.addressPools.manualAssign + - api_field: loadBalancer.bgpLbConfig.addressPools.pool + - api_field: loadBalancer.bgpLbConfig.asn + - api_field: loadBalancer.bgpLbConfig.bgpPeerConfigs.asn + - api_field: loadBalancer.bgpLbConfig.bgpPeerConfigs.controlPlaneNodes + - api_field: loadBalancer.bgpLbConfig.bgpPeerConfigs.ipAddress + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryBurst + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryPullQps + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.serializeImagePullsDisabled + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.labels + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.labels + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.operatingSystem + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.effect + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.key + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.value + - api_field: loadBalancer.manualLbConfig.enabled + - api_field: loadBalancer.portConfig.controlPlaneLoadBalancerPort + - api_field: loadBalancer.vipConfig.controlPlaneVip + - api_field: localName + - field: location + provider_only: true + - api_field: maintenanceConfig.maintenanceAddressCidrBlocks + - field: name + provider_only: true + - api_field: networkConfig.advancedNetworking + - api_field: networkConfig.islandModeCidr.podAddressCidrBlocks + - api_field: networkConfig.islandModeCidr.serviceAddressCidrBlocks + - api_field: networkConfig.multipleNetworkInterfacesConfig.enabled + - api_field: nodeAccessConfig.loginUser + - api_field: nodeConfig.maxPodsPerNode + - api_field: proxy.noProxy + - api_field: proxy.uri + - api_field: reconciling + - api_field: securityConfig.authorization.adminUsers.username + - api_field: state + - api_field: status.conditions.lastTransitionTime + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.state + - api_field: status.conditions.type + - api_field: status.errorMessage + - api_field: storage.lvpNodeMountsConfig.path + - api_field: storage.lvpNodeMountsConfig.storageClass + - api_field: storage.lvpShareConfig.lvpConfig.path + - api_field: storage.lvpShareConfig.lvpConfig.storageClass + - api_field: storage.lvpShareConfig.sharedPathPvCount + - api_field: uid + - api_field: updateTime + - api_field: validationCheck.options + - api_field: validationCheck.scenario + - api_field: validationCheck.status.result.category + - api_field: validationCheck.status.result.description + - api_field: validationCheck.status.result.details + - api_field: validationCheck.status.result.options + - api_field: validationCheck.status.result.reason diff --git a/google/services/gkeonprem/resource_gkeonprem_bare_metal_cluster_generated_meta.yaml b/google/services/gkeonprem/resource_gkeonprem_bare_metal_cluster_generated_meta.yaml index 149fae987df..8b26654e090 100644 --- a/google/services/gkeonprem/resource_gkeonprem_bare_metal_cluster_generated_meta.yaml +++ b/google/services/gkeonprem/resource_gkeonprem_bare_metal_cluster_generated_meta.yaml @@ -1,103 +1,103 @@ -resource: 'google_gkeonprem_bare_metal_cluster' -generation_type: 'mmv1' -source_file: 'products/gkeonprem/BareMetalCluster.yaml' -api_service_name: 'gkeonprem.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BareMetalCluster' +resource: google_gkeonprem_bare_metal_cluster +generation_type: mmv1 +source_file: products/gkeonprem/BareMetalCluster.yaml +api_service_name: gkeonprem.googleapis.com +api_version: v1 +api_resource_type_kind: BareMetalCluster fields: - - api_field: 'adminClusterMembership' - - api_field: 'annotations' - - api_field: 'bareMetalVersion' - - api_field: 'binaryAuthorization.evaluationMode' - - api_field: 'clusterOperations.enableApplicationLogs' - - api_field: 'controlPlane.apiServerArgs.argument' - - api_field: 'controlPlane.apiServerArgs.value' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.labels' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.labels' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.operatingSystem' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.effect' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.key' - - api_field: 'controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.value' - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - api_field: 'endpoint' - - api_field: 'etag' - - api_field: 'fleet.membership' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.addresses' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.avoidBuggyIps' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.manualAssign' - - api_field: 'loadBalancer.bgpLbConfig.addressPools.pool' - - api_field: 'loadBalancer.bgpLbConfig.asn' - - api_field: 'loadBalancer.bgpLbConfig.bgpPeerConfigs.asn' - - api_field: 'loadBalancer.bgpLbConfig.bgpPeerConfigs.controlPlaneNodes' - - api_field: 'loadBalancer.bgpLbConfig.bgpPeerConfigs.ipAddress' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryBurst' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryPullQps' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.serializeImagePullsDisabled' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.labels' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.labels' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.operatingSystem' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.effect' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.key' - - api_field: 'loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.value' - - api_field: 'loadBalancer.manualLbConfig.enabled' - - api_field: 'loadBalancer.metalLbConfig.addressPools.addresses' - - api_field: 'loadBalancer.metalLbConfig.addressPools.avoidBuggyIps' - - api_field: 'loadBalancer.metalLbConfig.addressPools.manualAssign' - - api_field: 'loadBalancer.metalLbConfig.addressPools.pool' - - api_field: 'loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.labels' - - api_field: 'loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.labels' - - api_field: 'loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp' - - api_field: 'loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.operatingSystem' - - api_field: 'loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.effect' - - api_field: 'loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.key' - - api_field: 'loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.value' - - api_field: 'loadBalancer.portConfig.controlPlaneLoadBalancerPort' - - api_field: 'loadBalancer.vipConfig.controlPlaneVip' - - api_field: 'loadBalancer.vipConfig.ingressVip' - - api_field: 'localName' - - field: 'location' - provider_only: true - - api_field: 'maintenanceConfig.maintenanceAddressCidrBlocks' - - field: 'name' - provider_only: true - - api_field: 'networkConfig.advancedNetworking' - - api_field: 'networkConfig.islandModeCidr.podAddressCidrBlocks' - - api_field: 'networkConfig.islandModeCidr.serviceAddressCidrBlocks' - - api_field: 'networkConfig.multipleNetworkInterfacesConfig.enabled' - - api_field: 'networkConfig.srIovConfig.enabled' - - api_field: 'nodeAccessConfig.loginUser' - - api_field: 'nodeConfig.containerRuntime' - - api_field: 'nodeConfig.maxPodsPerNode' - - api_field: 'osEnvironmentConfig.packageRepoExcluded' - - api_field: 'proxy.noProxy' - - api_field: 'proxy.uri' - - api_field: 'reconciling' - - api_field: 'securityConfig.authorization.adminUsers.username' - - api_field: 'state' - - api_field: 'status.conditions.lastTransitionTime' - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.state' - - api_field: 'status.conditions.type' - - api_field: 'status.errorMessage' - - api_field: 'storage.lvpNodeMountsConfig.path' - - api_field: 'storage.lvpNodeMountsConfig.storageClass' - - api_field: 'storage.lvpShareConfig.lvpConfig.path' - - api_field: 'storage.lvpShareConfig.lvpConfig.storageClass' - - api_field: 'storage.lvpShareConfig.sharedPathPvCount' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'upgradePolicy.policy' - - api_field: 'validationCheck.options' - - api_field: 'validationCheck.scenario' - - api_field: 'validationCheck.status.result.category' - - api_field: 'validationCheck.status.result.description' - - api_field: 'validationCheck.status.result.details' - - api_field: 'validationCheck.status.result.options' - - api_field: 'validationCheck.status.result.reason' + - api_field: adminClusterMembership + - api_field: annotations + - api_field: bareMetalVersion + - api_field: binaryAuthorization.evaluationMode + - api_field: clusterOperations.enableApplicationLogs + - api_field: controlPlane.apiServerArgs.argument + - api_field: controlPlane.apiServerArgs.value + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.labels + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.labels + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.operatingSystem + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.effect + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.key + - api_field: controlPlane.controlPlaneNodePoolConfig.nodePoolConfig.taints.value + - api_field: createTime + - api_field: deleteTime + - api_field: description + - field: effective_annotations + provider_only: true + - api_field: endpoint + - api_field: etag + - api_field: fleet.membership + - api_field: loadBalancer.bgpLbConfig.addressPools.addresses + - api_field: loadBalancer.bgpLbConfig.addressPools.avoidBuggyIps + - api_field: loadBalancer.bgpLbConfig.addressPools.manualAssign + - api_field: loadBalancer.bgpLbConfig.addressPools.pool + - api_field: loadBalancer.bgpLbConfig.asn + - api_field: loadBalancer.bgpLbConfig.bgpPeerConfigs.asn + - api_field: loadBalancer.bgpLbConfig.bgpPeerConfigs.controlPlaneNodes + - api_field: loadBalancer.bgpLbConfig.bgpPeerConfigs.ipAddress + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryBurst + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.registryPullQps + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.kubeletConfig.serializeImagePullsDisabled + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.labels + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.labels + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.operatingSystem + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.effect + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.key + - api_field: loadBalancer.bgpLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.value + - api_field: loadBalancer.manualLbConfig.enabled + - api_field: loadBalancer.metalLbConfig.addressPools.addresses + - api_field: loadBalancer.metalLbConfig.addressPools.avoidBuggyIps + - api_field: loadBalancer.metalLbConfig.addressPools.manualAssign + - api_field: loadBalancer.metalLbConfig.addressPools.pool + - api_field: loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.labels + - api_field: loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.labels + - api_field: loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.nodeConfigs.nodeIp + - api_field: loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.operatingSystem + - api_field: loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.effect + - api_field: loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.key + - api_field: loadBalancer.metalLbConfig.loadBalancerNodePoolConfig.nodePoolConfig.taints.value + - api_field: loadBalancer.portConfig.controlPlaneLoadBalancerPort + - api_field: loadBalancer.vipConfig.controlPlaneVip + - api_field: loadBalancer.vipConfig.ingressVip + - api_field: localName + - field: location + provider_only: true + - api_field: maintenanceConfig.maintenanceAddressCidrBlocks + - field: name + provider_only: true + - api_field: networkConfig.advancedNetworking + - api_field: networkConfig.islandModeCidr.podAddressCidrBlocks + - api_field: networkConfig.islandModeCidr.serviceAddressCidrBlocks + - api_field: networkConfig.multipleNetworkInterfacesConfig.enabled + - api_field: networkConfig.srIovConfig.enabled + - api_field: nodeAccessConfig.loginUser + - api_field: nodeConfig.containerRuntime + - api_field: nodeConfig.maxPodsPerNode + - api_field: osEnvironmentConfig.packageRepoExcluded + - api_field: proxy.noProxy + - api_field: proxy.uri + - api_field: reconciling + - api_field: securityConfig.authorization.adminUsers.username + - api_field: state + - api_field: status.conditions.lastTransitionTime + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.state + - api_field: status.conditions.type + - api_field: status.errorMessage + - api_field: storage.lvpNodeMountsConfig.path + - api_field: storage.lvpNodeMountsConfig.storageClass + - api_field: storage.lvpShareConfig.lvpConfig.path + - api_field: storage.lvpShareConfig.lvpConfig.storageClass + - api_field: storage.lvpShareConfig.sharedPathPvCount + - api_field: uid + - api_field: updateTime + - api_field: upgradePolicy.policy + - api_field: validationCheck.options + - api_field: validationCheck.scenario + - api_field: validationCheck.status.result.category + - api_field: validationCheck.status.result.description + - api_field: validationCheck.status.result.details + - api_field: validationCheck.status.result.options + - api_field: validationCheck.status.result.reason diff --git a/google/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool_generated_meta.yaml b/google/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool_generated_meta.yaml index 35b808a73d6..3fa428816c6 100644 --- a/google/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool_generated_meta.yaml +++ b/google/services/gkeonprem/resource_gkeonprem_bare_metal_node_pool_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_gkeonprem_bare_metal_node_pool' -generation_type: 'mmv1' -source_file: 'products/gkeonprem/BareMetalNodePool.yaml' -api_service_name: 'gkeonprem.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BareMetalNodePool' +resource: google_gkeonprem_bare_metal_node_pool +generation_type: mmv1 +source_file: products/gkeonprem/BareMetalNodePool.yaml +api_service_name: gkeonprem.googleapis.com +api_version: v1 +api_resource_type_kind: BareMetalNodePool fields: - - api_field: 'annotations' - - field: 'bare_metal_cluster' - provider_only: true - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'nodePoolConfig.labels' - - api_field: 'nodePoolConfig.nodeConfigs.labels' - - api_field: 'nodePoolConfig.nodeConfigs.nodeIp' - - api_field: 'nodePoolConfig.operatingSystem' - - api_field: 'nodePoolConfig.taints.effect' - - api_field: 'nodePoolConfig.taints.key' - - api_field: 'nodePoolConfig.taints.value' - - api_field: 'reconciling' - - api_field: 'state' - - api_field: 'status.conditions.lastTransitionTime' - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.state' - - api_field: 'status.conditions.type' - - api_field: 'status.errorMessage' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - field: bare_metal_cluster + provider_only: true + - api_field: createTime + - api_field: deleteTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - api_field: etag + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: nodePoolConfig.labels + - api_field: nodePoolConfig.nodeConfigs.labels + - api_field: nodePoolConfig.nodeConfigs.nodeIp + - api_field: nodePoolConfig.operatingSystem + - api_field: nodePoolConfig.taints.effect + - api_field: nodePoolConfig.taints.key + - api_field: nodePoolConfig.taints.value + - api_field: reconciling + - api_field: state + - api_field: status.conditions.lastTransitionTime + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.state + - api_field: status.conditions.type + - api_field: status.errorMessage + - api_field: uid + - api_field: updateTime diff --git a/google/services/gkeonprem/resource_gkeonprem_vmware_admin_cluster_generated_meta.yaml b/google/services/gkeonprem/resource_gkeonprem_vmware_admin_cluster_generated_meta.yaml index c6ab184f405..9f427a92efa 100644 --- a/google/services/gkeonprem/resource_gkeonprem_vmware_admin_cluster_generated_meta.yaml +++ b/google/services/gkeonprem/resource_gkeonprem_vmware_admin_cluster_generated_meta.yaml @@ -1,95 +1,95 @@ -resource: 'google_gkeonprem_vmware_admin_cluster' -generation_type: 'mmv1' -source_file: 'products/gkeonprem/VmwareAdminCluster.yaml' -api_service_name: 'gkeonprem.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VmwareAdminCluster' +resource: google_gkeonprem_vmware_admin_cluster +generation_type: mmv1 +source_file: products/gkeonprem/VmwareAdminCluster.yaml +api_service_name: gkeonprem.googleapis.com +api_version: v1 +api_resource_type_kind: VmwareAdminCluster fields: - - api_field: 'addonNode.autoResizeConfig.enabled' - - api_field: 'annotations' - - api_field: 'antiAffinityGroups.aagConfigDisabled' - - api_field: 'authorization.viewerUsers.username' - - api_field: 'autoRepairConfig.enabled' - - api_field: 'bootstrapClusterMembership' - - api_field: 'controlPlaneNode.cpus' - - api_field: 'controlPlaneNode.memory' - - api_field: 'controlPlaneNode.replicas' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_annotations' - provider_only: true - - api_field: 'enableAdvancedCluster' - - api_field: 'endpoint' - - api_field: 'etag' - - api_field: 'fleet.membership' - - api_field: 'imageType' - - api_field: 'loadBalancer.f5Config.address' - - api_field: 'loadBalancer.f5Config.partition' - - api_field: 'loadBalancer.f5Config.snatPool' - - api_field: 'loadBalancer.manualLbConfig.addonsNodePort' - - api_field: 'loadBalancer.manualLbConfig.controlPlaneNodePort' - - api_field: 'loadBalancer.manualLbConfig.ingressHttpNodePort' - - api_field: 'loadBalancer.manualLbConfig.ingressHttpsNodePort' - - api_field: 'loadBalancer.manualLbConfig.konnectivityServerNodePort' - - api_field: 'loadBalancer.metalLbConfig.enabled' - - api_field: 'loadBalancer.vipConfig.addonsVip' - - api_field: 'loadBalancer.vipConfig.controlPlaneVip' - - api_field: 'localName' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'networkConfig.dhcpIpConfig.enabled' - - api_field: 'networkConfig.haControlPlaneConfig.controlPlaneIpBlock.gateway' - - api_field: 'networkConfig.haControlPlaneConfig.controlPlaneIpBlock.ips.hostname' - - api_field: 'networkConfig.haControlPlaneConfig.controlPlaneIpBlock.ips.ip' - - api_field: 'networkConfig.haControlPlaneConfig.controlPlaneIpBlock.netmask' - - api_field: 'networkConfig.hostConfig.dnsSearchDomains' - - api_field: 'networkConfig.hostConfig.dnsServers' - - api_field: 'networkConfig.hostConfig.ntpServers' - - api_field: 'networkConfig.podAddressCidrBlocks' - - api_field: 'networkConfig.serviceAddressCidrBlocks' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.gateway' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.ips.hostname' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.ips.ip' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.netmask' - - api_field: 'networkConfig.vcenterNetwork' - - api_field: 'onPremVersion' - - api_field: 'platformConfig.bundles.status.conditions.lastTransitionTime' - - api_field: 'platformConfig.bundles.status.conditions.message' - - api_field: 'platformConfig.bundles.status.conditions.reason' - - api_field: 'platformConfig.bundles.status.conditions.state' - - api_field: 'platformConfig.bundles.status.conditions.type' - - api_field: 'platformConfig.bundles.status.errorMessage' - - api_field: 'platformConfig.bundles.version' - - api_field: 'platformConfig.platformVersion' - - api_field: 'platformConfig.requiredPlatformVersion' - - api_field: 'platformConfig.status.conditions.lastTransitionTime' - - api_field: 'platformConfig.status.conditions.message' - - api_field: 'platformConfig.status.conditions.reason' - - api_field: 'platformConfig.status.conditions.state' - - api_field: 'platformConfig.status.conditions.type' - - api_field: 'platformConfig.status.errorMessage' - - api_field: 'privateRegistryConfig.address' - - api_field: 'privateRegistryConfig.caCert' - - api_field: 'proxy.noProxy' - - api_field: 'proxy.url' - - api_field: 'reconciling' - - api_field: 'state' - - api_field: 'status.conditions.lastTransitionTime' - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.state' - - api_field: 'status.conditions.type' - - api_field: 'status.errorMessage' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'vcenter.address' - - api_field: 'vcenter.caCertData' - - api_field: 'vcenter.cluster' - - api_field: 'vcenter.dataDisk' - - api_field: 'vcenter.datacenter' - - api_field: 'vcenter.datastore' - - api_field: 'vcenter.folder' - - api_field: 'vcenter.resourcePool' - - api_field: 'vcenter.storagePolicyName' + - api_field: addonNode.autoResizeConfig.enabled + - api_field: annotations + - api_field: antiAffinityGroups.aagConfigDisabled + - api_field: authorization.viewerUsers.username + - api_field: autoRepairConfig.enabled + - api_field: bootstrapClusterMembership + - api_field: controlPlaneNode.cpus + - api_field: controlPlaneNode.memory + - api_field: controlPlaneNode.replicas + - api_field: createTime + - api_field: description + - field: effective_annotations + provider_only: true + - api_field: enableAdvancedCluster + - api_field: endpoint + - api_field: etag + - api_field: fleet.membership + - api_field: imageType + - api_field: loadBalancer.f5Config.address + - api_field: loadBalancer.f5Config.partition + - api_field: loadBalancer.f5Config.snatPool + - api_field: loadBalancer.manualLbConfig.addonsNodePort + - api_field: loadBalancer.manualLbConfig.controlPlaneNodePort + - api_field: loadBalancer.manualLbConfig.ingressHttpNodePort + - api_field: loadBalancer.manualLbConfig.ingressHttpsNodePort + - api_field: loadBalancer.manualLbConfig.konnectivityServerNodePort + - api_field: loadBalancer.metalLbConfig.enabled + - api_field: loadBalancer.vipConfig.addonsVip + - api_field: loadBalancer.vipConfig.controlPlaneVip + - api_field: localName + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: networkConfig.dhcpIpConfig.enabled + - api_field: networkConfig.haControlPlaneConfig.controlPlaneIpBlock.gateway + - api_field: networkConfig.haControlPlaneConfig.controlPlaneIpBlock.ips.hostname + - api_field: networkConfig.haControlPlaneConfig.controlPlaneIpBlock.ips.ip + - api_field: networkConfig.haControlPlaneConfig.controlPlaneIpBlock.netmask + - api_field: networkConfig.hostConfig.dnsSearchDomains + - api_field: networkConfig.hostConfig.dnsServers + - api_field: networkConfig.hostConfig.ntpServers + - api_field: networkConfig.podAddressCidrBlocks + - api_field: networkConfig.serviceAddressCidrBlocks + - api_field: networkConfig.staticIpConfig.ipBlocks.gateway + - api_field: networkConfig.staticIpConfig.ipBlocks.ips.hostname + - api_field: networkConfig.staticIpConfig.ipBlocks.ips.ip + - api_field: networkConfig.staticIpConfig.ipBlocks.netmask + - api_field: networkConfig.vcenterNetwork + - api_field: onPremVersion + - api_field: platformConfig.bundles.status.conditions.lastTransitionTime + - api_field: platformConfig.bundles.status.conditions.message + - api_field: platformConfig.bundles.status.conditions.reason + - api_field: platformConfig.bundles.status.conditions.state + - api_field: platformConfig.bundles.status.conditions.type + - api_field: platformConfig.bundles.status.errorMessage + - api_field: platformConfig.bundles.version + - api_field: platformConfig.platformVersion + - api_field: platformConfig.requiredPlatformVersion + - api_field: platformConfig.status.conditions.lastTransitionTime + - api_field: platformConfig.status.conditions.message + - api_field: platformConfig.status.conditions.reason + - api_field: platformConfig.status.conditions.state + - api_field: platformConfig.status.conditions.type + - api_field: platformConfig.status.errorMessage + - api_field: privateRegistryConfig.address + - api_field: privateRegistryConfig.caCert + - api_field: proxy.noProxy + - api_field: proxy.url + - api_field: reconciling + - api_field: state + - api_field: status.conditions.lastTransitionTime + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.state + - api_field: status.conditions.type + - api_field: status.errorMessage + - api_field: uid + - api_field: updateTime + - api_field: vcenter.address + - api_field: vcenter.caCertData + - api_field: vcenter.cluster + - api_field: vcenter.dataDisk + - api_field: vcenter.datacenter + - api_field: vcenter.datastore + - api_field: vcenter.folder + - api_field: vcenter.resourcePool + - api_field: vcenter.storagePolicyName diff --git a/google/services/gkeonprem/resource_gkeonprem_vmware_cluster_generated_meta.yaml b/google/services/gkeonprem/resource_gkeonprem_vmware_cluster_generated_meta.yaml index 6ca6b94aeba..133aedcaaf9 100644 --- a/google/services/gkeonprem/resource_gkeonprem_vmware_cluster_generated_meta.yaml +++ b/google/services/gkeonprem/resource_gkeonprem_vmware_cluster_generated_meta.yaml @@ -1,94 +1,94 @@ -resource: 'google_gkeonprem_vmware_cluster' -generation_type: 'mmv1' -source_file: 'products/gkeonprem/VmwareCluster.yaml' -api_service_name: 'gkeonprem.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VmwareCluster' +resource: google_gkeonprem_vmware_cluster +generation_type: mmv1 +source_file: products/gkeonprem/VmwareCluster.yaml +api_service_name: gkeonprem.googleapis.com +api_version: v1 +api_resource_type_kind: VmwareCluster fields: - - api_field: 'adminClusterMembership' - - api_field: 'annotations' - - api_field: 'antiAffinityGroups.aagConfigDisabled' - - api_field: 'authorization.adminUsers.username' - - api_field: 'autoRepairConfig.enabled' - - api_field: 'controlPlaneNode.autoResizeConfig.enabled' - - api_field: 'controlPlaneNode.cpus' - - api_field: 'controlPlaneNode.memory' - - api_field: 'controlPlaneNode.replicas' - - api_field: 'controlPlaneNode.vsphereConfig.datastore' - - api_field: 'controlPlaneNode.vsphereConfig.storagePolicyName' - - api_field: 'createTime' - - api_field: 'dataplaneV2.advancedNetworking' - - api_field: 'dataplaneV2.dataplaneV2Enabled' - - api_field: 'dataplaneV2.windowsDataplaneV2Enabled' - - api_field: 'deleteTime' - - api_field: 'description' - - api_field: 'disableBundledIngress' - - field: 'effective_annotations' - provider_only: true - - api_field: 'enableAdvancedCluster' - - api_field: 'enableControlPlaneV2' - - api_field: 'endpoint' - - api_field: 'etag' - - api_field: 'fleet.membership' - - api_field: 'loadBalancer.f5Config.address' - - api_field: 'loadBalancer.f5Config.partition' - - api_field: 'loadBalancer.f5Config.snatPool' - - api_field: 'loadBalancer.manualLbConfig.controlPlaneNodePort' - - api_field: 'loadBalancer.manualLbConfig.ingressHttpNodePort' - - api_field: 'loadBalancer.manualLbConfig.ingressHttpsNodePort' - - api_field: 'loadBalancer.manualLbConfig.konnectivityServerNodePort' - - api_field: 'loadBalancer.metalLbConfig.addressPools.addresses' - - api_field: 'loadBalancer.metalLbConfig.addressPools.avoidBuggyIps' - - api_field: 'loadBalancer.metalLbConfig.addressPools.manualAssign' - - api_field: 'loadBalancer.metalLbConfig.addressPools.pool' - - api_field: 'loadBalancer.vipConfig.controlPlaneVip' - - api_field: 'loadBalancer.vipConfig.ingressVip' - - api_field: 'localName' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'networkConfig.controlPlaneV2Config.controlPlaneIpBlock.gateway' - - api_field: 'networkConfig.controlPlaneV2Config.controlPlaneIpBlock.ips.hostname' - - api_field: 'networkConfig.controlPlaneV2Config.controlPlaneIpBlock.ips.ip' - - api_field: 'networkConfig.controlPlaneV2Config.controlPlaneIpBlock.netmask' - - api_field: 'networkConfig.dhcpIpConfig.enabled' - - api_field: 'networkConfig.hostConfig.dnsSearchDomains' - - api_field: 'networkConfig.hostConfig.dnsServers' - - api_field: 'networkConfig.hostConfig.ntpServers' - - api_field: 'networkConfig.podAddressCidrBlocks' - - api_field: 'networkConfig.serviceAddressCidrBlocks' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.gateway' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.ips.hostname' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.ips.ip' - - api_field: 'networkConfig.staticIpConfig.ipBlocks.netmask' - - api_field: 'networkConfig.vcenterNetwork' - - api_field: 'onPremVersion' - - api_field: 'reconciling' - - api_field: 'state' - - api_field: 'status.conditions.lastTransitionTime' - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.state' - - api_field: 'status.conditions.type' - - api_field: 'status.errorMessage' - - api_field: 'storage.vsphereCsiDisabled' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'upgradePolicy.controlPlaneOnly' - - api_field: 'validationCheck.options' - - api_field: 'validationCheck.scenario' - - api_field: 'validationCheck.status.result.category' - - api_field: 'validationCheck.status.result.description' - - api_field: 'validationCheck.status.result.details' - - api_field: 'validationCheck.status.result.options' - - api_field: 'validationCheck.status.result.reason' - - api_field: 'vcenter.address' - - api_field: 'vcenter.caCertData' - - api_field: 'vcenter.cluster' - - api_field: 'vcenter.datacenter' - - api_field: 'vcenter.datastore' - - api_field: 'vcenter.folder' - - api_field: 'vcenter.resourcePool' - - api_field: 'vcenter.storagePolicyName' - - api_field: 'vmTrackingEnabled' + - api_field: adminClusterMembership + - api_field: annotations + - api_field: antiAffinityGroups.aagConfigDisabled + - api_field: authorization.adminUsers.username + - api_field: autoRepairConfig.enabled + - api_field: controlPlaneNode.autoResizeConfig.enabled + - api_field: controlPlaneNode.cpus + - api_field: controlPlaneNode.memory + - api_field: controlPlaneNode.replicas + - api_field: controlPlaneNode.vsphereConfig.datastore + - api_field: controlPlaneNode.vsphereConfig.storagePolicyName + - api_field: createTime + - api_field: dataplaneV2.advancedNetworking + - api_field: dataplaneV2.dataplaneV2Enabled + - api_field: dataplaneV2.windowsDataplaneV2Enabled + - api_field: deleteTime + - api_field: description + - api_field: disableBundledIngress + - field: effective_annotations + provider_only: true + - api_field: enableAdvancedCluster + - api_field: enableControlPlaneV2 + - api_field: endpoint + - api_field: etag + - api_field: fleet.membership + - api_field: loadBalancer.f5Config.address + - api_field: loadBalancer.f5Config.partition + - api_field: loadBalancer.f5Config.snatPool + - api_field: loadBalancer.manualLbConfig.controlPlaneNodePort + - api_field: loadBalancer.manualLbConfig.ingressHttpNodePort + - api_field: loadBalancer.manualLbConfig.ingressHttpsNodePort + - api_field: loadBalancer.manualLbConfig.konnectivityServerNodePort + - api_field: loadBalancer.metalLbConfig.addressPools.addresses + - api_field: loadBalancer.metalLbConfig.addressPools.avoidBuggyIps + - api_field: loadBalancer.metalLbConfig.addressPools.manualAssign + - api_field: loadBalancer.metalLbConfig.addressPools.pool + - api_field: loadBalancer.vipConfig.controlPlaneVip + - api_field: loadBalancer.vipConfig.ingressVip + - api_field: localName + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: networkConfig.controlPlaneV2Config.controlPlaneIpBlock.gateway + - api_field: networkConfig.controlPlaneV2Config.controlPlaneIpBlock.ips.hostname + - api_field: networkConfig.controlPlaneV2Config.controlPlaneIpBlock.ips.ip + - api_field: networkConfig.controlPlaneV2Config.controlPlaneIpBlock.netmask + - api_field: networkConfig.dhcpIpConfig.enabled + - api_field: networkConfig.hostConfig.dnsSearchDomains + - api_field: networkConfig.hostConfig.dnsServers + - api_field: networkConfig.hostConfig.ntpServers + - api_field: networkConfig.podAddressCidrBlocks + - api_field: networkConfig.serviceAddressCidrBlocks + - api_field: networkConfig.staticIpConfig.ipBlocks.gateway + - api_field: networkConfig.staticIpConfig.ipBlocks.ips.hostname + - api_field: networkConfig.staticIpConfig.ipBlocks.ips.ip + - api_field: networkConfig.staticIpConfig.ipBlocks.netmask + - api_field: networkConfig.vcenterNetwork + - api_field: onPremVersion + - api_field: reconciling + - api_field: state + - api_field: status.conditions.lastTransitionTime + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.state + - api_field: status.conditions.type + - api_field: status.errorMessage + - api_field: storage.vsphereCsiDisabled + - api_field: uid + - api_field: updateTime + - api_field: upgradePolicy.controlPlaneOnly + - api_field: validationCheck.options + - api_field: validationCheck.scenario + - api_field: validationCheck.status.result.category + - api_field: validationCheck.status.result.description + - api_field: validationCheck.status.result.details + - api_field: validationCheck.status.result.options + - api_field: validationCheck.status.result.reason + - api_field: vcenter.address + - api_field: vcenter.caCertData + - api_field: vcenter.cluster + - api_field: vcenter.datacenter + - api_field: vcenter.datastore + - api_field: vcenter.folder + - api_field: vcenter.resourcePool + - api_field: vcenter.storagePolicyName + - api_field: vmTrackingEnabled diff --git a/google/services/gkeonprem/resource_gkeonprem_vmware_node_pool_generated_meta.yaml b/google/services/gkeonprem/resource_gkeonprem_vmware_node_pool_generated_meta.yaml index ccf4b2e0cda..efbb6285976 100644 --- a/google/services/gkeonprem/resource_gkeonprem_vmware_node_pool_generated_meta.yaml +++ b/google/services/gkeonprem/resource_gkeonprem_vmware_node_pool_generated_meta.yaml @@ -1,48 +1,48 @@ -resource: 'google_gkeonprem_vmware_node_pool' -generation_type: 'mmv1' -source_file: 'products/gkeonprem/VmwareNodePool.yaml' -api_service_name: 'gkeonprem.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VmwareNodePool' +resource: google_gkeonprem_vmware_node_pool +generation_type: mmv1 +source_file: products/gkeonprem/VmwareNodePool.yaml +api_service_name: gkeonprem.googleapis.com +api_version: v1 +api_resource_type_kind: VmwareNodePool fields: - - api_field: 'annotations' - - api_field: 'config.bootDiskSizeGb' - - api_field: 'config.cpus' - - api_field: 'config.enableLoadBalancer' - - api_field: 'config.image' - - api_field: 'config.imageType' - - api_field: 'config.labels' - - api_field: 'config.memoryMb' - - api_field: 'config.replicas' - - api_field: 'config.taints.effect' - - api_field: 'config.taints.key' - - api_field: 'config.taints.value' - - api_field: 'config.vsphereConfig.datastore' - - api_field: 'config.vsphereConfig.hostGroups' - - api_field: 'config.vsphereConfig.tags.category' - - api_field: 'config.vsphereConfig.tags.tag' - - api_field: 'createTime' - - api_field: 'deleteTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'nodePoolAutoscaling.maxReplicas' - - api_field: 'nodePoolAutoscaling.minReplicas' - - api_field: 'onPremVersion' - - api_field: 'reconciling' - - api_field: 'state' - - api_field: 'status.conditions.lastTransitionTime' - - api_field: 'status.conditions.message' - - api_field: 'status.conditions.reason' - - api_field: 'status.conditions.state' - - api_field: 'status.conditions.type' - - api_field: 'status.errorMessage' - - api_field: 'uid' - - api_field: 'updateTime' - - field: 'vmware_cluster' - provider_only: true + - api_field: annotations + - api_field: config.bootDiskSizeGb + - api_field: config.cpus + - api_field: config.enableLoadBalancer + - api_field: config.image + - api_field: config.imageType + - api_field: config.labels + - api_field: config.memoryMb + - api_field: config.replicas + - api_field: config.taints.effect + - api_field: config.taints.key + - api_field: config.taints.value + - api_field: config.vsphereConfig.datastore + - api_field: config.vsphereConfig.hostGroups + - api_field: config.vsphereConfig.tags.category + - api_field: config.vsphereConfig.tags.tag + - api_field: createTime + - api_field: deleteTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - api_field: etag + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: nodePoolAutoscaling.maxReplicas + - api_field: nodePoolAutoscaling.minReplicas + - api_field: onPremVersion + - api_field: reconciling + - api_field: state + - api_field: status.conditions.lastTransitionTime + - api_field: status.conditions.message + - api_field: status.conditions.reason + - api_field: status.conditions.state + - api_field: status.conditions.type + - api_field: status.errorMessage + - api_field: uid + - api_field: updateTime + - field: vmware_cluster + provider_only: true diff --git a/google/services/healthcare/iam_healthcare_consent_store_generated_test.go b/google/services/healthcare/iam_healthcare_consent_store_generated_test.go index 4078e1c0d20..188df200eb0 100644 --- a/google/services/healthcare/iam_healthcare_consent_store_generated_test.go +++ b/google/services/healthcare/iam_healthcare_consent_store_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccHealthcareConsentStoreIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_healthcare_consent_store_iam_binding.foo", - ImportStateId: fmt.Sprintf("%s/consentStores/%s roles/viewer", fmt.Sprintf("projects/%s/locations/%s/datasets/tf-test-my-dataset%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), context["random_suffix"]), fmt.Sprintf("tf-test-my-consent-store%s", context["random_suffix"])), + ImportStateIdFunc: generateHealthcareConsentStoreIAMBindingStateID("google_healthcare_consent_store_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccHealthcareConsentStoreIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_healthcare_consent_store_iam_binding.foo", - ImportStateId: fmt.Sprintf("%s/consentStores/%s roles/viewer", fmt.Sprintf("projects/%s/locations/%s/datasets/tf-test-my-dataset%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), context["random_suffix"]), fmt.Sprintf("tf-test-my-consent-store%s", context["random_suffix"])), + ImportStateIdFunc: generateHealthcareConsentStoreIAMBindingStateID("google_healthcare_consent_store_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccHealthcareConsentStoreIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_healthcare_consent_store_iam_member.foo", - ImportStateId: fmt.Sprintf("%s/consentStores/%s roles/viewer user:admin@hashicorptest.com", fmt.Sprintf("projects/%s/locations/%s/datasets/tf-test-my-dataset%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), context["random_suffix"]), fmt.Sprintf("tf-test-my-consent-store%s", context["random_suffix"])), + ImportStateIdFunc: generateHealthcareConsentStoreIAMMemberStateID("google_healthcare_consent_store_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccHealthcareConsentStoreIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_healthcare_consent_store_iam_policy.foo", - ImportStateId: fmt.Sprintf("%s/consentStores/%s", fmt.Sprintf("projects/%s/locations/%s/datasets/tf-test-my-dataset%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), context["random_suffix"]), fmt.Sprintf("tf-test-my-consent-store%s", context["random_suffix"])), + ImportStateIdFunc: generateHealthcareConsentStoreIAMPolicyStateID("google_healthcare_consent_store_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccHealthcareConsentStoreIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_healthcare_consent_store_iam_policy.foo", - ImportStateId: fmt.Sprintf("%s/consentStores/%s", fmt.Sprintf("projects/%s/locations/%s/datasets/tf-test-my-dataset%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), context["random_suffix"]), fmt.Sprintf("tf-test-my-consent-store%s", context["random_suffix"])), + ImportStateIdFunc: generateHealthcareConsentStoreIAMPolicyStateID("google_healthcare_consent_store_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -254,3 +255,54 @@ resource "google_healthcare_consent_store_iam_binding" "foo" { } `, context) } + +func generateHealthcareConsentStoreIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + dataset := rawState["dataset"] + consent_store_id := tpgresource.GetResourceNameFromSelfLink(rawState["consent_store_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/consentStores/%s", dataset, consent_store_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateHealthcareConsentStoreIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + dataset := rawState["dataset"] + consent_store_id := tpgresource.GetResourceNameFromSelfLink(rawState["consent_store_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/consentStores/%s", dataset, consent_store_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateHealthcareConsentStoreIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + dataset := rawState["dataset"] + consent_store_id := tpgresource.GetResourceNameFromSelfLink(rawState["consent_store_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/consentStores/%s", dataset, consent_store_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/healthcare/resource_healthcare_consent_store_generated_meta.yaml b/google/services/healthcare/resource_healthcare_consent_store_generated_meta.yaml index 241f089b7ef..c4c061b30b1 100644 --- a/google/services/healthcare/resource_healthcare_consent_store_generated_meta.yaml +++ b/google/services/healthcare/resource_healthcare_consent_store_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_healthcare_consent_store' -generation_type: 'mmv1' -source_file: 'products/healthcare/ConsentStore.yaml' -api_service_name: 'healthcare.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ConsentStore' +resource: google_healthcare_consent_store +generation_type: mmv1 +source_file: products/healthcare/ConsentStore.yaml +api_service_name: healthcare.googleapis.com +api_version: v1 +api_resource_type_kind: ConsentStore fields: - - field: 'dataset' - provider_only: true - - api_field: 'defaultConsentTtl' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableConsentCreateOnUpdate' - - api_field: 'labels' - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true + - field: dataset + provider_only: true + - api_field: defaultConsentTtl + - field: effective_labels + provider_only: true + - api_field: enableConsentCreateOnUpdate + - api_field: labels + - field: name + provider_only: true + - field: terraform_labels + provider_only: true diff --git a/google/services/healthcare/resource_healthcare_dataset_generated_meta.yaml b/google/services/healthcare/resource_healthcare_dataset_generated_meta.yaml index d405200d9cf..2800c311e74 100644 --- a/google/services/healthcare/resource_healthcare_dataset_generated_meta.yaml +++ b/google/services/healthcare/resource_healthcare_dataset_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_healthcare_dataset' -generation_type: 'mmv1' -source_file: 'products/healthcare/Dataset.yaml' -api_service_name: 'healthcare.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Dataset' +resource: google_healthcare_dataset +generation_type: mmv1 +source_file: products/healthcare/Dataset.yaml +api_service_name: healthcare.googleapis.com +api_version: v1 +api_resource_type_kind: Dataset fields: - - api_field: 'encryptionSpec.kmsKeyName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'selfLink' - - api_field: 'timeZone' + - api_field: encryptionSpec.kmsKeyName + - field: location + provider_only: true + - api_field: name + - api_field: selfLink + - api_field: timeZone diff --git a/google/services/healthcare/resource_healthcare_dicom_store_generated_meta.yaml b/google/services/healthcare/resource_healthcare_dicom_store_generated_meta.yaml index 60b3fce4a10..054fb47e0ec 100644 --- a/google/services/healthcare/resource_healthcare_dicom_store_generated_meta.yaml +++ b/google/services/healthcare/resource_healthcare_dicom_store_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_healthcare_dicom_store' -generation_type: 'mmv1' -source_file: 'products/healthcare/DicomStore.yaml' -api_service_name: 'healthcare.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DicomStore' +resource: google_healthcare_dicom_store +generation_type: mmv1 +source_file: products/healthcare/DicomStore.yaml +api_service_name: healthcare.googleapis.com +api_version: v1 +api_resource_type_kind: DicomStore fields: - - field: 'dataset' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'notificationConfig.pubsubTopic' - - api_field: 'notificationConfig.sendForBulkImport' - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true + - field: dataset + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: notificationConfig.pubsubTopic + - api_field: notificationConfig.sendForBulkImport + - api_field: selfLink + - field: terraform_labels + provider_only: true diff --git a/google/services/healthcare/resource_healthcare_fhir_store_generated_meta.yaml b/google/services/healthcare/resource_healthcare_fhir_store_generated_meta.yaml index 59dec1512a7..753e72126ca 100644 --- a/google/services/healthcare/resource_healthcare_fhir_store_generated_meta.yaml +++ b/google/services/healthcare/resource_healthcare_fhir_store_generated_meta.yaml @@ -1,38 +1,38 @@ -resource: 'google_healthcare_fhir_store' -generation_type: 'mmv1' -source_file: 'products/healthcare/FhirStore.yaml' -api_service_name: 'healthcare.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FhirStore' +resource: google_healthcare_fhir_store +generation_type: mmv1 +source_file: products/healthcare/FhirStore.yaml +api_service_name: healthcare.googleapis.com +api_version: v1 +api_resource_type_kind: FhirStore fields: - - api_field: 'complexDataTypeReferenceParsing' - - field: 'dataset' - provider_only: true - - api_field: 'defaultSearchHandlingStrict' - - api_field: 'disableReferentialIntegrity' - - api_field: 'disableResourceVersioning' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableHistoryImport' - - api_field: 'enableUpdateCreate' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'notificationConfig.pubsubTopic' - - api_field: 'notificationConfigs.pubsubTopic' - - api_field: 'notificationConfigs.sendFullResource' - - api_field: 'notificationConfigs.sendPreviousResourceOnDelete' - - api_field: 'selfLink' - - api_field: 'streamConfigs.bigqueryDestination.datasetUri' - - api_field: 'streamConfigs.bigqueryDestination.schemaConfig.lastUpdatedPartitionConfig.expirationMs' - - api_field: 'streamConfigs.bigqueryDestination.schemaConfig.lastUpdatedPartitionConfig.type' - - api_field: 'streamConfigs.bigqueryDestination.schemaConfig.recursiveStructureDepth' - - api_field: 'streamConfigs.bigqueryDestination.schemaConfig.schemaType' - - api_field: 'streamConfigs.resourceTypes' - - field: 'terraform_labels' - provider_only: true - - api_field: 'validationConfig.disableFhirpathValidation' - - api_field: 'validationConfig.disableProfileValidation' - - api_field: 'validationConfig.disableReferenceTypeValidation' - - api_field: 'validationConfig.disableRequiredFieldValidation' - - api_field: 'validationConfig.enabledImplementationGuides' - - api_field: 'version' + - api_field: complexDataTypeReferenceParsing + - field: dataset + provider_only: true + - api_field: defaultSearchHandlingStrict + - api_field: disableReferentialIntegrity + - api_field: disableResourceVersioning + - field: effective_labels + provider_only: true + - api_field: enableHistoryImport + - api_field: enableUpdateCreate + - api_field: labels + - api_field: name + - api_field: notificationConfig.pubsubTopic + - api_field: notificationConfigs.pubsubTopic + - api_field: notificationConfigs.sendFullResource + - api_field: notificationConfigs.sendPreviousResourceOnDelete + - api_field: selfLink + - api_field: streamConfigs.bigqueryDestination.datasetUri + - api_field: streamConfigs.bigqueryDestination.schemaConfig.lastUpdatedPartitionConfig.expirationMs + - api_field: streamConfigs.bigqueryDestination.schemaConfig.lastUpdatedPartitionConfig.type + - api_field: streamConfigs.bigqueryDestination.schemaConfig.recursiveStructureDepth + - api_field: streamConfigs.bigqueryDestination.schemaConfig.schemaType + - api_field: streamConfigs.resourceTypes + - field: terraform_labels + provider_only: true + - api_field: validationConfig.disableFhirpathValidation + - api_field: validationConfig.disableProfileValidation + - api_field: validationConfig.disableReferenceTypeValidation + - api_field: validationConfig.disableRequiredFieldValidation + - api_field: validationConfig.enabledImplementationGuides + - api_field: version diff --git a/google/services/healthcare/resource_healthcare_hl7_v2_store_generated_meta.yaml b/google/services/healthcare/resource_healthcare_hl7_v2_store_generated_meta.yaml index 7534cf10f03..e8713b882d6 100644 --- a/google/services/healthcare/resource_healthcare_hl7_v2_store_generated_meta.yaml +++ b/google/services/healthcare/resource_healthcare_hl7_v2_store_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_healthcare_hl7_v2_store' -generation_type: 'mmv1' -source_file: 'products/healthcare/Hl7V2Store.yaml' -api_service_name: 'healthcare.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Hl7V2Store' +resource: google_healthcare_hl7_v2_store +generation_type: mmv1 +source_file: products/healthcare/Hl7V2Store.yaml +api_service_name: healthcare.googleapis.com +api_version: v1 +api_resource_type_kind: Hl7V2Store fields: - - field: 'dataset' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'notificationConfig.pubsubTopic' - - api_field: 'notificationConfigs.filter' - - api_field: 'notificationConfigs.pubsubTopic' - - api_field: 'parserConfig.allowNullHeader' - - api_field: 'parserConfig.schema' - json: true - - api_field: 'parserConfig.segmentTerminator' - - api_field: 'parserConfig.version' - - api_field: 'rejectDuplicateMessage' - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true + - field: dataset + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: notificationConfig.pubsubTopic + - api_field: notificationConfigs.filter + - api_field: notificationConfigs.pubsubTopic + - api_field: parserConfig.allowNullHeader + - api_field: parserConfig.schema + json: true + - api_field: parserConfig.segmentTerminator + - api_field: parserConfig.version + - api_field: rejectDuplicateMessage + - api_field: selfLink + - field: terraform_labels + provider_only: true diff --git a/google/services/healthcare/resource_healthcare_pipeline_job_generated_meta.yaml b/google/services/healthcare/resource_healthcare_pipeline_job_generated_meta.yaml index d1fb4363f22..e763e851314 100644 --- a/google/services/healthcare/resource_healthcare_pipeline_job_generated_meta.yaml +++ b/google/services/healthcare/resource_healthcare_pipeline_job_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_healthcare_pipeline_job' -generation_type: 'mmv1' -source_file: 'products/healthcare/PipelineJob.yaml' -api_service_name: 'healthcare.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PipelineJob' +resource: google_healthcare_pipeline_job +generation_type: mmv1 +source_file: products/healthcare/PipelineJob.yaml +api_service_name: healthcare.googleapis.com +api_version: v1 +api_resource_type_kind: PipelineJob fields: - - api_field: 'backfillPipelineJob.mappingPipelineJob' - - field: 'dataset' - provider_only: true - - api_field: 'disableLineage' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mappingPipelineJob.fhirStoreDestination' - - api_field: 'mappingPipelineJob.fhirStreamingSource.description' - - api_field: 'mappingPipelineJob.fhirStreamingSource.fhirStore' - - api_field: 'mappingPipelineJob.mappingConfig.description' - - api_field: 'mappingPipelineJob.mappingConfig.whistleConfigSource.importUriPrefix' - - api_field: 'mappingPipelineJob.mappingConfig.whistleConfigSource.uri' - - api_field: 'mappingPipelineJob.reconciliationDestination' - - api_field: 'name' - - api_field: 'reconciliationPipelineJob.fhirStoreDestination' - - api_field: 'reconciliationPipelineJob.matchingUriPrefix' - - api_field: 'reconciliationPipelineJob.mergeConfig.description' - - api_field: 'reconciliationPipelineJob.mergeConfig.whistleConfigSource.importUriPrefix' - - api_field: 'reconciliationPipelineJob.mergeConfig.whistleConfigSource.uri' - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true + - api_field: backfillPipelineJob.mappingPipelineJob + - field: dataset + provider_only: true + - api_field: disableLineage + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: mappingPipelineJob.fhirStoreDestination + - api_field: mappingPipelineJob.fhirStreamingSource.description + - api_field: mappingPipelineJob.fhirStreamingSource.fhirStore + - api_field: mappingPipelineJob.mappingConfig.description + - api_field: mappingPipelineJob.mappingConfig.whistleConfigSource.importUriPrefix + - api_field: mappingPipelineJob.mappingConfig.whistleConfigSource.uri + - api_field: mappingPipelineJob.reconciliationDestination + - api_field: name + - api_field: reconciliationPipelineJob.fhirStoreDestination + - api_field: reconciliationPipelineJob.matchingUriPrefix + - api_field: reconciliationPipelineJob.mergeConfig.description + - api_field: reconciliationPipelineJob.mergeConfig.whistleConfigSource.importUriPrefix + - api_field: reconciliationPipelineJob.mergeConfig.whistleConfigSource.uri + - api_field: selfLink + - field: terraform_labels + provider_only: true diff --git a/google/services/healthcare/resource_healthcare_pipeline_job_generated_test.go b/google/services/healthcare/resource_healthcare_pipeline_job_generated_test.go index 7457b5b23ee..1f57d49d222 100644 --- a/google/services/healthcare/resource_healthcare_pipeline_job_generated_test.go +++ b/google/services/healthcare/resource_healthcare_pipeline_job_generated_test.go @@ -138,6 +138,7 @@ resource "google_storage_bucket_iam_member" "hsa" { } func TestAccHealthcarePipelineJob_healthcarePipelineJobBackfillExample(t *testing.T) { + acctest.SkipIfVcr(t) t.Parallel() context := map[string]interface{}{ diff --git a/google/services/healthcare/resource_healthcare_workspace_generated_meta.yaml b/google/services/healthcare/resource_healthcare_workspace_generated_meta.yaml index 815cdb56aec..e567309610e 100644 --- a/google/services/healthcare/resource_healthcare_workspace_generated_meta.yaml +++ b/google/services/healthcare/resource_healthcare_workspace_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_healthcare_workspace' -generation_type: 'mmv1' -source_file: 'products/healthcare/Workspace.yaml' -api_service_name: 'healthcare.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DataMapperWorkspace' +resource: google_healthcare_workspace +generation_type: mmv1 +source_file: products/healthcare/Workspace.yaml +api_service_name: healthcare.googleapis.com +api_version: v1 +api_resource_type_kind: DataMapperWorkspace fields: - - field: 'dataset' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'settings.dataProjectIds' - - field: 'terraform_labels' - provider_only: true + - field: dataset + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: settings.dataProjectIds + - field: terraform_labels + provider_only: true diff --git a/google/services/iam2/resource_iam_access_boundary_policy_generated_meta.yaml b/google/services/iam2/resource_iam_access_boundary_policy_generated_meta.yaml index 74c9c33290a..3ef70b119b7 100644 --- a/google/services/iam2/resource_iam_access_boundary_policy_generated_meta.yaml +++ b/google/services/iam2/resource_iam_access_boundary_policy_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_iam_access_boundary_policy' -generation_type: 'mmv1' -source_file: 'products/iam2/AccessBoundaryPolicy.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Policy' +resource: google_iam_access_boundary_policy +generation_type: mmv1 +source_file: products/iam2/AccessBoundaryPolicy.yaml +api_service_name: iam.googleapis.com +api_version: v2 +api_resource_type_kind: Policy fields: - - api_field: 'displayName' - - api_field: 'etag' - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'rules.accessBoundaryRule.availabilityCondition.description' - - api_field: 'rules.accessBoundaryRule.availabilityCondition.expression' - - api_field: 'rules.accessBoundaryRule.availabilityCondition.location' - - api_field: 'rules.accessBoundaryRule.availabilityCondition.title' - - api_field: 'rules.accessBoundaryRule.availablePermissions' - - api_field: 'rules.accessBoundaryRule.availableResource' - - api_field: 'rules.description' + - api_field: displayName + - api_field: etag + - field: name + provider_only: true + - field: parent + provider_only: true + - api_field: rules.accessBoundaryRule.availabilityCondition.description + - api_field: rules.accessBoundaryRule.availabilityCondition.expression + - api_field: rules.accessBoundaryRule.availabilityCondition.location + - api_field: rules.accessBoundaryRule.availabilityCondition.title + - api_field: rules.accessBoundaryRule.availablePermissions + - api_field: rules.accessBoundaryRule.availableResource + - api_field: rules.description diff --git a/google/services/iam2/resource_iam_deny_policy_generated_meta.yaml b/google/services/iam2/resource_iam_deny_policy_generated_meta.yaml index 79a93574337..88f8f82a5c9 100644 --- a/google/services/iam2/resource_iam_deny_policy_generated_meta.yaml +++ b/google/services/iam2/resource_iam_deny_policy_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_iam_deny_policy' -generation_type: 'mmv1' -source_file: 'products/iam2/DenyPolicy.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Policy' -cai_asset_name_format: '//iam.googleapis.com/{{parent}}/denypolicies/{{name}}' +resource: google_iam_deny_policy +generation_type: mmv1 +source_file: products/iam2/DenyPolicy.yaml +api_service_name: iam.googleapis.com +api_version: v2 +api_resource_type_kind: Policy +cai_asset_name_format: //iam.googleapis.com/{{parent}}/denypolicies/{{name}} fields: - - api_field: 'displayName' - - api_field: 'etag' - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'rules.denyRule.denialCondition.description' - - api_field: 'rules.denyRule.denialCondition.expression' - - api_field: 'rules.denyRule.denialCondition.location' - - api_field: 'rules.denyRule.denialCondition.title' - - api_field: 'rules.denyRule.deniedPermissions' - - api_field: 'rules.denyRule.deniedPrincipals' - - api_field: 'rules.denyRule.exceptionPermissions' - - api_field: 'rules.denyRule.exceptionPrincipals' - - api_field: 'rules.description' + - api_field: displayName + - api_field: etag + - field: name + provider_only: true + - field: parent + provider_only: true + - api_field: rules.denyRule.denialCondition.description + - api_field: rules.denyRule.denialCondition.expression + - api_field: rules.denyRule.denialCondition.location + - api_field: rules.denyRule.denialCondition.title + - api_field: rules.denyRule.deniedPermissions + - api_field: rules.denyRule.deniedPrincipals + - api_field: rules.denyRule.exceptionPermissions + - api_field: rules.denyRule.exceptionPrincipals + - api_field: rules.description diff --git a/google/services/iam3/resource_iam_folders_policy_binding_generated_meta.yaml b/google/services/iam3/resource_iam_folders_policy_binding_generated_meta.yaml index 148ad773241..caec850cc30 100644 --- a/google/services/iam3/resource_iam_folders_policy_binding_generated_meta.yaml +++ b/google/services/iam3/resource_iam_folders_policy_binding_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_iam_folders_policy_binding' -generation_type: 'mmv1' -source_file: 'products/iam3/FoldersPolicyBinding.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'PolicyBinding' +resource: google_iam_folders_policy_binding +generation_type: mmv1 +source_file: products/iam3/FoldersPolicyBinding.yaml +api_service_name: iam.googleapis.com +api_version: v3 +api_resource_type_kind: PolicyBinding api_variant_patterns: - - 'folders/{folder}/locations/{location}/policyBindings/{policyBinding}' + - folders/{folder}/locations/{location}/policyBindings/{policyBinding} fields: - - api_field: 'annotations' - - api_field: 'condition.description' - - api_field: 'condition.expression' - - api_field: 'condition.location' - - api_field: 'condition.title' - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - field: 'folder' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'policy' - - field: 'policy_binding_id' - provider_only: true - - api_field: 'policyKind' - - api_field: 'policyUid' - - api_field: 'target.principalSet' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: condition.description + - api_field: condition.expression + - api_field: condition.location + - api_field: condition.title + - api_field: createTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - api_field: etag + - field: folder + provider_only: true + - field: location + provider_only: true + - api_field: name + - api_field: policy + - field: policy_binding_id + provider_only: true + - api_field: policyKind + - api_field: policyUid + - api_field: target.principalSet + - api_field: uid + - api_field: updateTime diff --git a/google/services/iam3/resource_iam_organizations_policy_binding_generated_meta.yaml b/google/services/iam3/resource_iam_organizations_policy_binding_generated_meta.yaml index b099a498656..b5f3114fc62 100644 --- a/google/services/iam3/resource_iam_organizations_policy_binding_generated_meta.yaml +++ b/google/services/iam3/resource_iam_organizations_policy_binding_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_iam_organizations_policy_binding' -generation_type: 'mmv1' -source_file: 'products/iam3/OrganizationsPolicyBinding.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'PolicyBinding' +resource: google_iam_organizations_policy_binding +generation_type: mmv1 +source_file: products/iam3/OrganizationsPolicyBinding.yaml +api_service_name: iam.googleapis.com +api_version: v3 +api_resource_type_kind: PolicyBinding api_variant_patterns: - - 'organizations/{organization}/locations/{location}/policyBindings/{policyBinding}' + - organizations/{organization}/locations/{location}/policyBindings/{policyBinding} fields: - - api_field: 'annotations' - - api_field: 'condition.description' - - api_field: 'condition.expression' - - api_field: 'condition.location' - - api_field: 'condition.title' - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'policy' - - field: 'policy_binding_id' - provider_only: true - - api_field: 'policyKind' - - api_field: 'policyUid' - - api_field: 'target.principalSet' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: condition.description + - api_field: condition.expression + - api_field: condition.location + - api_field: condition.title + - api_field: createTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: name + - field: organization + provider_only: true + - api_field: policy + - field: policy_binding_id + provider_only: true + - api_field: policyKind + - api_field: policyUid + - api_field: target.principalSet + - api_field: uid + - api_field: updateTime diff --git a/google/services/iam3/resource_iam_principal_access_boundary_policy_generated_meta.yaml b/google/services/iam3/resource_iam_principal_access_boundary_policy_generated_meta.yaml index 4525d85085f..c52a4c025a1 100644 --- a/google/services/iam3/resource_iam_principal_access_boundary_policy_generated_meta.yaml +++ b/google/services/iam3/resource_iam_principal_access_boundary_policy_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_iam_principal_access_boundary_policy' -generation_type: 'mmv1' -source_file: 'products/iam3/PrincipalAccessBoundaryPolicy.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'PrincipalAccessBoundaryPolicy' +resource: google_iam_principal_access_boundary_policy +generation_type: mmv1 +source_file: products/iam3/PrincipalAccessBoundaryPolicy.yaml +api_service_name: iam.googleapis.com +api_version: v3 +api_resource_type_kind: PrincipalAccessBoundaryPolicy fields: - - api_field: 'annotations' - - api_field: 'createTime' - - api_field: 'details.enforcementVersion' - - api_field: 'details.rules.description' - - api_field: 'details.rules.effect' - - api_field: 'details.rules.resources' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'organization' - provider_only: true - - field: 'principal_access_boundary_policy_id' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: createTime + - api_field: details.enforcementVersion + - api_field: details.rules.description + - api_field: details.rules.effect + - api_field: details.rules.resources + - api_field: displayName + - field: effective_annotations + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: name + - field: organization + provider_only: true + - field: principal_access_boundary_policy_id + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/iam3/resource_iam_projects_policy_binding_generated_meta.yaml b/google/services/iam3/resource_iam_projects_policy_binding_generated_meta.yaml index 3b733fc094f..a7ffd85712e 100644 --- a/google/services/iam3/resource_iam_projects_policy_binding_generated_meta.yaml +++ b/google/services/iam3/resource_iam_projects_policy_binding_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_iam_projects_policy_binding' -generation_type: 'mmv1' -source_file: 'products/iam3/ProjectsPolicyBinding.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'PolicyBinding' +resource: google_iam_projects_policy_binding +generation_type: mmv1 +source_file: products/iam3/ProjectsPolicyBinding.yaml +api_service_name: iam.googleapis.com +api_version: v3 +api_resource_type_kind: PolicyBinding api_variant_patterns: - - 'projects/{project}/locations/{location}/policyBindings/{policyBinding}' + - projects/{project}/locations/{location}/policyBindings/{policyBinding} fields: - - api_field: 'annotations' - - api_field: 'condition.description' - - api_field: 'condition.expression' - - api_field: 'condition.location' - - api_field: 'condition.title' - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'effective_annotations' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'policy' - - field: 'policy_binding_id' - provider_only: true - - api_field: 'policyKind' - - api_field: 'policyUid' - - api_field: 'target.principalSet' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: annotations + - api_field: condition.description + - api_field: condition.expression + - api_field: condition.location + - api_field: condition.title + - api_field: createTime + - api_field: displayName + - field: effective_annotations + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: name + - api_field: policy + - field: policy_binding_id + provider_only: true + - api_field: policyKind + - api_field: policyUid + - api_field: target.principalSet + - api_field: uid + - api_field: updateTime diff --git a/google/services/iambeta/resource_iam_workload_identity_pool_generated_meta.yaml b/google/services/iambeta/resource_iam_workload_identity_pool_generated_meta.yaml index a023a0a7f1b..b9d8dde7dbe 100644 --- a/google/services/iambeta/resource_iam_workload_identity_pool_generated_meta.yaml +++ b/google/services/iambeta/resource_iam_workload_identity_pool_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_iam_workload_identity_pool' -generation_type: 'mmv1' -source_file: 'products/iambeta/WorkloadIdentityPool.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WorkloadIdentityPool' +resource: google_iam_workload_identity_pool +generation_type: mmv1 +source_file: products/iambeta/WorkloadIdentityPool.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: WorkloadIdentityPool fields: - - api_field: 'description' - - api_field: 'disabled' - - api_field: 'displayName' - - api_field: 'name' - - api_field: 'state' - - field: 'workload_identity_pool_id' - provider_only: true + - api_field: description + - api_field: disabled + - api_field: displayName + - api_field: name + - api_field: state + - field: workload_identity_pool_id + provider_only: true diff --git a/google/services/iambeta/resource_iam_workload_identity_pool_provider_generated_meta.yaml b/google/services/iambeta/resource_iam_workload_identity_pool_provider_generated_meta.yaml index 2a4abeb9a2a..76cc4e8685c 100644 --- a/google/services/iambeta/resource_iam_workload_identity_pool_provider_generated_meta.yaml +++ b/google/services/iambeta/resource_iam_workload_identity_pool_provider_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_iam_workload_identity_pool_provider' -generation_type: 'mmv1' -source_file: 'products/iambeta/WorkloadIdentityPoolProvider.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WorkloadIdentityPoolProvider' +resource: google_iam_workload_identity_pool_provider +generation_type: mmv1 +source_file: products/iambeta/WorkloadIdentityPoolProvider.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: WorkloadIdentityPoolProvider fields: - - api_field: 'attributeCondition' - - api_field: 'attributeMapping' - - api_field: 'aws.accountId' - - api_field: 'description' - - api_field: 'disabled' - - api_field: 'displayName' - - api_field: 'name' - - api_field: 'oidc.allowedAudiences' - - api_field: 'oidc.issuerUri' - - api_field: 'oidc.jwksJson' - - api_field: 'saml.idpMetadataXml' - - api_field: 'state' - - field: 'workload_identity_pool_id' - provider_only: true - - field: 'workload_identity_pool_provider_id' - provider_only: true - - api_field: 'x509.trustStore.intermediateCas.pemCertificate' - - api_field: 'x509.trustStore.trustAnchors.pemCertificate' + - api_field: attributeCondition + - api_field: attributeMapping + - api_field: aws.accountId + - api_field: description + - api_field: disabled + - api_field: displayName + - api_field: name + - api_field: oidc.allowedAudiences + - api_field: oidc.issuerUri + - api_field: oidc.jwksJson + - api_field: saml.idpMetadataXml + - api_field: state + - field: workload_identity_pool_id + provider_only: true + - field: workload_identity_pool_provider_id + provider_only: true + - api_field: x509.trustStore.intermediateCas.pemCertificate + - api_field: x509.trustStore.trustAnchors.pemCertificate diff --git a/google/services/iamworkforcepool/iam_iam_workforce_pool_generated_test.go b/google/services/iamworkforcepool/iam_iam_workforce_pool_generated_test.go index f06d4c01272..c2f423f6e1a 100644 --- a/google/services/iamworkforcepool/iam_iam_workforce_pool_generated_test.go +++ b/google/services/iamworkforcepool/iam_iam_workforce_pool_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -57,7 +58,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iam_workforce_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("locations/%s/workforcePools/%s roles/iam.workforcePoolViewer", "global", fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateIAMWorkforcePoolWorkforcePoolIAMBindingStateID("google_iam_workforce_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -67,7 +68,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iam_workforce_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("locations/%s/workforcePools/%s roles/iam.workforcePoolViewer", "global", fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateIAMWorkforcePoolWorkforcePoolIAMBindingStateID("google_iam_workforce_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -95,7 +96,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iam_workforce_pool_iam_member.foo", - ImportStateId: fmt.Sprintf("locations/%s/workforcePools/%s roles/iam.workforcePoolViewer user:admin@hashicorptest.com", "global", fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateIAMWorkforcePoolWorkforcePoolIAMMemberStateID("google_iam_workforce_pool_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iam_workforce_pool_iam_policy.foo", - ImportStateId: fmt.Sprintf("locations/%s/workforcePools/%s", "global", fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateIAMWorkforcePoolWorkforcePoolIAMPolicyStateID("google_iam_workforce_pool_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -135,7 +136,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iam_workforce_pool_iam_policy.foo", - ImportStateId: fmt.Sprintf("locations/%s/workforcePools/%s", "global", fmt.Sprintf("tf-test-example-pool%s", context["random_suffix"])), + ImportStateIdFunc: generateIAMWorkforcePoolWorkforcePoolIAMPolicyStateID("google_iam_workforce_pool_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -247,3 +248,54 @@ resource "google_iam_workforce_pool_iam_binding" "foo" { } `, context) } + +func generateIAMWorkforcePoolWorkforcePoolIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + workforce_pool_id := tpgresource.GetResourceNameFromSelfLink(rawState["workforce_pool_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("locations/%s/workforcePools/%s", location, workforce_pool_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIAMWorkforcePoolWorkforcePoolIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + workforce_pool_id := tpgresource.GetResourceNameFromSelfLink(rawState["workforce_pool_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("locations/%s/workforcePools/%s", location, workforce_pool_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIAMWorkforcePoolWorkforcePoolIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + workforce_pool_id := tpgresource.GetResourceNameFromSelfLink(rawState["workforce_pool_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("locations/%s/workforcePools/%s", location, workforce_pool_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iamworkforcepool/resource_iam_oauth_client_credential_generated_meta.yaml b/google/services/iamworkforcepool/resource_iam_oauth_client_credential_generated_meta.yaml index 30a6050ddad..51bd4bd266b 100644 --- a/google/services/iamworkforcepool/resource_iam_oauth_client_credential_generated_meta.yaml +++ b/google/services/iamworkforcepool/resource_iam_oauth_client_credential_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_iam_oauth_client_credential' -generation_type: 'mmv1' -source_file: 'products/iamworkforcepool/OauthClientCredential.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'OauthClientCredential' +resource: google_iam_oauth_client_credential +generation_type: mmv1 +source_file: products/iamworkforcepool/OauthClientCredential.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: OauthClientCredential fields: - - api_field: 'clientSecret' - - api_field: 'disabled' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'oauth_client_credential_id' - provider_only: true - - field: 'oauthclient' - provider_only: true + - api_field: clientSecret + - api_field: disabled + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - field: oauth_client_credential_id + provider_only: true + - field: oauthclient + provider_only: true diff --git a/google/services/iamworkforcepool/resource_iam_oauth_client_generated_meta.yaml b/google/services/iamworkforcepool/resource_iam_oauth_client_generated_meta.yaml index 700be6928ce..6f45225240c 100644 --- a/google/services/iamworkforcepool/resource_iam_oauth_client_generated_meta.yaml +++ b/google/services/iamworkforcepool/resource_iam_oauth_client_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_iam_oauth_client' -generation_type: 'mmv1' -source_file: 'products/iamworkforcepool/OauthClient.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'OauthClient' +resource: google_iam_oauth_client +generation_type: mmv1 +source_file: products/iamworkforcepool/OauthClient.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: OauthClient fields: - - api_field: 'allowedGrantTypes' - - api_field: 'allowedRedirectUris' - - api_field: 'allowedScopes' - - api_field: 'clientId' - - api_field: 'clientType' - - api_field: 'description' - - api_field: 'disabled' - - api_field: 'displayName' - - api_field: 'expireTime' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'oauth_client_id' - provider_only: true - - api_field: 'state' + - api_field: allowedGrantTypes + - api_field: allowedRedirectUris + - api_field: allowedScopes + - api_field: clientId + - api_field: clientType + - api_field: description + - api_field: disabled + - api_field: displayName + - api_field: expireTime + - field: location + provider_only: true + - api_field: name + - field: oauth_client_id + provider_only: true + - api_field: state diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_generated_meta.yaml b/google/services/iamworkforcepool/resource_iam_workforce_pool_generated_meta.yaml index a99485246c3..807c47fafd2 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_generated_meta.yaml +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_iam_workforce_pool' -generation_type: 'mmv1' -source_file: 'products/iamworkforcepool/WorkforcePool.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WorkforcePool' +resource: google_iam_workforce_pool +generation_type: mmv1 +source_file: products/iamworkforcepool/WorkforcePool.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: WorkforcePool fields: - - api_field: 'accessRestrictions.allowedServices.domain' - - api_field: 'accessRestrictions.disableProgrammaticSignin' - - api_field: 'description' - - api_field: 'disabled' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'parent' - - api_field: 'sessionDuration' - - api_field: 'state' - - field: 'workforce_pool_id' - provider_only: true + - api_field: accessRestrictions.allowedServices.domain + - api_field: accessRestrictions.disableProgrammaticSignin + - api_field: description + - api_field: disabled + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - api_field: parent + - api_field: sessionDuration + - api_field: state + - field: workforce_pool_id + provider_only: true diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_generated_meta.yaml b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_generated_meta.yaml index c069cd413fa..e4cd8f139e7 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_generated_meta.yaml +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_generated_meta.yaml @@ -1,42 +1,42 @@ -resource: 'google_iam_workforce_pool_provider' -generation_type: 'mmv1' -source_file: 'products/iamworkforcepool/WorkforcePoolProvider.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WorkforcePoolProvider' +resource: google_iam_workforce_pool_provider +generation_type: mmv1 +source_file: products/iamworkforcepool/WorkforcePoolProvider.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: WorkforcePoolProvider fields: - - api_field: 'attributeCondition' - - api_field: 'attributeMapping' - - api_field: 'description' - - api_field: 'disabled' - - api_field: 'displayName' - - api_field: 'extendedAttributesOauth2Client.attributesType' - - api_field: 'extendedAttributesOauth2Client.clientId' - - api_field: 'extendedAttributesOauth2Client.clientSecret.value.plainText' - - api_field: 'extendedAttributesOauth2Client.clientSecret.value.thumbprint' - - api_field: 'extendedAttributesOauth2Client.issuerUri' - - api_field: 'extendedAttributesOauth2Client.queryParameters.filter' - - api_field: 'extraAttributesOauth2Client.attributesType' - - api_field: 'extraAttributesOauth2Client.clientId' - - api_field: 'extraAttributesOauth2Client.clientSecret.value.plainText' - - api_field: 'extraAttributesOauth2Client.clientSecret.value.thumbprint' - - api_field: 'extraAttributesOauth2Client.issuerUri' - - api_field: 'extraAttributesOauth2Client.queryParameters.filter' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'oidc.clientId' - - api_field: 'oidc.clientSecret.value.plainText' - - api_field: 'oidc.clientSecret.value.thumbprint' - - api_field: 'oidc.issuerUri' - - api_field: 'oidc.jwksJson' - - api_field: 'oidc.webSsoConfig.additionalScopes' - - api_field: 'oidc.webSsoConfig.assertionClaimsBehavior' - - api_field: 'oidc.webSsoConfig.responseType' - - field: 'provider_id' - provider_only: true - - api_field: 'saml.idpMetadataXml' - - api_field: 'scimUsage' - - api_field: 'state' - - field: 'workforce_pool_id' - provider_only: true + - api_field: attributeCondition + - api_field: attributeMapping + - api_field: description + - api_field: disabled + - api_field: displayName + - api_field: extendedAttributesOauth2Client.attributesType + - api_field: extendedAttributesOauth2Client.clientId + - api_field: extendedAttributesOauth2Client.clientSecret.value.plainText + - api_field: extendedAttributesOauth2Client.clientSecret.value.thumbprint + - api_field: extendedAttributesOauth2Client.issuerUri + - api_field: extendedAttributesOauth2Client.queryParameters.filter + - api_field: extraAttributesOauth2Client.attributesType + - api_field: extraAttributesOauth2Client.clientId + - api_field: extraAttributesOauth2Client.clientSecret.value.plainText + - api_field: extraAttributesOauth2Client.clientSecret.value.thumbprint + - api_field: extraAttributesOauth2Client.issuerUri + - api_field: extraAttributesOauth2Client.queryParameters.filter + - field: location + provider_only: true + - api_field: name + - api_field: oidc.clientId + - api_field: oidc.clientSecret.value.plainText + - api_field: oidc.clientSecret.value.thumbprint + - api_field: oidc.issuerUri + - api_field: oidc.jwksJson + - api_field: oidc.webSsoConfig.additionalScopes + - api_field: oidc.webSsoConfig.assertionClaimsBehavior + - api_field: oidc.webSsoConfig.responseType + - field: provider_id + provider_only: true + - api_field: saml.idpMetadataXml + - api_field: scimUsage + - api_field: state + - field: workforce_pool_id + provider_only: true diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_key_generated_meta.yaml b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_key_generated_meta.yaml index bca899aa074..0b4258c8cf9 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_key_generated_meta.yaml +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_key_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_iam_workforce_pool_provider_key' -generation_type: 'mmv1' -source_file: 'products/iamworkforcepool/WorkforcePoolProviderKey.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WorkforcePoolProviderKey' +resource: google_iam_workforce_pool_provider_key +generation_type: mmv1 +source_file: products/iamworkforcepool/WorkforcePoolProviderKey.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: WorkforcePoolProviderKey fields: - - api_field: 'expireTime' - - api_field: 'keyData.format' - - api_field: 'keyData.key' - - api_field: 'keyData.keySpec' - - api_field: 'keyData.notAfterTime' - - api_field: 'keyData.notBeforeTime' - - field: 'key_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'provider_id' - provider_only: true - - api_field: 'state' - - api_field: 'use' - - field: 'workforce_pool_id' - provider_only: true + - api_field: expireTime + - api_field: keyData.format + - api_field: keyData.key + - api_field: keyData.keySpec + - api_field: keyData.notAfterTime + - api_field: keyData.notBeforeTime + - field: key_id + provider_only: true + - field: location + provider_only: true + - api_field: name + - field: provider_id + provider_only: true + - api_field: state + - api_field: use + - field: workforce_pool_id + provider_only: true diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant.go b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant.go index ad52b21f0b4..c3d2f26576b 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant.go +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant.go @@ -167,6 +167,12 @@ func ResourceIAMWorkforcePoolWorkforcePoolProviderScimTenant() *schema.Resource Optional: true, Description: `A user-specified display name for the scim tenant. Cannot exceed 32 characters.`, }, + "hard_delete": { + Type: schema.TypeBool, + Optional: true, + Description: `Deletes the SCIM tenant immediately. This operation cannot be undone.`, + Default: false, + }, "base_uri": { Type: schema.TypeString, Computed: true, @@ -530,7 +536,7 @@ func resourceIAMWorkforcePoolWorkforcePoolProviderScimTenantDelete(d *schema.Res billingProject := "" - url, err := tpgresource.ReplaceVars(d, config, "{{IAMWorkforcePoolBasePath}}locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/scimTenants/{{scim_tenant_id}}") + url, err := tpgresource.ReplaceVars(d, config, "{{IAMWorkforcePoolBasePath}}locations/{{location}}/workforcePools/{{workforce_pool_id}}/providers/{{provider_id}}/scimTenants/{{scim_tenant_id}}?hardDelete={{hard_delete}}") if err != nil { return err } diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_meta.yaml b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_meta.yaml index 4d02302ea58..708babcdf02 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_meta.yaml +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_meta.yaml @@ -1,23 +1,25 @@ -resource: 'google_iam_workforce_pool_provider_scim_tenant' -generation_type: 'mmv1' -source_file: 'products/iamworkforcepool/WorkforcePoolProviderScimTenant.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WorkforcePoolProviderScimTenant' +resource: google_iam_workforce_pool_provider_scim_tenant +generation_type: mmv1 +source_file: products/iamworkforcepool/WorkforcePoolProviderScimTenant.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: WorkforcePoolProviderScimTenant fields: - - api_field: 'baseUri' - - api_field: 'claimMapping' - - api_field: 'description' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'provider_id' - provider_only: true - - api_field: 'purgeTime' - - field: 'scim_tenant_id' - provider_only: true - - api_field: 'serviceAgent' - - api_field: 'state' - - field: 'workforce_pool_id' - provider_only: true + - api_field: baseUri + - api_field: claimMapping + - api_field: description + - api_field: displayName + - field: hard_delete + provider_only: true + - field: location + provider_only: true + - api_field: name + - field: provider_id + provider_only: true + - api_field: purgeTime + - field: scim_tenant_id + provider_only: true + - api_field: serviceAgent + - api_field: state + - field: workforce_pool_id + provider_only: true diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_test.go b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_test.go index d9b47173431..c50dd7f2731 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_test.go +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_generated_test.go @@ -70,7 +70,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolProviderScimTenant_iamWorkforcePoolProv ResourceName: "google_iam_workforce_pool_provider_scim_tenant.example", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"location", "provider_id", "scim_tenant_id", "workforce_pool_id"}, + ImportStateVerifyIgnore: []string{"hard_delete", "location", "provider_id", "scim_tenant_id", "workforce_pool_id"}, }, { ResourceName: "google_iam_workforce_pool_provider_scim_tenant.example", @@ -128,6 +128,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "example" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = true # state, base_uri, purge_time and service_agent are output only, not settable } diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_test.go b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_test.go index 6baeba3ee68..7c139acf536 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_test.go +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_tenant_test.go @@ -32,6 +32,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolProviderScimTenant_update(t *testing.T) context := map[string]interface{}{ "org_id": envvar.GetTestOrgFromEnv(t), "random_suffix": acctest.RandString(t, 10), + "hard_delete": true, } acctest.VcrTest(t, resource.TestCase{ @@ -46,7 +47,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolProviderScimTenant_update(t *testing.T) ResourceName: "google_iam_workforce_pool_provider_scim_tenant.scim_tenant", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"state"}, + ImportStateVerifyIgnore: []string{"state", "hard_delete"}, }, { Config: testAccIAMWorkforcePoolWorkforcePoolProviderScimTenant_update(context), @@ -60,7 +61,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolProviderScimTenant_update(t *testing.T) ResourceName: "google_iam_workforce_pool_provider_scim_tenant.scim_tenant", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"state"}, + ImportStateVerifyIgnore: []string{"state", "hard_delete"}, }, }, }) @@ -112,6 +113,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "scim_tenant" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = "%{hard_delete}" # state, base_uri, purge_time and service_agent are output only, not settable } @@ -164,6 +166,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "scim_tenant" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = "%{hard_delete}" # state, base_uri, purge_time and service_agent are output only, not settable } `, context) diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_meta.yaml b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_meta.yaml index 389a835ee11..701809c4d0c 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_meta.yaml +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_iam_workforce_pool_provider_scim_token' -generation_type: 'mmv1' -source_file: 'products/iamworkforcepool/WorkforcePoolProviderScimToken.yaml' -api_service_name: 'iam.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WorkforcePoolProviderScimToken' +resource: google_iam_workforce_pool_provider_scim_token +generation_type: mmv1 +source_file: products/iamworkforcepool/WorkforcePoolProviderScimToken.yaml +api_service_name: iam.googleapis.com +api_version: v1 +api_resource_type_kind: WorkforcePoolProviderScimToken fields: - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'provider_id' - provider_only: true - - field: 'scim_tenant_id' - provider_only: true - - field: 'scim_token_id' - provider_only: true - - api_field: 'securityToken' - - api_field: 'state' - - field: 'workforce_pool_id' - provider_only: true + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - field: provider_id + provider_only: true + - field: scim_tenant_id + provider_only: true + - field: scim_token_id + provider_only: true + - api_field: securityToken + - api_field: state + - field: workforce_pool_id + provider_only: true diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_test.go b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_test.go index 43045d5fa41..99d977b61ea 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_test.go +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_generated_test.go @@ -128,6 +128,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "tenant" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = true # state, base_uri, purge_time and service_agent are output only, not settable } diff --git a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_test.go b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_test.go index b66b06dc0f9..b86c4d8151b 100644 --- a/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_test.go +++ b/google/services/iamworkforcepool/resource_iam_workforce_pool_provider_scim_token_test.go @@ -32,6 +32,7 @@ func TestAccIAMWorkforcePoolWorkforcePoolProviderScimToken_update(t *testing.T) context := map[string]interface{}{ "org_id": envvar.GetTestOrgFromEnv(t), "random_suffix": acctest.RandString(t, 10), + "hard_delete": true, } acctest.VcrTest(t, resource.TestCase{ @@ -112,6 +113,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "scim_tenant" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = "%{hard_delete}" # state, base_uri, purge_time and service_agent are output only, not settable } @@ -174,6 +176,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "scim_tenant" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = "%{hard_delete}" # state, base_uri, purge_time and service_agent are output only, not settable } diff --git a/google/services/iap/iam_iap_app_engine_version_generated_test.go b/google/services/iap/iam_iap_app_engine_version_generated_test.go index 654d272d880..bf7afda5ab0 100644 --- a/google/services/iap/iam_iap_app_engine_version_generated_test.go +++ b/google/services/iap/iam_iap_app_engine_version_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccIapAppEngineVersionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMBindingStateID("google_iap_app_engine_version_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccIapAppEngineVersionIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMBindingStateID("google_iap_app_engine_version_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccIapAppEngineVersionIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMMemberStateID("google_iap_app_engine_version_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccIapAppEngineVersionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMPolicyStateID("google_iap_app_engine_version_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccIapAppEngineVersionIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMPolicyStateID("google_iap_app_engine_version_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccIapAppEngineVersionIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"], context["condition_title"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMBindingStateID("google_iap_app_engine_version_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccIapAppEngineVersionIamBindingGenerated_withAndWithoutCondition(t *te }, { ResourceName: "google_iap_app_engine_version_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMBindingStateID("google_iap_app_engine_version_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_app_engine_version_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"], context["condition_title"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMBindingStateID("google_iap_app_engine_version_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_app_engine_version_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"], context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMBindingStateID("google_iap_app_engine_version_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccIapAppEngineVersionIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"], context["condition_title"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMMemberStateID("google_iap_app_engine_version_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccIapAppEngineVersionIamMemberGenerated_withAndWithoutCondition(t *tes }, { ResourceName: "google_iap_app_engine_version_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMMemberStateID("google_iap_app_engine_version_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_app_engine_version_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"], context["condition_title"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMMemberStateID("google_iap_app_engine_version_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_app_engine_version_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"], context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMMemberStateID("google_iap_app_engine_version_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccIapAppEngineVersionIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_app_engine_version_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestProjectFromEnv(), "default", context["random_suffix"]), + ImportStateIdFunc: generateIapAppEngineVersionIAMPolicyStateID("google_iap_app_engine_version_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -873,3 +874,59 @@ resource "google_iap_app_engine_version_iam_policy" "foo" { } `, context) } +func generateIapAppEngineVersionIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + appId := tpgresource.GetResourceNameFromSelfLink(rawState["app_id"]) + service := tpgresource.GetResourceNameFromSelfLink(rawState["service"]) + versionId := tpgresource.GetResourceNameFromSelfLink(rawState["version_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s", project, appId, service, versionId), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapAppEngineVersionIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + appId := tpgresource.GetResourceNameFromSelfLink(rawState["app_id"]) + service := tpgresource.GetResourceNameFromSelfLink(rawState["service"]) + versionId := tpgresource.GetResourceNameFromSelfLink(rawState["version_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s", project, appId, service, versionId), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapAppEngineVersionIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + appId := tpgresource.GetResourceNameFromSelfLink(rawState["app_id"]) + service := tpgresource.GetResourceNameFromSelfLink(rawState["service"]) + versionId := tpgresource.GetResourceNameFromSelfLink(rawState["version_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/appengine-%s/services/%s/versions/%s", project, appId, service, versionId), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_tunnel_dest_group_generated_test.go b/google/services/iap/iam_iap_tunnel_dest_group_generated_test.go index 8e7ff65ea15..82c7d62a2ca 100644 --- a/google/services/iap/iam_iap_tunnel_dest_group_generated_test.go +++ b/google/services/iap/iam_iap_tunnel_dest_group_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -596,3 +597,56 @@ resource "google_iap_tunnel_dest_group_iam_policy" "foo" { } `, context) } +func generateIapTunnelDestGroupIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + dest_group := tpgresource.GetResourceNameFromSelfLink(rawState["dest_group"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel/locations/%s/destGroups/%s", project, region, dest_group), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapTunnelDestGroupIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + dest_group := tpgresource.GetResourceNameFromSelfLink(rawState["dest_group"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel/locations/%s/destGroups/%s", project, region, dest_group), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapTunnelDestGroupIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + dest_group := tpgresource.GetResourceNameFromSelfLink(rawState["dest_group"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel/locations/%s/destGroups/%s", project, region, dest_group), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_tunnel_generated_test.go b/google/services/iap/iam_iap_tunnel_generated_test.go index 1d0b4623d3c..a8227a44d17 100644 --- a/google/services/iap/iam_iap_tunnel_generated_test.go +++ b/google/services/iap/iam_iap_tunnel_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -66,7 +67,7 @@ func TestAccIapTunnelIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMBindingStateID("google_iap_tunnel_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -76,7 +77,7 @@ func TestAccIapTunnelIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMBindingStateID("google_iap_tunnel_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -113,7 +114,7 @@ func TestAccIapTunnelIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMMemberStateID("google_iap_tunnel_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -150,7 +151,7 @@ func TestAccIapTunnelIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMPolicyStateID("google_iap_tunnel_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -159,7 +160,7 @@ func TestAccIapTunnelIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMPolicyStateID("google_iap_tunnel_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -195,7 +196,7 @@ func TestAccIapTunnelIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelIAMBindingStateID("google_iap_tunnel_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -233,19 +234,19 @@ func TestAccIapTunnelIamBindingGenerated_withAndWithoutCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMBindingStateID("google_iap_tunnel_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelIAMBindingStateID("google_iap_tunnel_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapTunnelIAMBindingStateID("google_iap_tunnel_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -281,7 +282,7 @@ func TestAccIapTunnelIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelIAMMemberStateID("google_iap_tunnel_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -319,19 +320,19 @@ func TestAccIapTunnelIamMemberGenerated_withAndWithoutCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMMemberStateID("google_iap_tunnel_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelIAMMemberStateID("google_iap_tunnel_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapTunnelIAMMemberStateID("google_iap_tunnel_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -377,7 +378,7 @@ func TestAccIapTunnelIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelIAMPolicyStateID("google_iap_tunnel_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -786,3 +787,50 @@ resource "google_iap_tunnel_iam_policy" "foo" { } `, context) } +func generateIapTunnelIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel", project), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapTunnelIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel", project), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapTunnelIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel", project), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_tunnel_instance_generated_test.go b/google/services/iap/iam_iap_tunnel_instance_generated_test.go index 793498c24af..6091f03a58d 100644 --- a/google/services/iap/iam_iap_tunnel_instance_generated_test.go +++ b/google/services/iap/iam_iap_tunnel_instance_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccIapTunnelInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMBindingStateID("google_iap_tunnel_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccIapTunnelInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMBindingStateID("google_iap_tunnel_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccIapTunnelInstanceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMMemberStateID("google_iap_tunnel_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccIapTunnelInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMPolicyStateID("google_iap_tunnel_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccIapTunnelInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMPolicyStateID("google_iap_tunnel_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccIapTunnelInstanceIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelInstanceIAMBindingStateID("google_iap_tunnel_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccIapTunnelInstanceIamBindingGenerated_withAndWithoutCondition(t *test }, { ResourceName: "google_iap_tunnel_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMBindingStateID("google_iap_tunnel_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_instance_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelInstanceIAMBindingStateID("google_iap_tunnel_instance_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_instance_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapTunnelInstanceIAMBindingStateID("google_iap_tunnel_instance_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccIapTunnelInstanceIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelInstanceIAMMemberStateID("google_iap_tunnel_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccIapTunnelInstanceIamMemberGenerated_withAndWithoutCondition(t *testi }, { ResourceName: "google_iap_tunnel_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMMemberStateID("google_iap_tunnel_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_instance_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapTunnelInstanceIAMMemberStateID("google_iap_tunnel_instance_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_tunnel_instance_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s roles/iap.tunnelResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapTunnelInstanceIAMMemberStateID("google_iap_tunnel_instance_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccIapTunnelInstanceIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_tunnel_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestZoneFromEnv(), fmt.Sprintf("tf-test-tunnel-vm%s", context["random_suffix"])), + ImportStateIdFunc: generateIapTunnelInstanceIAMPolicyStateID("google_iap_tunnel_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -718,3 +719,56 @@ resource "google_iap_tunnel_instance_iam_policy" "foo" { } `, context) } +func generateIapTunnelInstanceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + instance := tpgresource.GetResourceNameFromSelfLink(rawState["instance"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s", project, zone, instance), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapTunnelInstanceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + instance := tpgresource.GetResourceNameFromSelfLink(rawState["instance"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s", project, zone, instance), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapTunnelInstanceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + zone := tpgresource.GetResourceNameFromSelfLink(rawState["zone"]) + instance := tpgresource.GetResourceNameFromSelfLink(rawState["instance"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_tunnel/zones/%s/instances/%s", project, zone, instance), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_web_backend_service_generated_test.go b/google/services/iap/iam_iap_web_backend_service_generated_test.go index e3b15e190fa..b0e246adbb6 100644 --- a/google/services/iap/iam_iap_web_backend_service_generated_test.go +++ b/google/services/iap/iam_iap_web_backend_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccIapWebBackendServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMBindingStateID("google_iap_web_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccIapWebBackendServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMBindingStateID("google_iap_web_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccIapWebBackendServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_backend_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMMemberStateID("google_iap_web_backend_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccIapWebBackendServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_backend_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMPolicyStateID("google_iap_web_backend_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccIapWebBackendServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_backend_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMPolicyStateID("google_iap_web_backend_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccIapWebBackendServiceIamBindingGenerated_withCondition(t *testing.T) }, { ResourceName: "google_iap_web_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebBackendServiceIAMBindingStateID("google_iap_web_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccIapWebBackendServiceIamBindingGenerated_withAndWithoutCondition(t *t }, { ResourceName: "google_iap_web_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMBindingStateID("google_iap_web_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_backend_service_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebBackendServiceIAMBindingStateID("google_iap_web_backend_service_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_backend_service_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebBackendServiceIAMBindingStateID("google_iap_web_backend_service_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccIapWebBackendServiceIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_backend_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebBackendServiceIAMMemberStateID("google_iap_web_backend_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccIapWebBackendServiceIamMemberGenerated_withAndWithoutCondition(t *te }, { ResourceName: "google_iap_web_backend_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMMemberStateID("google_iap_web_backend_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_backend_service_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebBackendServiceIAMMemberStateID("google_iap_web_backend_service_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_backend_service_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebBackendServiceIAMMemberStateID("google_iap_web_backend_service_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccIapWebBackendServiceIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_backend_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute/services/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebBackendServiceIAMPolicyStateID("google_iap_web_backend_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -663,3 +664,53 @@ resource "google_iap_web_backend_service_iam_policy" "foo" { } `, context) } +func generateIapWebBackendServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + web_backend_service := tpgresource.GetResourceNameFromSelfLink(rawState["web_backend_service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute/services/%s", project, web_backend_service), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebBackendServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + web_backend_service := tpgresource.GetResourceNameFromSelfLink(rawState["web_backend_service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute/services/%s", project, web_backend_service), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebBackendServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + web_backend_service := tpgresource.GetResourceNameFromSelfLink(rawState["web_backend_service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute/services/%s", project, web_backend_service), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_web_cloud_run_service_generated_test.go b/google/services/iap/iam_iap_web_cloud_run_service_generated_test.go index bfb8ac7cbac..5185ae483a4 100644 --- a/google/services/iap/iam_iap_web_cloud_run_service_generated_test.go +++ b/google/services/iap/iam_iap_web_cloud_run_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccIapWebCloudRunServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_cloud_run_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMBindingStateID("google_iap_web_cloud_run_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccIapWebCloudRunServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_cloud_run_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMBindingStateID("google_iap_web_cloud_run_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccIapWebCloudRunServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_cloud_run_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMMemberStateID("google_iap_web_cloud_run_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccIapWebCloudRunServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_cloud_run_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMPolicyStateID("google_iap_web_cloud_run_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccIapWebCloudRunServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_cloud_run_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMPolicyStateID("google_iap_web_cloud_run_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccIapWebCloudRunServiceIamBindingGenerated_withCondition(t *testing.T) }, { ResourceName: "google_iap_web_cloud_run_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMBindingStateID("google_iap_web_cloud_run_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccIapWebCloudRunServiceIamBindingGenerated_withAndWithoutCondition(t * }, { ResourceName: "google_iap_web_cloud_run_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMBindingStateID("google_iap_web_cloud_run_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_cloud_run_service_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMBindingStateID("google_iap_web_cloud_run_service_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_cloud_run_service_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMBindingStateID("google_iap_web_cloud_run_service_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccIapWebCloudRunServiceIamMemberGenerated_withCondition(t *testing.T) }, { ResourceName: "google_iap_web_cloud_run_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMMemberStateID("google_iap_web_cloud_run_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccIapWebCloudRunServiceIamMemberGenerated_withAndWithoutCondition(t *t }, { ResourceName: "google_iap_web_cloud_run_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMMemberStateID("google_iap_web_cloud_run_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_cloud_run_service_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMMemberStateID("google_iap_web_cloud_run_service_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_cloud_run_service_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMMemberStateID("google_iap_web_cloud_run_service_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccIapWebCloudRunServiceIamPolicyGenerated_withCondition(t *testing.T) }, { ResourceName: "google_iap_web_cloud_run_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-cloud-run-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebCloudRunServiceIAMPolicyStateID("google_iap_web_cloud_run_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -728,3 +729,56 @@ resource "google_iap_web_cloud_run_service_iam_policy" "foo" { } `, context) } +func generateIapWebCloudRunServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + cloud_run_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_run_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s", project, location, cloud_run_service_name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebCloudRunServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + cloud_run_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_run_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s", project, location, cloud_run_service_name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebCloudRunServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + cloud_run_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["cloud_run_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/cloud_run-%s/services/%s", project, location, cloud_run_service_name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_web_forwarding_rule_service_generated_test.go b/google/services/iap/iam_iap_web_forwarding_rule_service_generated_test.go index 6cad881e19d..4ee0bead754 100644 --- a/google/services/iap/iam_iap_web_forwarding_rule_service_generated_test.go +++ b/google/services/iap/iam_iap_web_forwarding_rule_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccIapWebForwardingRuleServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMBindingStateID("google_iap_web_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccIapWebForwardingRuleServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMBindingStateID("google_iap_web_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccIapWebForwardingRuleServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMMemberStateID("google_iap_web_forwarding_rule_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccIapWebForwardingRuleServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMPolicyStateID("google_iap_web_forwarding_rule_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccIapWebForwardingRuleServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMPolicyStateID("google_iap_web_forwarding_rule_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccIapWebForwardingRuleServiceIamBindingGenerated_withCondition(t *test }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMBindingStateID("google_iap_web_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccIapWebForwardingRuleServiceIamBindingGenerated_withAndWithoutConditi }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMBindingStateID("google_iap_web_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMBindingStateID("google_iap_web_forwarding_rule_service_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMBindingStateID("google_iap_web_forwarding_rule_service_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccIapWebForwardingRuleServiceIamMemberGenerated_withCondition(t *testi }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMMemberStateID("google_iap_web_forwarding_rule_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccIapWebForwardingRuleServiceIamMemberGenerated_withAndWithoutConditio }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMMemberStateID("google_iap_web_forwarding_rule_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMMemberStateID("google_iap_web_forwarding_rule_service_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMMemberStateID("google_iap_web_forwarding_rule_service_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccIapWebForwardingRuleServiceIamPolicyGenerated_withCondition(t *testi }, { ResourceName: "google_iap_web_forwarding_rule_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebForwardingRuleServiceIAMPolicyStateID("google_iap_web_forwarding_rule_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -923,3 +924,53 @@ resource "google_iap_web_forwarding_rule_service_iam_policy" "foo" { } `, context) } +func generateIapWebForwardingRuleServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + forwarding_rule_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["forwarding_rule_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s", project, forwarding_rule_service_name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebForwardingRuleServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + forwarding_rule_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["forwarding_rule_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s", project, forwarding_rule_service_name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebForwardingRuleServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + forwarding_rule_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["forwarding_rule_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/forwarding_rule/services/%s", project, forwarding_rule_service_name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_web_generated_test.go b/google/services/iap/iam_iap_web_generated_test.go index b126f5b93da..decec1af815 100644 --- a/google/services/iap/iam_iap_web_generated_test.go +++ b/google/services/iap/iam_iap_web_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -66,7 +67,7 @@ func TestAccIapWebIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMBindingStateID("google_iap_web_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -76,7 +77,7 @@ func TestAccIapWebIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMBindingStateID("google_iap_web_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -113,7 +114,7 @@ func TestAccIapWebIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMMemberStateID("google_iap_web_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -150,7 +151,7 @@ func TestAccIapWebIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMPolicyStateID("google_iap_web_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -159,7 +160,7 @@ func TestAccIapWebIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMPolicyStateID("google_iap_web_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -195,7 +196,7 @@ func TestAccIapWebIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebIAMBindingStateID("google_iap_web_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -233,19 +234,19 @@ func TestAccIapWebIamBindingGenerated_withAndWithoutCondition(t *testing.T) { }, { ResourceName: "google_iap_web_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMBindingStateID("google_iap_web_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebIAMBindingStateID("google_iap_web_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebIAMBindingStateID("google_iap_web_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -281,7 +282,7 @@ func TestAccIapWebIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebIAMMemberStateID("google_iap_web_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -319,19 +320,19 @@ func TestAccIapWebIamMemberGenerated_withAndWithoutCondition(t *testing.T) { }, { ResourceName: "google_iap_web_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMMemberStateID("google_iap_web_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebIAMMemberStateID("google_iap_web_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebIAMMemberStateID("google_iap_web_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -377,7 +378,7 @@ func TestAccIapWebIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebIAMPolicyStateID("google_iap_web_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -786,3 +787,50 @@ resource "google_iap_web_iam_policy" "foo" { } `, context) } +func generateIapWebIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web", project), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web", project), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web", project), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_web_region_backend_service_generated_test.go b/google/services/iap/iam_iap_web_region_backend_service_generated_test.go index 9e7e977ce89..55fb364b539 100644 --- a/google/services/iap/iam_iap_web_region_backend_service_generated_test.go +++ b/google/services/iap/iam_iap_web_region_backend_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccIapWebRegionBackendServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMBindingStateID("google_iap_web_region_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccIapWebRegionBackendServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMBindingStateID("google_iap_web_region_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccIapWebRegionBackendServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_backend_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMMemberStateID("google_iap_web_region_backend_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccIapWebRegionBackendServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_backend_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMPolicyStateID("google_iap_web_region_backend_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccIapWebRegionBackendServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_backend_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMPolicyStateID("google_iap_web_region_backend_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccIapWebRegionBackendServiceIamBindingGenerated_withCondition(t *testi }, { ResourceName: "google_iap_web_region_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMBindingStateID("google_iap_web_region_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccIapWebRegionBackendServiceIamBindingGenerated_withAndWithoutConditio }, { ResourceName: "google_iap_web_region_backend_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMBindingStateID("google_iap_web_region_backend_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_backend_service_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMBindingStateID("google_iap_web_region_backend_service_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_backend_service_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMBindingStateID("google_iap_web_region_backend_service_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccIapWebRegionBackendServiceIamMemberGenerated_withCondition(t *testin }, { ResourceName: "google_iap_web_region_backend_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMMemberStateID("google_iap_web_region_backend_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccIapWebRegionBackendServiceIamMemberGenerated_withAndWithoutCondition }, { ResourceName: "google_iap_web_region_backend_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMMemberStateID("google_iap_web_region_backend_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_backend_service_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMMemberStateID("google_iap_web_region_backend_service_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_backend_service_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMMemberStateID("google_iap_web_region_backend_service_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccIapWebRegionBackendServiceIamPolicyGenerated_withCondition(t *testin }, { ResourceName: "google_iap_web_region_backend_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-region-backend-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionBackendServiceIAMPolicyStateID("google_iap_web_region_backend_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -738,3 +739,56 @@ resource "google_iap_web_region_backend_service_iam_policy" "foo" { } `, context) } +func generateIapWebRegionBackendServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + web_region_backend_service := tpgresource.GetResourceNameFromSelfLink(rawState["web_region_backend_service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s", project, region, web_region_backend_service), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebRegionBackendServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + web_region_backend_service := tpgresource.GetResourceNameFromSelfLink(rawState["web_region_backend_service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s", project, region, web_region_backend_service), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebRegionBackendServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + web_region_backend_service := tpgresource.GetResourceNameFromSelfLink(rawState["web_region_backend_service"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute-%s/services/%s", project, region, web_region_backend_service), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_web_region_forwarding_rule_service_generated_test.go b/google/services/iap/iam_iap_web_region_forwarding_rule_service_generated_test.go index fb1f751e45f..cad4acf4737 100644 --- a/google/services/iap/iam_iap_web_region_forwarding_rule_service_generated_test.go +++ b/google/services/iap/iam_iap_web_region_forwarding_rule_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMBindingStateID("google_iap_web_region_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMBindingStateID("google_iap_web_region_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMMemberStateID("google_iap_web_region_forwarding_rule_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMPolicyStateID("google_iap_web_region_forwarding_rule_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMPolicyStateID("google_iap_web_region_forwarding_rule_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamBindingGenerated_withCondition(t }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMBindingStateID("google_iap_web_region_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccIapWebRegionForwardingRuleServiceIamBindingGenerated_withAndWithoutC }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMBindingStateID("google_iap_web_region_forwarding_rule_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMBindingStateID("google_iap_web_region_forwarding_rule_service_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMBindingStateID("google_iap_web_region_forwarding_rule_service_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamMemberGenerated_withCondition(t }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMMemberStateID("google_iap_web_region_forwarding_rule_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccIapWebRegionForwardingRuleServiceIamMemberGenerated_withAndWithoutCo }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMMemberStateID("google_iap_web_region_forwarding_rule_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMMemberStateID("google_iap_web_region_forwarding_rule_service_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMMemberStateID("google_iap_web_region_forwarding_rule_service_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccIapWebRegionForwardingRuleServiceIamPolicyGenerated_withCondition(t }, { ResourceName: "google_iap_web_region_forwarding_rule_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-forwarding-rule-region-service%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebRegionForwardingRuleServiceIAMPolicyStateID("google_iap_web_region_forwarding_rule_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -1058,3 +1059,56 @@ resource "google_iap_web_region_forwarding_rule_service_iam_policy" "foo" { } `, context) } +func generateIapWebRegionForwardingRuleServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + forwarding_rule_region_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["forwarding_rule_region_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s", project, region, forwarding_rule_region_service_name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebRegionForwardingRuleServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + forwarding_rule_region_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["forwarding_rule_region_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s", project, region, forwarding_rule_region_service_name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebRegionForwardingRuleServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + region := tpgresource.GetResourceNameFromSelfLink(rawState["region"]) + forwarding_rule_region_service_name := tpgresource.GetResourceNameFromSelfLink(rawState["forwarding_rule_region_service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/forwarding_rule-%s/services/%s", project, region, forwarding_rule_region_service_name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/iam_iap_web_type_app_engine_generated_test.go b/google/services/iap/iam_iap_web_type_app_engine_generated_test.go index 0f81d388dfd..fa05442d869 100644 --- a/google/services/iap/iam_iap_web_type_app_engine_generated_test.go +++ b/google/services/iap/iam_iap_web_type_app_engine_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -68,7 +69,7 @@ func TestAccIapWebTypeAppEngineIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMBindingStateID("google_iap_web_type_app_engine_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -78,7 +79,7 @@ func TestAccIapWebTypeAppEngineIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMBindingStateID("google_iap_web_type_app_engine_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccIapWebTypeAppEngineIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMMemberStateID("google_iap_web_type_app_engine_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -156,7 +157,7 @@ func TestAccIapWebTypeAppEngineIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMPolicyStateID("google_iap_web_type_app_engine_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -165,7 +166,7 @@ func TestAccIapWebTypeAppEngineIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMPolicyStateID("google_iap_web_type_app_engine_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,7 +204,7 @@ func TestAccIapWebTypeAppEngineIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor %s", context["project_id"], context["project_id"], context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMBindingStateID("google_iap_web_type_app_engine_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -243,19 +244,19 @@ func TestAccIapWebTypeAppEngineIamBindingGenerated_withAndWithoutCondition(t *te }, { ResourceName: "google_iap_web_type_app_engine_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMBindingStateID("google_iap_web_type_app_engine_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_app_engine_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor %s", context["project_id"], context["project_id"], context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMBindingStateID("google_iap_web_type_app_engine_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_app_engine_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor %s", context["project_id"], context["project_id"], context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMBindingStateID("google_iap_web_type_app_engine_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -293,7 +294,7 @@ func TestAccIapWebTypeAppEngineIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", context["project_id"], context["project_id"], context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMMemberStateID("google_iap_web_type_app_engine_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -333,19 +334,19 @@ func TestAccIapWebTypeAppEngineIamMemberGenerated_withAndWithoutCondition(t *tes }, { ResourceName: "google_iap_web_type_app_engine_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMMemberStateID("google_iap_web_type_app_engine_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_app_engine_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", context["project_id"], context["project_id"], context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMMemberStateID("google_iap_web_type_app_engine_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_app_engine_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", context["project_id"], context["project_id"], context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMMemberStateID("google_iap_web_type_app_engine_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -393,7 +394,7 @@ func TestAccIapWebTypeAppEngineIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_type_app_engine_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/appengine-%s", context["project_id"], context["project_id"]), + ImportStateIdFunc: generateIapWebTypeAppEngineIAMPolicyStateID("google_iap_web_type_app_engine_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -887,3 +888,61 @@ resource "google_iap_web_type_app_engine_iam_policy" "foo" { } `, context) } +func generateIapWebTypeAppEngineIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + appId := appIdShortName(rawState["app_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/appengine-%s", project, appId), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebTypeAppEngineIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + appId := appIdShortName(rawState["app_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/appengine-%s", project, appId), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebTypeAppEngineIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + appId := appIdShortName(rawState["app_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/appengine-%s", project, appId), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} + +func appIdShortName(appId string) string { + appIdParts := strings.SplitN(appId, "appengine-", 2) + if len(appIdParts) == 2 { + return appIdParts[1] + } + return appId +} diff --git a/google/services/iap/iam_iap_web_type_compute_generated_test.go b/google/services/iap/iam_iap_web_type_compute_generated_test.go index 533aeaa8393..ef60af06fad 100644 --- a/google/services/iap/iam_iap_web_type_compute_generated_test.go +++ b/google/services/iap/iam_iap_web_type_compute_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -66,7 +67,7 @@ func TestAccIapWebTypeComputeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMBindingStateID("google_iap_web_type_compute_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -76,7 +77,7 @@ func TestAccIapWebTypeComputeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMBindingStateID("google_iap_web_type_compute_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -113,7 +114,7 @@ func TestAccIapWebTypeComputeIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMMemberStateID("google_iap_web_type_compute_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -150,7 +151,7 @@ func TestAccIapWebTypeComputeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMPolicyStateID("google_iap_web_type_compute_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -159,7 +160,7 @@ func TestAccIapWebTypeComputeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMPolicyStateID("google_iap_web_type_compute_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -195,7 +196,7 @@ func TestAccIapWebTypeComputeIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeComputeIAMBindingStateID("google_iap_web_type_compute_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -233,19 +234,19 @@ func TestAccIapWebTypeComputeIamBindingGenerated_withAndWithoutCondition(t *test }, { ResourceName: "google_iap_web_type_compute_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMBindingStateID("google_iap_web_type_compute_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_compute_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeComputeIAMBindingStateID("google_iap_web_type_compute_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_compute_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebTypeComputeIAMBindingStateID("google_iap_web_type_compute_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -281,7 +282,7 @@ func TestAccIapWebTypeComputeIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeComputeIAMMemberStateID("google_iap_web_type_compute_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -319,19 +320,19 @@ func TestAccIapWebTypeComputeIamMemberGenerated_withAndWithoutCondition(t *testi }, { ResourceName: "google_iap_web_type_compute_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor user:admin@hashicorptest.com", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMMemberStateID("google_iap_web_type_compute_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_compute_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateIapWebTypeComputeIAMMemberStateID("google_iap_web_type_compute_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_iap_web_type_compute_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute roles/iap.httpsResourceAccessor user:admin@hashicorptest.com %s", fmt.Sprintf("tf-test%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateIapWebTypeComputeIAMMemberStateID("google_iap_web_type_compute_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -377,7 +378,7 @@ func TestAccIapWebTypeComputeIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_iap_web_type_compute_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/iap_web/compute", fmt.Sprintf("tf-test%s", context["random_suffix"])), + ImportStateIdFunc: generateIapWebTypeComputeIAMPolicyStateID("google_iap_web_type_compute_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -786,3 +787,50 @@ resource "google_iap_web_type_compute_iam_policy" "foo" { } `, context) } +func generateIapWebTypeComputeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute", project), "", "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebTypeComputeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute", project), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateIapWebTypeComputeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/iap_web/compute", project), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/iap/resource_iap_brand_generated_meta.yaml b/google/services/iap/resource_iap_brand_generated_meta.yaml index 491eadfbc6a..6a9f9abaac7 100644 --- a/google/services/iap/resource_iap_brand_generated_meta.yaml +++ b/google/services/iap/resource_iap_brand_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_iap_brand' -generation_type: 'mmv1' -source_file: 'products/iap/Brand.yaml' -api_service_name: 'iap.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Brand' +resource: google_iap_brand +generation_type: mmv1 +source_file: products/iap/Brand.yaml +api_service_name: iap.googleapis.com +api_version: v1 +api_resource_type_kind: Brand fields: - - api_field: 'applicationTitle' - - api_field: 'name' - - api_field: 'orgInternalOnly' - - api_field: 'supportEmail' + - api_field: applicationTitle + - api_field: name + - api_field: orgInternalOnly + - api_field: supportEmail diff --git a/google/services/iap/resource_iap_client_generated_meta.yaml b/google/services/iap/resource_iap_client_generated_meta.yaml index 9ea189f357a..766c9a314b9 100644 --- a/google/services/iap/resource_iap_client_generated_meta.yaml +++ b/google/services/iap/resource_iap_client_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_iap_client' -generation_type: 'mmv1' -source_file: 'products/iap/Client.yaml' -api_service_name: 'iap.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'IdentityAwareProxyClient' +resource: google_iap_client +generation_type: mmv1 +source_file: products/iap/Client.yaml +api_service_name: iap.googleapis.com +api_version: v1 +api_resource_type_kind: IdentityAwareProxyClient fields: - - field: 'brand' - provider_only: true - - api_field: 'name' - field: 'client_id' - - api_field: 'displayName' - - api_field: 'secret' + - field: brand + provider_only: true + - api_field: name + field: client_id + - api_field: displayName + - api_field: secret diff --git a/google/services/iap/resource_iap_settings_generated_meta.yaml b/google/services/iap/resource_iap_settings_generated_meta.yaml index 3cb4f22f7b6..cf899aa7e59 100644 --- a/google/services/iap/resource_iap_settings_generated_meta.yaml +++ b/google/services/iap/resource_iap_settings_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_iap_settings' -generation_type: 'mmv1' -source_file: 'products/iap/Settings.yaml' -api_service_name: 'iap.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Settings' +resource: google_iap_settings +generation_type: mmv1 +source_file: products/iap/Settings.yaml +api_service_name: iap.googleapis.com +api_version: v1 +api_resource_type_kind: Settings fields: - - api_field: 'accessSettings.allowedDomainsSettings.domains' - - api_field: 'accessSettings.allowedDomainsSettings.enable' - - api_field: 'accessSettings.corsSettings.allowHttpOptions' - - api_field: 'accessSettings.gcipSettings.loginPageUri' - - api_field: 'accessSettings.gcipSettings.tenantIds' - - api_field: 'accessSettings.identitySources' - - api_field: 'accessSettings.oauthSettings.loginHint' - - api_field: 'accessSettings.oauthSettings.programmaticClients' - - api_field: 'accessSettings.reauthSettings.maxAge' - - api_field: 'accessSettings.reauthSettings.method' - - api_field: 'accessSettings.reauthSettings.policyType' - - api_field: 'accessSettings.workforceIdentitySettings.oauth2.clientId' - - api_field: 'accessSettings.workforceIdentitySettings.oauth2.clientSecret' - - api_field: 'accessSettings.workforceIdentitySettings.oauth2.clientSecretSha256' - - api_field: 'accessSettings.workforceIdentitySettings.workforcePools' - - api_field: 'applicationSettings.accessDeniedPageSettings.accessDeniedPageUri' - - api_field: 'applicationSettings.accessDeniedPageSettings.generateTroubleshootingUri' - - api_field: 'applicationSettings.accessDeniedPageSettings.remediationTokenGenerationEnabled' - - api_field: 'applicationSettings.attributePropagationSettings.enable' - - api_field: 'applicationSettings.attributePropagationSettings.expression' - - api_field: 'applicationSettings.attributePropagationSettings.outputCredentials' - - api_field: 'applicationSettings.cookieDomain' - - api_field: 'applicationSettings.csmSettings.rctokenAud' - - api_field: 'name' + - api_field: accessSettings.allowedDomainsSettings.domains + - api_field: accessSettings.allowedDomainsSettings.enable + - api_field: accessSettings.corsSettings.allowHttpOptions + - api_field: accessSettings.gcipSettings.loginPageUri + - api_field: accessSettings.gcipSettings.tenantIds + - api_field: accessSettings.identitySources + - api_field: accessSettings.oauthSettings.loginHint + - api_field: accessSettings.oauthSettings.programmaticClients + - api_field: accessSettings.reauthSettings.maxAge + - api_field: accessSettings.reauthSettings.method + - api_field: accessSettings.reauthSettings.policyType + - api_field: accessSettings.workforceIdentitySettings.oauth2.clientId + - api_field: accessSettings.workforceIdentitySettings.oauth2.clientSecret + - api_field: accessSettings.workforceIdentitySettings.oauth2.clientSecretSha256 + - api_field: accessSettings.workforceIdentitySettings.workforcePools + - api_field: applicationSettings.accessDeniedPageSettings.accessDeniedPageUri + - api_field: applicationSettings.accessDeniedPageSettings.generateTroubleshootingUri + - api_field: applicationSettings.accessDeniedPageSettings.remediationTokenGenerationEnabled + - api_field: applicationSettings.attributePropagationSettings.enable + - api_field: applicationSettings.attributePropagationSettings.expression + - api_field: applicationSettings.attributePropagationSettings.outputCredentials + - api_field: applicationSettings.cookieDomain + - api_field: applicationSettings.csmSettings.rctokenAud + - api_field: name diff --git a/google/services/iap/resource_iap_tunnel_dest_group_generated_meta.yaml b/google/services/iap/resource_iap_tunnel_dest_group_generated_meta.yaml index bb814016590..0cd8af87e01 100644 --- a/google/services/iap/resource_iap_tunnel_dest_group_generated_meta.yaml +++ b/google/services/iap/resource_iap_tunnel_dest_group_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_iap_tunnel_dest_group' -generation_type: 'mmv1' -source_file: 'products/iap/TunnelDestGroup.yaml' -api_service_name: 'iap.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TunnelDestGroup' +resource: google_iap_tunnel_dest_group +generation_type: mmv1 +source_file: products/iap/TunnelDestGroup.yaml +api_service_name: iap.googleapis.com +api_version: v1 +api_resource_type_kind: TunnelDestGroup fields: - - api_field: 'cidrs' - - api_field: 'fqdns' - - field: 'group_name' - provider_only: true - - api_field: 'name' - - field: 'region' - provider_only: true + - api_field: cidrs + - api_field: fqdns + - field: group_name + provider_only: true + - api_field: name + - field: region + provider_only: true diff --git a/google/services/identityplatform/resource_identity_platform_config_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_config_generated_meta.yaml index 6604dbdd0b3..cf1f2611f25 100644 --- a/google/services/identityplatform/resource_identity_platform_config_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_config_generated_meta.yaml @@ -1,42 +1,46 @@ -resource: 'google_identity_platform_config' -generation_type: 'mmv1' -source_file: 'products/identityplatform/Config.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Config' +resource: google_identity_platform_config +generation_type: mmv1 +source_file: products/identityplatform/Config.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: Config fields: - - api_field: 'authorizedDomains' - - api_field: 'autodeleteAnonymousUsers' - - api_field: 'blockingFunctions.forwardInboundCredentials.accessToken' - - api_field: 'blockingFunctions.forwardInboundCredentials.idToken' - - api_field: 'blockingFunctions.forwardInboundCredentials.refreshToken' - - api_field: 'blockingFunctions.triggers.triggers.functionUri' - - api_field: 'blockingFunctions.triggers.triggers.updateTime' - - api_field: 'client.apiKey' - - api_field: 'client.firebaseSubdomain' - - api_field: 'client.permissions.disabledUserDeletion' - - api_field: 'client.permissions.disabledUserSignup' - - api_field: 'mfa.enabledProviders' - - api_field: 'mfa.providerConfigs.state' - - api_field: 'mfa.providerConfigs.totpProviderConfig.adjacentIntervals' - - api_field: 'mfa.state' - - api_field: 'monitoring.requestLogging.enabled' - - api_field: 'multiTenant.allowTenants' - - api_field: 'multiTenant.defaultTenantLocation' - - api_field: 'name' - - api_field: 'quota.signUpQuotaConfig.quota' - - api_field: 'quota.signUpQuotaConfig.quotaDuration' - - api_field: 'quota.signUpQuotaConfig.startTime' - - api_field: 'signIn.allowDuplicateEmails' - - api_field: 'signIn.anonymous.enabled' - - api_field: 'signIn.email.enabled' - - api_field: 'signIn.email.passwordRequired' - - api_field: 'signIn.hashConfig.algorithm' - - api_field: 'signIn.hashConfig.memoryCost' - - api_field: 'signIn.hashConfig.rounds' - - api_field: 'signIn.hashConfig.saltSeparator' - - api_field: 'signIn.hashConfig.signerKey' - - api_field: 'signIn.phoneNumber.enabled' - - api_field: 'signIn.phoneNumber.testPhoneNumbers' - - api_field: 'smsRegionConfig.allowByDefault.disallowedRegions' - - api_field: 'smsRegionConfig.allowlistOnly.allowedRegions' + - api_field: authorizedDomains + - api_field: autodeleteAnonymousUsers + - api_field: blockingFunctions.forwardInboundCredentials.accessToken + - api_field: blockingFunctions.forwardInboundCredentials.idToken + - api_field: blockingFunctions.forwardInboundCredentials.refreshToken + - api_field: blockingFunctions.triggers.key + field: blocking_functions.triggers.event_type + - api_field: blockingFunctions.triggers.value.functionUri + field: blocking_functions.triggers.function_uri + - api_field: blockingFunctions.triggers.value.updateTime + field: blocking_functions.triggers.update_time + - api_field: client.apiKey + - api_field: client.firebaseSubdomain + - api_field: client.permissions.disabledUserDeletion + - api_field: client.permissions.disabledUserSignup + - api_field: mfa.enabledProviders + - api_field: mfa.providerConfigs.state + - api_field: mfa.providerConfigs.totpProviderConfig.adjacentIntervals + - api_field: mfa.state + - api_field: monitoring.requestLogging.enabled + - api_field: multiTenant.allowTenants + - api_field: multiTenant.defaultTenantLocation + - api_field: name + - api_field: quota.signUpQuotaConfig.quota + - api_field: quota.signUpQuotaConfig.quotaDuration + - api_field: quota.signUpQuotaConfig.startTime + - api_field: signIn.allowDuplicateEmails + - api_field: signIn.anonymous.enabled + - api_field: signIn.email.enabled + - api_field: signIn.email.passwordRequired + - api_field: signIn.hashConfig.algorithm + - api_field: signIn.hashConfig.memoryCost + - api_field: signIn.hashConfig.rounds + - api_field: signIn.hashConfig.saltSeparator + - api_field: signIn.hashConfig.signerKey + - api_field: signIn.phoneNumber.enabled + - api_field: signIn.phoneNumber.testPhoneNumbers + - api_field: smsRegionConfig.allowByDefault.disallowedRegions + - api_field: smsRegionConfig.allowlistOnly.allowedRegions diff --git a/google/services/identityplatform/resource_identity_platform_default_supported_idp_config_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_default_supported_idp_config_generated_meta.yaml index aa1359f7cc4..6598c5d44e6 100644 --- a/google/services/identityplatform/resource_identity_platform_default_supported_idp_config_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_default_supported_idp_config_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_identity_platform_default_supported_idp_config' -generation_type: 'mmv1' -source_file: 'products/identityplatform/DefaultSupportedIdpConfig.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'DefaultSupportedIdpConfig' +resource: google_identity_platform_default_supported_idp_config +generation_type: mmv1 +source_file: products/identityplatform/DefaultSupportedIdpConfig.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: DefaultSupportedIdpConfig fields: - - api_field: 'clientId' - - api_field: 'clientSecret' - - api_field: 'enabled' - - field: 'idp_id' - provider_only: true - - api_field: 'name' + - api_field: clientId + - api_field: clientSecret + - api_field: enabled + - field: idp_id + provider_only: true + - api_field: name diff --git a/google/services/identityplatform/resource_identity_platform_inbound_saml_config_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_inbound_saml_config_generated_meta.yaml index f61ba5f4958..3e71d2e0e63 100644 --- a/google/services/identityplatform/resource_identity_platform_inbound_saml_config_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_inbound_saml_config_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_identity_platform_inbound_saml_config' -generation_type: 'mmv1' -source_file: 'products/identityplatform/InboundSamlConfig.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'InboundSamlConfig' +resource: google_identity_platform_inbound_saml_config +generation_type: mmv1 +source_file: products/identityplatform/InboundSamlConfig.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: InboundSamlConfig fields: - - api_field: 'displayName' - - api_field: 'enabled' - - api_field: 'idpConfig.idpCertificates.x509Certificate' - - api_field: 'idpConfig.idpEntityId' - - api_field: 'idpConfig.signRequest' - - api_field: 'idpConfig.ssoUrl' - - api_field: 'name' - - api_field: 'spConfig.callbackUri' - - api_field: 'spConfig.spCertificates.x509Certificate' - - api_field: 'spConfig.spEntityId' + - api_field: displayName + - api_field: enabled + - api_field: idpConfig.idpCertificates.x509Certificate + - api_field: idpConfig.idpEntityId + - api_field: idpConfig.signRequest + - api_field: idpConfig.ssoUrl + - api_field: name + - api_field: spConfig.callbackUri + - api_field: spConfig.spCertificates.x509Certificate + - api_field: spConfig.spEntityId diff --git a/google/services/identityplatform/resource_identity_platform_oauth_idp_config_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_oauth_idp_config_generated_meta.yaml index 8518579cd33..3ee6fcc0d8b 100644 --- a/google/services/identityplatform/resource_identity_platform_oauth_idp_config_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_oauth_idp_config_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_identity_platform_oauth_idp_config' -generation_type: 'mmv1' -source_file: 'products/identityplatform/OauthIdpConfig.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'OAuthIdpConfig' +resource: google_identity_platform_oauth_idp_config +generation_type: mmv1 +source_file: products/identityplatform/OauthIdpConfig.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: OAuthIdpConfig fields: - - api_field: 'clientId' - - api_field: 'clientSecret' - - api_field: 'displayName' - - api_field: 'enabled' - - api_field: 'issuer' - - api_field: 'name' - - api_field: 'responseType.code' - - api_field: 'responseType.idToken' + - api_field: clientId + - api_field: clientSecret + - api_field: displayName + - api_field: enabled + - api_field: issuer + - api_field: name + - api_field: responseType.code + - api_field: responseType.idToken diff --git a/google/services/identityplatform/resource_identity_platform_tenant_default_supported_idp_config_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_tenant_default_supported_idp_config_generated_meta.yaml index 9a9708d8563..92475fcc826 100644 --- a/google/services/identityplatform/resource_identity_platform_tenant_default_supported_idp_config_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_tenant_default_supported_idp_config_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_identity_platform_tenant_default_supported_idp_config' -generation_type: 'mmv1' -source_file: 'products/identityplatform/TenantDefaultSupportedIdpConfig.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'DefaultSupportedIdpConfig' +resource: google_identity_platform_tenant_default_supported_idp_config +generation_type: mmv1 +source_file: products/identityplatform/TenantDefaultSupportedIdpConfig.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: DefaultSupportedIdpConfig fields: - - api_field: 'clientId' - - api_field: 'clientSecret' - - api_field: 'enabled' - - field: 'idp_id' - provider_only: true - - api_field: 'name' - - field: 'tenant' - provider_only: true + - api_field: clientId + - api_field: clientSecret + - api_field: enabled + - field: idp_id + provider_only: true + - api_field: name + - field: tenant + provider_only: true diff --git a/google/services/identityplatform/resource_identity_platform_tenant_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_tenant_generated_meta.yaml index c33436c8501..3dfd52bb921 100644 --- a/google/services/identityplatform/resource_identity_platform_tenant_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_tenant_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_identity_platform_tenant' -generation_type: 'mmv1' -source_file: 'products/identityplatform/Tenant.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Tenant' +resource: google_identity_platform_tenant +generation_type: mmv1 +source_file: products/identityplatform/Tenant.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: Tenant fields: - - api_field: 'allowPasswordSignup' - - api_field: 'client.permissions.disabledUserDeletion' - - api_field: 'client.permissions.disabledUserSignup' - - api_field: 'disableAuth' - - api_field: 'displayName' - - api_field: 'enableEmailLinkSignin' - - api_field: 'name' + - api_field: allowPasswordSignup + - api_field: client.permissions.disabledUserDeletion + - api_field: client.permissions.disabledUserSignup + - api_field: disableAuth + - api_field: displayName + - api_field: enableEmailLinkSignin + - api_field: name diff --git a/google/services/identityplatform/resource_identity_platform_tenant_inbound_saml_config_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_tenant_inbound_saml_config_generated_meta.yaml index 9a9e6d1a351..f9b7c13a40d 100644 --- a/google/services/identityplatform/resource_identity_platform_tenant_inbound_saml_config_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_tenant_inbound_saml_config_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_identity_platform_tenant_inbound_saml_config' -generation_type: 'mmv1' -source_file: 'products/identityplatform/TenantInboundSamlConfig.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'InboundSamlConfig' +resource: google_identity_platform_tenant_inbound_saml_config +generation_type: mmv1 +source_file: products/identityplatform/TenantInboundSamlConfig.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: InboundSamlConfig fields: - - api_field: 'displayName' - - api_field: 'enabled' - - api_field: 'idpConfig.idpCertificates.x509Certificate' - - api_field: 'idpConfig.idpEntityId' - - api_field: 'idpConfig.signRequest' - - api_field: 'idpConfig.ssoUrl' - - api_field: 'name' - - api_field: 'spConfig.callbackUri' - - api_field: 'spConfig.spCertificates.x509Certificate' - - api_field: 'spConfig.spEntityId' - - field: 'tenant' - provider_only: true + - api_field: displayName + - api_field: enabled + - api_field: idpConfig.idpCertificates.x509Certificate + - api_field: idpConfig.idpEntityId + - api_field: idpConfig.signRequest + - api_field: idpConfig.ssoUrl + - api_field: name + - api_field: spConfig.callbackUri + - api_field: spConfig.spCertificates.x509Certificate + - api_field: spConfig.spEntityId + - field: tenant + provider_only: true diff --git a/google/services/identityplatform/resource_identity_platform_tenant_oauth_idp_config_generated_meta.yaml b/google/services/identityplatform/resource_identity_platform_tenant_oauth_idp_config_generated_meta.yaml index 48c4168e3e0..3db5855d126 100644 --- a/google/services/identityplatform/resource_identity_platform_tenant_oauth_idp_config_generated_meta.yaml +++ b/google/services/identityplatform/resource_identity_platform_tenant_oauth_idp_config_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_identity_platform_tenant_oauth_idp_config' -generation_type: 'mmv1' -source_file: 'products/identityplatform/TenantOauthIdpConfig.yaml' -api_service_name: 'identitytoolkit.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'OAuthIdpConfig' +resource: google_identity_platform_tenant_oauth_idp_config +generation_type: mmv1 +source_file: products/identityplatform/TenantOauthIdpConfig.yaml +api_service_name: identitytoolkit.googleapis.com +api_version: v2 +api_resource_type_kind: OAuthIdpConfig fields: - - api_field: 'clientId' - - api_field: 'clientSecret' - - api_field: 'displayName' - - api_field: 'enabled' - - api_field: 'issuer' - - api_field: 'name' - - field: 'tenant' - provider_only: true + - api_field: clientId + - api_field: clientSecret + - api_field: displayName + - api_field: enabled + - api_field: issuer + - api_field: name + - field: tenant + provider_only: true diff --git a/google/services/integrationconnectors/resource_integration_connectors_connection_generated_meta.yaml b/google/services/integrationconnectors/resource_integration_connectors_connection_generated_meta.yaml index c0e103bb5ee..0533d5b31e3 100644 --- a/google/services/integrationconnectors/resource_integration_connectors_connection_generated_meta.yaml +++ b/google/services/integrationconnectors/resource_integration_connectors_connection_generated_meta.yaml @@ -1,158 +1,158 @@ -resource: 'google_integration_connectors_connection' -generation_type: 'mmv1' -source_file: 'products/integrationconnectors/Connection.yaml' -api_service_name: 'connectors.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Connection' +resource: google_integration_connectors_connection +generation_type: mmv1 +source_file: products/integrationconnectors/Connection.yaml +api_service_name: connectors.googleapis.com +api_version: v1 +api_resource_type_kind: Connection fields: - - api_field: 'authConfig.additionalVariables.boolValue' - field: 'auth_config.additional_variable.boolean_value' - - api_field: 'authConfig.additionalVariables.encryptionKeyValue.kmsKeyName' - field: 'auth_config.additional_variable.encryption_key_value.kms_key_name' - - api_field: 'authConfig.additionalVariables.encryptionKeyValue.type' - field: 'auth_config.additional_variable.encryption_key_value.type' - - api_field: 'authConfig.additionalVariables.intValue' - field: 'auth_config.additional_variable.integer_value' - - api_field: 'authConfig.additionalVariables.key' - field: 'auth_config.additional_variable.key' - - api_field: 'authConfig.additionalVariables.secretValue.secretVersion' - field: 'auth_config.additional_variable.secret_value.secret_version' - - api_field: 'authConfig.additionalVariables.stringValue' - field: 'auth_config.additional_variable.string_value' - - api_field: 'authConfig.authKey' - - api_field: 'authConfig.authType' - - api_field: 'authConfig.oauth2AuthCodeFlow.authUri' - - api_field: 'authConfig.oauth2AuthCodeFlow.clientId' - - api_field: 'authConfig.oauth2AuthCodeFlow.clientSecret.secretVersion' - - api_field: 'authConfig.oauth2AuthCodeFlow.enablePkce' - - api_field: 'authConfig.oauth2AuthCodeFlow.scopes' - - api_field: 'authConfig.oauth2ClientCredentials.clientId' - - api_field: 'authConfig.oauth2ClientCredentials.clientSecret.secretVersion' - - api_field: 'authConfig.oauth2JwtBearer.clientKey.secretVersion' - - api_field: 'authConfig.oauth2JwtBearer.jwtClaims.audience' - - api_field: 'authConfig.oauth2JwtBearer.jwtClaims.issuer' - - api_field: 'authConfig.oauth2JwtBearer.jwtClaims.subject' - - api_field: 'authConfig.sshPublicKey.certType' - - api_field: 'authConfig.sshPublicKey.sshClientCert.secretVersion' - - api_field: 'authConfig.sshPublicKey.sshClientCertPass.secretVersion' - - api_field: 'authConfig.sshPublicKey.username' - - api_field: 'authConfig.userPassword.password.secretVersion' - - api_field: 'authConfig.userPassword.username' - - api_field: 'configVariables.boolValue' - field: 'config_variable.boolean_value' - - api_field: 'configVariables.encryptionKeyValue.kmsKeyName' - field: 'config_variable.encryption_key_value.kms_key_name' - - api_field: 'configVariables.encryptionKeyValue.type' - field: 'config_variable.encryption_key_value.type' - - api_field: 'configVariables.intValue' - field: 'config_variable.integer_value' - - api_field: 'configVariables.key' - field: 'config_variable.key' - - api_field: 'configVariables.secretValue.secretVersion' - field: 'config_variable.secret_value.secret_version' - - api_field: 'configVariables.stringValue' - field: 'config_variable.string_value' - - api_field: 'connectionRevision' - - api_field: 'connectorVersion' - - api_field: 'connectorVersionInfraConfig.ratelimitThreshold' - - api_field: 'connectorVersionLaunchStage' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'destinationConfigs.destinations.host' - field: 'destination_config.destination.host' - - api_field: 'destinationConfigs.destinations.port' - field: 'destination_config.destination.port' - - api_field: 'destinationConfigs.destinations.serviceAttachment' - field: 'destination_config.destination.service_attachment' - - api_field: 'destinationConfigs.key' - field: 'destination_config.key' - - field: 'effective_labels' - provider_only: true - - api_field: 'eventingConfig.additionalVariables.boolValue' - field: 'eventing_config.additional_variable.boolean_value' - - api_field: 'eventingConfig.additionalVariables.encryptionKeyValue.kmsKeyName' - field: 'eventing_config.additional_variable.encryption_key_value.kms_key_name' - - api_field: 'eventingConfig.additionalVariables.encryptionKeyValue.type' - field: 'eventing_config.additional_variable.encryption_key_value.type' - - api_field: 'eventingConfig.additionalVariables.intValue' - field: 'eventing_config.additional_variable.integer_value' - - api_field: 'eventingConfig.additionalVariables.key' - field: 'eventing_config.additional_variable.key' - - api_field: 'eventingConfig.additionalVariables.secretValue.secretVersion' - field: 'eventing_config.additional_variable.secret_value.secret_version' - - api_field: 'eventingConfig.additionalVariables.stringValue' - field: 'eventing_config.additional_variable.string_value' - - api_field: 'eventingConfig.authConfig.additionalVariables.boolValue' - field: 'eventing_config.auth_config.additional_variable.boolean_value' - - api_field: 'eventingConfig.authConfig.additionalVariables.encryptionKeyValue.kmsKeyName' - field: 'eventing_config.auth_config.additional_variable.encryption_key_value.kms_key_name' - - api_field: 'eventingConfig.authConfig.additionalVariables.encryptionKeyValue.type' - field: 'eventing_config.auth_config.additional_variable.encryption_key_value.type' - - api_field: 'eventingConfig.authConfig.additionalVariables.intValue' - field: 'eventing_config.auth_config.additional_variable.integer_value' - - api_field: 'eventingConfig.authConfig.additionalVariables.key' - field: 'eventing_config.auth_config.additional_variable.key' - - api_field: 'eventingConfig.authConfig.additionalVariables.secretValue.secretVersion' - field: 'eventing_config.auth_config.additional_variable.secret_value.secret_version' - - api_field: 'eventingConfig.authConfig.additionalVariables.stringValue' - field: 'eventing_config.auth_config.additional_variable.string_value' - - api_field: 'eventingConfig.authConfig.authKey' - - api_field: 'eventingConfig.authConfig.authType' - - api_field: 'eventingConfig.authConfig.userPassword.password.secretVersion' - - api_field: 'eventingConfig.authConfig.userPassword.username' - - api_field: 'eventingConfig.enrichmentEnabled' - - api_field: 'eventingConfig.registrationDestinationConfig.destinations.host' - field: 'eventing_config.registration_destination_config.destination.host' - - api_field: 'eventingConfig.registrationDestinationConfig.destinations.port' - field: 'eventing_config.registration_destination_config.destination.port' - - api_field: 'eventingConfig.registrationDestinationConfig.destinations.serviceAttachment' - field: 'eventing_config.registration_destination_config.destination.service_attachment' - - api_field: 'eventingConfig.registrationDestinationConfig.key' - - api_field: 'eventingEnablementType' - - api_field: 'eventingRuntimeData.eventsListenerEndpoint' - - api_field: 'eventingRuntimeData.status.description' - - api_field: 'eventingRuntimeData.status.state' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'lockConfig.locked' - - api_field: 'lockConfig.reason' - - api_field: 'logConfig.enabled' - - api_field: 'logConfig.level' - - field: 'name' - provider_only: true - - api_field: 'nodeConfig.maxNodeCount' - - api_field: 'nodeConfig.minNodeCount' - - api_field: 'serviceAccount' - - api_field: 'serviceDirectory' - - api_field: 'sslConfig.additionalVariables.boolValue' - field: 'ssl_config.additional_variable.boolean_value' - - api_field: 'sslConfig.additionalVariables.encryptionKeyValue.kmsKeyName' - field: 'ssl_config.additional_variable.encryption_key_value.kms_key_name' - - api_field: 'sslConfig.additionalVariables.encryptionKeyValue.type' - field: 'ssl_config.additional_variable.encryption_key_value.type' - - api_field: 'sslConfig.additionalVariables.intValue' - field: 'ssl_config.additional_variable.integer_value' - - api_field: 'sslConfig.additionalVariables.key' - field: 'ssl_config.additional_variable.key' - - api_field: 'sslConfig.additionalVariables.secretValue.secretVersion' - field: 'ssl_config.additional_variable.secret_value.secret_version' - - api_field: 'sslConfig.additionalVariables.stringValue' - field: 'ssl_config.additional_variable.string_value' - - api_field: 'sslConfig.clientCertType' - - api_field: 'sslConfig.clientCertificate.secretVersion' - - api_field: 'sslConfig.clientPrivateKey.secretVersion' - - api_field: 'sslConfig.clientPrivateKeyPass.secretVersion' - - api_field: 'sslConfig.privateServerCertificate.secretVersion' - - api_field: 'sslConfig.serverCertType' - - api_field: 'sslConfig.trustModel' - - api_field: 'sslConfig.type' - - api_field: 'sslConfig.useSsl' - - api_field: 'status.description' - - api_field: 'status.state' - - api_field: 'status.status' - - api_field: 'subscriptionType' - - api_field: 'suspended' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: authConfig.additionalVariables.boolValue + field: auth_config.additional_variable.boolean_value + - api_field: authConfig.additionalVariables.encryptionKeyValue.kmsKeyName + field: auth_config.additional_variable.encryption_key_value.kms_key_name + - api_field: authConfig.additionalVariables.encryptionKeyValue.type + field: auth_config.additional_variable.encryption_key_value.type + - api_field: authConfig.additionalVariables.intValue + field: auth_config.additional_variable.integer_value + - api_field: authConfig.additionalVariables.key + field: auth_config.additional_variable.key + - api_field: authConfig.additionalVariables.secretValue.secretVersion + field: auth_config.additional_variable.secret_value.secret_version + - api_field: authConfig.additionalVariables.stringValue + field: auth_config.additional_variable.string_value + - api_field: authConfig.authKey + - api_field: authConfig.authType + - api_field: authConfig.oauth2AuthCodeFlow.authUri + - api_field: authConfig.oauth2AuthCodeFlow.clientId + - api_field: authConfig.oauth2AuthCodeFlow.clientSecret.secretVersion + - api_field: authConfig.oauth2AuthCodeFlow.enablePkce + - api_field: authConfig.oauth2AuthCodeFlow.scopes + - api_field: authConfig.oauth2ClientCredentials.clientId + - api_field: authConfig.oauth2ClientCredentials.clientSecret.secretVersion + - api_field: authConfig.oauth2JwtBearer.clientKey.secretVersion + - api_field: authConfig.oauth2JwtBearer.jwtClaims.audience + - api_field: authConfig.oauth2JwtBearer.jwtClaims.issuer + - api_field: authConfig.oauth2JwtBearer.jwtClaims.subject + - api_field: authConfig.sshPublicKey.certType + - api_field: authConfig.sshPublicKey.sshClientCert.secretVersion + - api_field: authConfig.sshPublicKey.sshClientCertPass.secretVersion + - api_field: authConfig.sshPublicKey.username + - api_field: authConfig.userPassword.password.secretVersion + - api_field: authConfig.userPassword.username + - api_field: configVariables.boolValue + field: config_variable.boolean_value + - api_field: configVariables.encryptionKeyValue.kmsKeyName + field: config_variable.encryption_key_value.kms_key_name + - api_field: configVariables.encryptionKeyValue.type + field: config_variable.encryption_key_value.type + - api_field: configVariables.intValue + field: config_variable.integer_value + - api_field: configVariables.key + field: config_variable.key + - api_field: configVariables.secretValue.secretVersion + field: config_variable.secret_value.secret_version + - api_field: configVariables.stringValue + field: config_variable.string_value + - api_field: connectionRevision + - api_field: connectorVersion + - api_field: connectorVersionInfraConfig.ratelimitThreshold + - api_field: connectorVersionLaunchStage + - api_field: createTime + - api_field: description + - api_field: destinationConfigs.destinations.host + field: destination_config.destination.host + - api_field: destinationConfigs.destinations.port + field: destination_config.destination.port + - api_field: destinationConfigs.destinations.serviceAttachment + field: destination_config.destination.service_attachment + - api_field: destinationConfigs.key + field: destination_config.key + - field: effective_labels + provider_only: true + - api_field: eventingConfig.additionalVariables.boolValue + field: eventing_config.additional_variable.boolean_value + - api_field: eventingConfig.additionalVariables.encryptionKeyValue.kmsKeyName + field: eventing_config.additional_variable.encryption_key_value.kms_key_name + - api_field: eventingConfig.additionalVariables.encryptionKeyValue.type + field: eventing_config.additional_variable.encryption_key_value.type + - api_field: eventingConfig.additionalVariables.intValue + field: eventing_config.additional_variable.integer_value + - api_field: eventingConfig.additionalVariables.key + field: eventing_config.additional_variable.key + - api_field: eventingConfig.additionalVariables.secretValue.secretVersion + field: eventing_config.additional_variable.secret_value.secret_version + - api_field: eventingConfig.additionalVariables.stringValue + field: eventing_config.additional_variable.string_value + - api_field: eventingConfig.authConfig.additionalVariables.boolValue + field: eventing_config.auth_config.additional_variable.boolean_value + - api_field: eventingConfig.authConfig.additionalVariables.encryptionKeyValue.kmsKeyName + field: eventing_config.auth_config.additional_variable.encryption_key_value.kms_key_name + - api_field: eventingConfig.authConfig.additionalVariables.encryptionKeyValue.type + field: eventing_config.auth_config.additional_variable.encryption_key_value.type + - api_field: eventingConfig.authConfig.additionalVariables.intValue + field: eventing_config.auth_config.additional_variable.integer_value + - api_field: eventingConfig.authConfig.additionalVariables.key + field: eventing_config.auth_config.additional_variable.key + - api_field: eventingConfig.authConfig.additionalVariables.secretValue.secretVersion + field: eventing_config.auth_config.additional_variable.secret_value.secret_version + - api_field: eventingConfig.authConfig.additionalVariables.stringValue + field: eventing_config.auth_config.additional_variable.string_value + - api_field: eventingConfig.authConfig.authKey + - api_field: eventingConfig.authConfig.authType + - api_field: eventingConfig.authConfig.userPassword.password.secretVersion + - api_field: eventingConfig.authConfig.userPassword.username + - api_field: eventingConfig.enrichmentEnabled + - api_field: eventingConfig.registrationDestinationConfig.destinations.host + field: eventing_config.registration_destination_config.destination.host + - api_field: eventingConfig.registrationDestinationConfig.destinations.port + field: eventing_config.registration_destination_config.destination.port + - api_field: eventingConfig.registrationDestinationConfig.destinations.serviceAttachment + field: eventing_config.registration_destination_config.destination.service_attachment + - api_field: eventingConfig.registrationDestinationConfig.key + - api_field: eventingEnablementType + - api_field: eventingRuntimeData.eventsListenerEndpoint + - api_field: eventingRuntimeData.status.description + - api_field: eventingRuntimeData.status.state + - api_field: labels + - field: location + provider_only: true + - api_field: lockConfig.locked + - api_field: lockConfig.reason + - api_field: logConfig.enabled + - api_field: logConfig.level + - field: name + provider_only: true + - api_field: nodeConfig.maxNodeCount + - api_field: nodeConfig.minNodeCount + - api_field: serviceAccount + - api_field: serviceDirectory + - api_field: sslConfig.additionalVariables.boolValue + field: ssl_config.additional_variable.boolean_value + - api_field: sslConfig.additionalVariables.encryptionKeyValue.kmsKeyName + field: ssl_config.additional_variable.encryption_key_value.kms_key_name + - api_field: sslConfig.additionalVariables.encryptionKeyValue.type + field: ssl_config.additional_variable.encryption_key_value.type + - api_field: sslConfig.additionalVariables.intValue + field: ssl_config.additional_variable.integer_value + - api_field: sslConfig.additionalVariables.key + field: ssl_config.additional_variable.key + - api_field: sslConfig.additionalVariables.secretValue.secretVersion + field: ssl_config.additional_variable.secret_value.secret_version + - api_field: sslConfig.additionalVariables.stringValue + field: ssl_config.additional_variable.string_value + - api_field: sslConfig.clientCertType + - api_field: sslConfig.clientCertificate.secretVersion + - api_field: sslConfig.clientPrivateKey.secretVersion + - api_field: sslConfig.clientPrivateKeyPass.secretVersion + - api_field: sslConfig.privateServerCertificate.secretVersion + - api_field: sslConfig.serverCertType + - api_field: sslConfig.trustModel + - api_field: sslConfig.type + - api_field: sslConfig.useSsl + - api_field: status.description + - api_field: status.state + - api_field: status.status + - api_field: subscriptionType + - api_field: suspended + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/integrationconnectors/resource_integration_connectors_endpoint_attachment_generated_meta.yaml b/google/services/integrationconnectors/resource_integration_connectors_endpoint_attachment_generated_meta.yaml index cf61d943d0b..4bc190eb6a0 100644 --- a/google/services/integrationconnectors/resource_integration_connectors_endpoint_attachment_generated_meta.yaml +++ b/google/services/integrationconnectors/resource_integration_connectors_endpoint_attachment_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_integration_connectors_endpoint_attachment' -generation_type: 'mmv1' -source_file: 'products/integrationconnectors/EndpointAttachment.yaml' -api_service_name: 'connectors.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EndpointAttachment' +resource: google_integration_connectors_endpoint_attachment +generation_type: mmv1 +source_file: products/integrationconnectors/EndpointAttachment.yaml +api_service_name: connectors.googleapis.com +api_version: v1 +api_resource_type_kind: EndpointAttachment fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'endpointGlobalAccess' - - api_field: 'endpointIp' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'serviceAttachment' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: endpointGlobalAccess + - api_field: endpointIp + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: serviceAttachment + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/integrationconnectors/resource_integration_connectors_managed_zone_generated_meta.yaml b/google/services/integrationconnectors/resource_integration_connectors_managed_zone_generated_meta.yaml index 9b237935c3f..36f5b10b9e9 100644 --- a/google/services/integrationconnectors/resource_integration_connectors_managed_zone_generated_meta.yaml +++ b/google/services/integrationconnectors/resource_integration_connectors_managed_zone_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_integration_connectors_managed_zone' -generation_type: 'mmv1' -source_file: 'products/integrationconnectors/ManagedZone.yaml' -api_service_name: 'connectors.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ManagedZone' +resource: google_integration_connectors_managed_zone +generation_type: mmv1 +source_file: products/integrationconnectors/ManagedZone.yaml +api_service_name: connectors.googleapis.com +api_version: v1 +api_resource_type_kind: ManagedZone fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'dns' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'targetProject' - - api_field: 'targetVpc' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: dns + - field: effective_labels + provider_only: true + - api_field: labels + - field: name + provider_only: true + - api_field: targetProject + - api_field: targetVpc + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/integrations/resource_integrations_auth_config_generated_meta.yaml b/google/services/integrations/resource_integrations_auth_config_generated_meta.yaml index a00ecea2cb2..f7ef62c0e1b 100644 --- a/google/services/integrations/resource_integrations_auth_config_generated_meta.yaml +++ b/google/services/integrations/resource_integrations_auth_config_generated_meta.yaml @@ -1,57 +1,57 @@ -resource: 'google_integrations_auth_config' -generation_type: 'mmv1' -source_file: 'products/integrations/AuthConfig.yaml' -api_service_name: 'integrations.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AuthConfig' +resource: google_integrations_auth_config +generation_type: mmv1 +source_file: products/integrations/AuthConfig.yaml +api_service_name: integrations.googleapis.com +api_version: v1 +api_resource_type_kind: AuthConfig api_variant_patterns: - - 'projects/{project}/locations/{location}/authConfigs/{authConfig}' + - projects/{project}/locations/{location}/authConfigs/{authConfig} fields: - - api_field: 'certificateId' - - api_field: 'client_certificate.encrypted_private_key' - - api_field: 'client_certificate.passphrase' - - api_field: 'client_certificate.ssl_certificate' - - api_field: 'createTime' - - api_field: 'creatorEmail' - - api_field: 'credentialType' - - api_field: 'decryptedCredential.authToken.token' - - api_field: 'decryptedCredential.authToken.type' - - api_field: 'decryptedCredential.credentialType' - - api_field: 'decryptedCredential.jwt.jwt' - - api_field: 'decryptedCredential.jwt.jwtHeader' - - api_field: 'decryptedCredential.jwt.jwtPayload' - - api_field: 'decryptedCredential.jwt.secret' - - api_field: 'decryptedCredential.oauth2AuthorizationCode.authEndpoint' - - api_field: 'decryptedCredential.oauth2AuthorizationCode.clientId' - - api_field: 'decryptedCredential.oauth2AuthorizationCode.clientSecret' - - api_field: 'decryptedCredential.oauth2AuthorizationCode.scope' - - api_field: 'decryptedCredential.oauth2AuthorizationCode.tokenEndpoint' - - api_field: 'decryptedCredential.oauth2ClientCredentials.clientId' - - api_field: 'decryptedCredential.oauth2ClientCredentials.clientSecret' - - api_field: 'decryptedCredential.oauth2ClientCredentials.requestType' - - api_field: 'decryptedCredential.oauth2ClientCredentials.scope' - - api_field: 'decryptedCredential.oauth2ClientCredentials.tokenEndpoint' - - api_field: 'decryptedCredential.oauth2ClientCredentials.tokenParams.entries.key.literalValue.stringValue' - - api_field: 'decryptedCredential.oauth2ClientCredentials.tokenParams.entries.value.literalValue.stringValue' - - api_field: 'decryptedCredential.oidcToken.audience' - - api_field: 'decryptedCredential.oidcToken.serviceAccountEmail' - - api_field: 'decryptedCredential.oidcToken.token' - - api_field: 'decryptedCredential.oidcToken.tokenExpireTime' - - api_field: 'decryptedCredential.serviceAccountCredentials.scope' - - api_field: 'decryptedCredential.serviceAccountCredentials.serviceAccount' - - api_field: 'decryptedCredential.usernameAndPassword.password' - - api_field: 'decryptedCredential.usernameAndPassword.username' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'encryptedCredential' - - api_field: 'expiryNotificationDuration' - - api_field: 'lastModifierEmail' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'overrideValidTime' - - api_field: 'reason' - - api_field: 'state' - - api_field: 'updateTime' - - api_field: 'validTime' - - api_field: 'visibility' + - api_field: certificateId + - api_field: client_certificate.encrypted_private_key + - api_field: client_certificate.passphrase + - api_field: client_certificate.ssl_certificate + - api_field: createTime + - api_field: creatorEmail + - api_field: credentialType + - api_field: decryptedCredential.authToken.token + - api_field: decryptedCredential.authToken.type + - api_field: decryptedCredential.credentialType + - api_field: decryptedCredential.jwt.jwt + - api_field: decryptedCredential.jwt.jwtHeader + - api_field: decryptedCredential.jwt.jwtPayload + - api_field: decryptedCredential.jwt.secret + - api_field: decryptedCredential.oauth2AuthorizationCode.authEndpoint + - api_field: decryptedCredential.oauth2AuthorizationCode.clientId + - api_field: decryptedCredential.oauth2AuthorizationCode.clientSecret + - api_field: decryptedCredential.oauth2AuthorizationCode.scope + - api_field: decryptedCredential.oauth2AuthorizationCode.tokenEndpoint + - api_field: decryptedCredential.oauth2ClientCredentials.clientId + - api_field: decryptedCredential.oauth2ClientCredentials.clientSecret + - api_field: decryptedCredential.oauth2ClientCredentials.requestType + - api_field: decryptedCredential.oauth2ClientCredentials.scope + - api_field: decryptedCredential.oauth2ClientCredentials.tokenEndpoint + - api_field: decryptedCredential.oauth2ClientCredentials.tokenParams.entries.key.literalValue.stringValue + - api_field: decryptedCredential.oauth2ClientCredentials.tokenParams.entries.value.literalValue.stringValue + - api_field: decryptedCredential.oidcToken.audience + - api_field: decryptedCredential.oidcToken.serviceAccountEmail + - api_field: decryptedCredential.oidcToken.token + - api_field: decryptedCredential.oidcToken.tokenExpireTime + - api_field: decryptedCredential.serviceAccountCredentials.scope + - api_field: decryptedCredential.serviceAccountCredentials.serviceAccount + - api_field: decryptedCredential.usernameAndPassword.password + - api_field: decryptedCredential.usernameAndPassword.username + - api_field: description + - api_field: displayName + - api_field: encryptedCredential + - api_field: expiryNotificationDuration + - api_field: lastModifierEmail + - field: location + provider_only: true + - api_field: name + - api_field: overrideValidTime + - api_field: reason + - api_field: state + - api_field: updateTime + - api_field: validTime + - api_field: visibility diff --git a/google/services/integrations/resource_integrations_client_generated_meta.yaml b/google/services/integrations/resource_integrations_client_generated_meta.yaml index e5783329e02..e13006ad520 100644 --- a/google/services/integrations/resource_integrations_client_generated_meta.yaml +++ b/google/services/integrations/resource_integrations_client_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_integrations_client' -generation_type: 'mmv1' -source_file: 'products/integrations/Client.yaml' -api_service_name: 'integrations.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Client' +resource: google_integrations_client +generation_type: mmv1 +source_file: products/integrations/Client.yaml +api_service_name: integrations.googleapis.com +api_version: v1 +api_resource_type_kind: Client fields: - - api_field: 'cloudKmsConfig.key' - - api_field: 'cloudKmsConfig.keyVersion' - - api_field: 'cloudKmsConfig.kmsLocation' - - api_field: 'cloudKmsConfig.kmsProjectId' - - api_field: 'cloudKmsConfig.kmsRing' - - api_field: 'createSampleIntegrations' - - field: 'location' - provider_only: true - - api_field: 'runAsServiceAccount' + - api_field: cloudKmsConfig.key + - api_field: cloudKmsConfig.keyVersion + - api_field: cloudKmsConfig.kmsLocation + - api_field: cloudKmsConfig.kmsProjectId + - api_field: cloudKmsConfig.kmsRing + - api_field: createSampleIntegrations + - field: location + provider_only: true + - api_field: runAsServiceAccount diff --git a/google/services/kms/resource_kms_autokey_config_generated_meta.yaml b/google/services/kms/resource_kms_autokey_config_generated_meta.yaml index 0cde2b1a182..f5cd4df920a 100644 --- a/google/services/kms/resource_kms_autokey_config_generated_meta.yaml +++ b/google/services/kms/resource_kms_autokey_config_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_kms_autokey_config' -generation_type: 'mmv1' -source_file: 'products/kms/AutokeyConfig.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AutokeyConfig' +resource: google_kms_autokey_config +generation_type: mmv1 +source_file: products/kms/AutokeyConfig.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: AutokeyConfig fields: - - api_field: 'etag' - - field: 'folder' - provider_only: true - - api_field: 'keyProject' + - api_field: etag + - field: folder + provider_only: true + - api_field: keyProject diff --git a/google/services/kms/resource_kms_crypto_key_generated_meta.yaml b/google/services/kms/resource_kms_crypto_key_generated_meta.yaml index 114b849232e..7d38493dc75 100644 --- a/google/services/kms/resource_kms_crypto_key_generated_meta.yaml +++ b/google/services/kms/resource_kms_crypto_key_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_kms_crypto_key' -generation_type: 'mmv1' -source_file: 'products/kms/CryptoKey.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CryptoKey' +resource: google_kms_crypto_key +generation_type: mmv1 +source_file: products/kms/CryptoKey.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: CryptoKey fields: - - api_field: 'cryptoKeyBackend' - - api_field: 'destroyScheduledDuration' - - field: 'effective_labels' - provider_only: true - - api_field: 'importOnly' - - field: 'key_ring' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'primary.name' - - api_field: 'primary.state' - - api_field: 'purpose' - - api_field: 'rotationPeriod' - - field: 'skip_initial_version_creation' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'versionTemplate.algorithm' - - api_field: 'versionTemplate.protectionLevel' + - api_field: cryptoKeyBackend + - api_field: destroyScheduledDuration + - field: effective_labels + provider_only: true + - api_field: importOnly + - field: key_ring + provider_only: true + - api_field: labels + - field: name + provider_only: true + - api_field: primary.name + - api_field: primary.state + - api_field: purpose + - api_field: rotationPeriod + - field: skip_initial_version_creation + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: versionTemplate.algorithm + - api_field: versionTemplate.protectionLevel diff --git a/google/services/kms/resource_kms_crypto_key_version_generated_meta.yaml b/google/services/kms/resource_kms_crypto_key_version_generated_meta.yaml index 8407adbb23d..644738b13ce 100644 --- a/google/services/kms/resource_kms_crypto_key_version_generated_meta.yaml +++ b/google/services/kms/resource_kms_crypto_key_version_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_kms_crypto_key_version' -generation_type: 'mmv1' -source_file: 'products/kms/CryptoKeyVersion.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CryptoKeyVersion' +resource: google_kms_crypto_key_version +generation_type: mmv1 +source_file: products/kms/CryptoKeyVersion.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: CryptoKeyVersion fields: - - api_field: 'algorithm' - - api_field: 'attestation.certChains.caviumCerts' - - api_field: 'attestation.certChains.googleCardCerts' - - api_field: 'attestation.certChains.googlePartitionCerts' - - api_field: 'attestation.content' - - api_field: 'attestation.externalProtectionLevelOptions.ekmConnectionKeyPath' - - api_field: 'attestation.externalProtectionLevelOptions.externalKeyUri' - - api_field: 'attestation.format' - - field: 'crypto_key' - provider_only: true - - api_field: 'externalProtectionLevelOptions.ekmConnectionKeyPath' - - api_field: 'externalProtectionLevelOptions.externalKeyUri' - - api_field: 'generateTime' - - api_field: 'name' - - api_field: 'protectionLevel' - - api_field: 'state' + - api_field: algorithm + - api_field: attestation.certChains.caviumCerts + - api_field: attestation.certChains.googleCardCerts + - api_field: attestation.certChains.googlePartitionCerts + - api_field: attestation.content + - api_field: attestation.externalProtectionLevelOptions.ekmConnectionKeyPath + - api_field: attestation.externalProtectionLevelOptions.externalKeyUri + - api_field: attestation.format + - field: crypto_key + provider_only: true + - api_field: externalProtectionLevelOptions.ekmConnectionKeyPath + - api_field: externalProtectionLevelOptions.externalKeyUri + - api_field: generateTime + - api_field: name + - api_field: protectionLevel + - api_field: state diff --git a/google/services/kms/resource_kms_ekm_connection_generated_meta.yaml b/google/services/kms/resource_kms_ekm_connection_generated_meta.yaml index 7db33203774..90988f38af2 100644 --- a/google/services/kms/resource_kms_ekm_connection_generated_meta.yaml +++ b/google/services/kms/resource_kms_ekm_connection_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_kms_ekm_connection' -generation_type: 'mmv1' -source_file: 'products/kms/EkmConnection.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EkmConnection' +resource: google_kms_ekm_connection +generation_type: mmv1 +source_file: products/kms/EkmConnection.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: EkmConnection fields: - - api_field: 'createTime' - - api_field: 'cryptoSpacePath' - - api_field: 'etag' - - api_field: 'keyManagementMode' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'serviceResolvers.endpointFilter' - - api_field: 'serviceResolvers.hostname' - - api_field: 'serviceResolvers.serverCertificates.issuer' - - api_field: 'serviceResolvers.serverCertificates.notAfterTime' - - api_field: 'serviceResolvers.serverCertificates.notBeforeTime' - - api_field: 'serviceResolvers.serverCertificates.parsed' - - api_field: 'serviceResolvers.serverCertificates.rawDer' - - api_field: 'serviceResolvers.serverCertificates.serialNumber' - - api_field: 'serviceResolvers.serverCertificates.sha256Fingerprint' - - api_field: 'serviceResolvers.serverCertificates.subject' - - api_field: 'serviceResolvers.serverCertificates.subjectAlternativeDnsNames' - - api_field: 'serviceResolvers.serviceDirectoryService' + - api_field: createTime + - api_field: cryptoSpacePath + - api_field: etag + - api_field: keyManagementMode + - field: location + provider_only: true + - api_field: name + - api_field: serviceResolvers.endpointFilter + - api_field: serviceResolvers.hostname + - api_field: serviceResolvers.serverCertificates.issuer + - api_field: serviceResolvers.serverCertificates.notAfterTime + - api_field: serviceResolvers.serverCertificates.notBeforeTime + - api_field: serviceResolvers.serverCertificates.parsed + - api_field: serviceResolvers.serverCertificates.rawDer + - api_field: serviceResolvers.serverCertificates.serialNumber + - api_field: serviceResolvers.serverCertificates.sha256Fingerprint + - api_field: serviceResolvers.serverCertificates.subject + - api_field: serviceResolvers.serverCertificates.subjectAlternativeDnsNames + - api_field: serviceResolvers.serviceDirectoryService diff --git a/google/services/kms/resource_kms_key_handle_generated_meta.yaml b/google/services/kms/resource_kms_key_handle_generated_meta.yaml index 4632304a252..6e1aa7aa573 100644 --- a/google/services/kms/resource_kms_key_handle_generated_meta.yaml +++ b/google/services/kms/resource_kms_key_handle_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_kms_key_handle' -generation_type: 'mmv1' -source_file: 'products/kms/KeyHandle.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'KeyHandle' +resource: google_kms_key_handle +generation_type: mmv1 +source_file: products/kms/KeyHandle.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: KeyHandle fields: - - api_field: 'kmsKey' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'resourceTypeSelector' + - api_field: kmsKey + - field: location + provider_only: true + - api_field: name + - api_field: resourceTypeSelector diff --git a/google/services/kms/resource_kms_key_ring_generated_meta.yaml b/google/services/kms/resource_kms_key_ring_generated_meta.yaml index 7a7b2c34b91..4d326d8d550 100644 --- a/google/services/kms/resource_kms_key_ring_generated_meta.yaml +++ b/google/services/kms/resource_kms_key_ring_generated_meta.yaml @@ -1,9 +1,9 @@ -resource: 'google_kms_key_ring' -generation_type: 'mmv1' -source_file: 'products/kms/KeyRing.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'KeyRing' +resource: google_kms_key_ring +generation_type: mmv1 +source_file: products/kms/KeyRing.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: KeyRing fields: - - api_field: 'location' - - api_field: 'name' + - api_field: location + - api_field: name diff --git a/google/services/kms/resource_kms_key_ring_import_job_generated_meta.yaml b/google/services/kms/resource_kms_key_ring_import_job_generated_meta.yaml index 0d3689f49c2..c55568518b0 100644 --- a/google/services/kms/resource_kms_key_ring_import_job_generated_meta.yaml +++ b/google/services/kms/resource_kms_key_ring_import_job_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_kms_key_ring_import_job' -generation_type: 'mmv1' -source_file: 'products/kms/KeyRingImportJob.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ImportJob' -cai_asset_name_format: '//cloudkms.googleapis.com/{{key_ring}}/importJobs/{{import_job_id}}' +resource: google_kms_key_ring_import_job +generation_type: mmv1 +source_file: products/kms/KeyRingImportJob.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: ImportJob +cai_asset_name_format: //cloudkms.googleapis.com/{{key_ring}}/importJobs/{{import_job_id}} fields: - - api_field: 'attestation.content' - - api_field: 'attestation.format' - - api_field: 'expireTime' - - field: 'import_job_id' - provider_only: true - - api_field: 'importMethod' - - field: 'key_ring' - provider_only: true - - api_field: 'name' - - api_field: 'protectionLevel' - - api_field: 'publicKey.pem' - - api_field: 'state' + - api_field: attestation.content + - api_field: attestation.format + - api_field: expireTime + - field: import_job_id + provider_only: true + - api_field: importMethod + - field: key_ring + provider_only: true + - api_field: name + - api_field: protectionLevel + - api_field: publicKey.pem + - api_field: state diff --git a/google/services/kms/resource_kms_secret_ciphertext_generated_meta.yaml b/google/services/kms/resource_kms_secret_ciphertext_generated_meta.yaml index 97efee68ccb..d71e1dde64a 100644 --- a/google/services/kms/resource_kms_secret_ciphertext_generated_meta.yaml +++ b/google/services/kms/resource_kms_secret_ciphertext_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_kms_secret_ciphertext' -generation_type: 'mmv1' -source_file: 'products/kms/SecretCiphertext.yaml' -api_service_name: 'cloudkms.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CryptoKey' +resource: google_kms_secret_ciphertext +generation_type: mmv1 +source_file: products/kms/SecretCiphertext.yaml +api_service_name: cloudkms.googleapis.com +api_version: v1 +api_resource_type_kind: CryptoKey fields: - - api_field: 'additionalAuthenticatedData' - - api_field: 'ciphertext' - - field: 'crypto_key' - provider_only: true - - api_field: 'plaintext' + - api_field: additionalAuthenticatedData + - api_field: ciphertext + - field: crypto_key + provider_only: true + - api_field: plaintext diff --git a/google/services/logging/iam_logging_log_view_generated_test.go b/google/services/logging/iam_logging_log_view_generated_test.go index 04b61aecb58..23fa2bb6d27 100644 --- a/google/services/logging/iam_logging_log_view_generated_test.go +++ b/google/services/logging/iam_logging_log_view_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -645,3 +646,59 @@ resource "google_logging_log_view_iam_policy" "foo" { } `, context) } +func generateLoggingLogViewIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + parent := rawState["parent"] + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + bucket := tpgresource.GetResourceNameFromSelfLink(rawState["bucket"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/locations/%s/buckets/%s/views/%s", parent, location, bucket, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateLoggingLogViewIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + parent := rawState["parent"] + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + bucket := tpgresource.GetResourceNameFromSelfLink(rawState["bucket"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/locations/%s/buckets/%s/views/%s", parent, location, bucket, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateLoggingLogViewIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + parent := rawState["parent"] + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + bucket := tpgresource.GetResourceNameFromSelfLink(rawState["bucket"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("%s/locations/%s/buckets/%s/views/%s", parent, location, bucket, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/logging/resource_logging_folder_settings_generated_meta.yaml b/google/services/logging/resource_logging_folder_settings_generated_meta.yaml index 57b2d287977..38372186722 100644 --- a/google/services/logging/resource_logging_folder_settings_generated_meta.yaml +++ b/google/services/logging/resource_logging_folder_settings_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_logging_folder_settings' -generation_type: 'mmv1' -source_file: 'products/logging/FolderSettings.yaml' -api_service_name: 'logging.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Settings' +resource: google_logging_folder_settings +generation_type: mmv1 +source_file: products/logging/FolderSettings.yaml +api_service_name: logging.googleapis.com +api_version: v2 +api_resource_type_kind: Settings api_variant_patterns: - - 'folders/{folder}/settings' + - folders/{folder}/settings fields: - - api_field: 'disableDefaultSink' - - field: 'folder' - provider_only: true - - api_field: 'kmsKeyName' - - api_field: 'kmsServiceAccountId' - - api_field: 'loggingServiceAccountId' - - api_field: 'name' - - api_field: 'storageLocation' + - api_field: disableDefaultSink + - field: folder + provider_only: true + - api_field: kmsKeyName + - api_field: kmsServiceAccountId + - api_field: loggingServiceAccountId + - api_field: name + - api_field: storageLocation diff --git a/google/services/logging/resource_logging_linked_dataset_generated_meta.yaml b/google/services/logging/resource_logging_linked_dataset_generated_meta.yaml index 16c97c78f66..a0396adf1f1 100644 --- a/google/services/logging/resource_logging_linked_dataset_generated_meta.yaml +++ b/google/services/logging/resource_logging_linked_dataset_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_logging_linked_dataset' -generation_type: 'mmv1' -source_file: 'products/logging/LinkedDataset.yaml' -api_service_name: 'logging.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Link' +resource: google_logging_linked_dataset +generation_type: mmv1 +source_file: products/logging/LinkedDataset.yaml +api_service_name: logging.googleapis.com +api_version: v2 +api_resource_type_kind: Link api_variant_patterns: - - 'billingAccounts/{billingAccount}/locations/{location}/buckets/{bucket}/links/{link}' - - 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}' - - 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}' - - 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}' + - billingAccounts/{billingAccount}/locations/{location}/buckets/{bucket}/links/{link} + - folders/{folder}/locations/{location}/buckets/{bucket}/links/{link} + - organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link} + - projects/{project}/locations/{location}/buckets/{bucket}/links/{link} fields: - - api_field: 'bigqueryDataset.datasetId' - - field: 'bucket' - provider_only: true - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'lifecycleState' - - field: 'link_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true + - api_field: bigqueryDataset.datasetId + - field: bucket + provider_only: true + - api_field: createTime + - api_field: description + - api_field: lifecycleState + - field: link_id + provider_only: true + - field: location + provider_only: true + - api_field: name + - field: parent + provider_only: true diff --git a/google/services/logging/resource_logging_log_scope_generated_meta.yaml b/google/services/logging/resource_logging_log_scope_generated_meta.yaml index 65fdc9ad689..1b5e851351d 100644 --- a/google/services/logging/resource_logging_log_scope_generated_meta.yaml +++ b/google/services/logging/resource_logging_log_scope_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_logging_log_scope' -generation_type: 'mmv1' -source_file: 'products/logging/LogScope.yaml' -api_service_name: 'logging.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'LogScope' +resource: google_logging_log_scope +generation_type: mmv1 +source_file: products/logging/LogScope.yaml +api_service_name: logging.googleapis.com +api_version: v2 +api_resource_type_kind: LogScope fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'resourceNames' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: location + provider_only: true + - api_field: name + - field: parent + provider_only: true + - api_field: resourceNames + - api_field: updateTime diff --git a/google/services/logging/resource_logging_log_view_generated_meta.yaml b/google/services/logging/resource_logging_log_view_generated_meta.yaml index 95001e7a4e8..35c8131ddc8 100644 --- a/google/services/logging/resource_logging_log_view_generated_meta.yaml +++ b/google/services/logging/resource_logging_log_view_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_logging_log_view' -generation_type: 'mmv1' -source_file: 'products/logging/LogView.yaml' -api_service_name: 'logging.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'LogView' +resource: google_logging_log_view +generation_type: mmv1 +source_file: products/logging/LogView.yaml +api_service_name: logging.googleapis.com +api_version: v2 +api_resource_type_kind: LogView api_variant_patterns: - - 'billingAccounts/{billingAccount}/locations/{location}/buckets/{bucket}/views/{view}' - - 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}' - - 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}' - - 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}' + - billingAccounts/{billingAccount}/locations/{location}/buckets/{bucket}/views/{view} + - folders/{folder}/locations/{location}/buckets/{bucket}/views/{view} + - organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view} + - projects/{project}/locations/{location}/buckets/{bucket}/views/{view} fields: - - field: 'bucket' - provider_only: true - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'filter' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'updateTime' + - field: bucket + provider_only: true + - api_field: createTime + - api_field: description + - api_field: filter + - field: location + provider_only: true + - api_field: name + - field: parent + provider_only: true + - api_field: updateTime diff --git a/google/services/logging/resource_logging_metric_generated_meta.yaml b/google/services/logging/resource_logging_metric_generated_meta.yaml index 2306acf5bf5..ed0b5cf0a79 100644 --- a/google/services/logging/resource_logging_metric_generated_meta.yaml +++ b/google/services/logging/resource_logging_metric_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_logging_metric' -generation_type: 'mmv1' -source_file: 'products/logging/Metric.yaml' -api_service_name: 'logging.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'LogMetric' -cai_asset_name_format: '//logging.googleapis.com/projects/{{project}}/metrics/{{%name}}' +resource: google_logging_metric +generation_type: mmv1 +source_file: products/logging/Metric.yaml +api_service_name: logging.googleapis.com +api_version: v2 +api_resource_type_kind: LogMetric +cai_asset_name_format: //logging.googleapis.com/projects/{{project}}/metrics/{{%name}} fields: - - api_field: 'bucketName' - - api_field: 'bucketOptions.explicitBuckets.bounds' - - api_field: 'bucketOptions.exponentialBuckets.growthFactor' - - api_field: 'bucketOptions.exponentialBuckets.numFiniteBuckets' - - api_field: 'bucketOptions.exponentialBuckets.scale' - - api_field: 'bucketOptions.linearBuckets.numFiniteBuckets' - - api_field: 'bucketOptions.linearBuckets.offset' - - api_field: 'bucketOptions.linearBuckets.width' - - api_field: 'description' - - api_field: 'disabled' - - api_field: 'filter' - - api_field: 'labelExtractors' - - api_field: 'metricDescriptor.displayName' - - api_field: 'metricDescriptor.labels.description' - - api_field: 'metricDescriptor.labels.key' - - api_field: 'metricDescriptor.labels.valueType' - - api_field: 'metricDescriptor.metricKind' - - api_field: 'metricDescriptor.unit' - - api_field: 'metricDescriptor.valueType' - - api_field: 'name' - - api_field: 'valueExtractor' + - api_field: bucketName + - api_field: bucketOptions.explicitBuckets.bounds + - api_field: bucketOptions.exponentialBuckets.growthFactor + - api_field: bucketOptions.exponentialBuckets.numFiniteBuckets + - api_field: bucketOptions.exponentialBuckets.scale + - api_field: bucketOptions.linearBuckets.numFiniteBuckets + - api_field: bucketOptions.linearBuckets.offset + - api_field: bucketOptions.linearBuckets.width + - api_field: description + - api_field: disabled + - api_field: filter + - api_field: labelExtractors + - api_field: metricDescriptor.displayName + - api_field: metricDescriptor.labels.description + - api_field: metricDescriptor.labels.key + - api_field: metricDescriptor.labels.valueType + - api_field: metricDescriptor.metricKind + - api_field: metricDescriptor.unit + - api_field: metricDescriptor.valueType + - api_field: name + - api_field: valueExtractor diff --git a/google/services/logging/resource_logging_organization_settings_generated_meta.yaml b/google/services/logging/resource_logging_organization_settings_generated_meta.yaml index 456ba9d9af8..9d412ec3ce9 100644 --- a/google/services/logging/resource_logging_organization_settings_generated_meta.yaml +++ b/google/services/logging/resource_logging_organization_settings_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_logging_organization_settings' -generation_type: 'mmv1' -source_file: 'products/logging/OrganizationSettings.yaml' -api_service_name: 'logging.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Settings' +resource: google_logging_organization_settings +generation_type: mmv1 +source_file: products/logging/OrganizationSettings.yaml +api_service_name: logging.googleapis.com +api_version: v2 +api_resource_type_kind: Settings api_variant_patterns: - - 'organizations/{organization}/settings' + - organizations/{organization}/settings fields: - - api_field: 'disableDefaultSink' - - api_field: 'kmsKeyName' - - api_field: 'kmsServiceAccountId' - - api_field: 'loggingServiceAccountId' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'storageLocation' + - api_field: disableDefaultSink + - api_field: kmsKeyName + - api_field: kmsServiceAccountId + - api_field: loggingServiceAccountId + - api_field: name + - field: organization + provider_only: true + - api_field: storageLocation diff --git a/google/services/looker/resource_looker_instance.go b/google/services/looker/resource_looker_instance.go index b53e8adca8f..e947628ad37 100644 --- a/google/services/looker/resource_looker_instance.go +++ b/google/services/looker/resource_looker_instance.go @@ -440,6 +440,63 @@ disrupt service.`, }, }, }, + "periodic_export_config": { + Type: schema.TypeList, + Optional: true, + Description: `Configuration for periodic export.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "gcs_uri": { + Type: schema.TypeString, + Required: true, + Description: `Cloud Storage bucket URI for periodic export. +Format: gs://{bucket_name}`, + }, + "kms_key": { + Type: schema.TypeString, + Required: true, + Description: `Name of the CMEK key in KMS. +Format: +projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`, + }, + "start_time": { + Type: schema.TypeList, + Required: true, + Description: `Time in UTC to start the periodic export job.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "hours": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 23), + Description: `Hours of day in 24 hour format. Should be from 0 to 23.`, + }, + "minutes": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 60), + Description: `Minutes of hour of day. Must be from 0 to 59.`, + }, + "nanos": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 999999999), + Description: `Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.`, + }, + "seconds": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(0, 60), + Description: `Seconds of minutes of the time. Must normally be from 0 to 59.`, + }, + }, + }, + }, + }, + }, + }, "platform_edition": { Type: schema.TypeString, Optional: true, @@ -696,6 +753,12 @@ func resourceLookerInstanceCreate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("oauth_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(oauthConfigProp)) && (ok || !reflect.DeepEqual(v, oauthConfigProp)) { obj["oauthConfig"] = oauthConfigProp } + periodicExportConfigProp, err := expandLookerInstancePeriodicExportConfig(d.Get("periodic_export_config"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("periodic_export_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(periodicExportConfigProp)) && (ok || !reflect.DeepEqual(v, periodicExportConfigProp)) { + obj["periodicExportConfig"] = periodicExportConfigProp + } platformEditionProp, err := expandLookerInstancePlatformEdition(d.Get("platform_edition"), d, config) if err != nil { return err @@ -917,6 +980,9 @@ func resourceLookerInstanceRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("maintenance_window", flattenLookerInstanceMaintenanceWindow(res["maintenanceWindow"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } + if err := d.Set("periodic_export_config", flattenLookerInstancePeriodicExportConfig(res["periodicExportConfig"], d, config)); err != nil { + return fmt.Errorf("Error reading Instance: %s", err) + } if err := d.Set("platform_edition", flattenLookerInstancePlatformEdition(res["platformEdition"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } @@ -1069,6 +1135,12 @@ func resourceLookerInstanceUpdate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("oauth_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, oauthConfigProp)) { obj["oauthConfig"] = oauthConfigProp } + periodicExportConfigProp, err := expandLookerInstancePeriodicExportConfig(d.Get("periodic_export_config"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("periodic_export_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, periodicExportConfigProp)) { + obj["periodicExportConfig"] = periodicExportConfigProp + } privateIpEnabledProp, err := expandLookerInstancePrivateIpEnabled(d.Get("private_ip_enabled"), d, config) if err != nil { return err @@ -1162,6 +1234,10 @@ func resourceLookerInstanceUpdate(d *schema.ResourceData, meta interface{}) erro updateMask = append(updateMask, "oauthConfig") } + if d.HasChange("periodic_export_config") { + updateMask = append(updateMask, "periodic_export_config") + } + if d.HasChange("private_ip_enabled") { updateMask = append(updateMask, "privateIpEnabled") } @@ -1776,6 +1852,118 @@ func flattenLookerInstanceMaintenanceWindowStartTimeNanos(v interface{}, d *sche return v // let terraform core handle it otherwise } +func flattenLookerInstancePeriodicExportConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["kms_key"] = + flattenLookerInstancePeriodicExportConfigKmsKey(original["kmsKey"], d, config) + transformed["gcs_uri"] = + flattenLookerInstancePeriodicExportConfigGcsUri(original["gcsUri"], d, config) + transformed["start_time"] = + flattenLookerInstancePeriodicExportConfigStartTime(original["startTime"], d, config) + return []interface{}{transformed} +} +func flattenLookerInstancePeriodicExportConfigKmsKey(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenLookerInstancePeriodicExportConfigGcsUri(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenLookerInstancePeriodicExportConfigStartTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["hours"] = + flattenLookerInstancePeriodicExportConfigStartTimeHours(original["hours"], d, config) + transformed["minutes"] = + flattenLookerInstancePeriodicExportConfigStartTimeMinutes(original["minutes"], d, config) + transformed["seconds"] = + flattenLookerInstancePeriodicExportConfigStartTimeSeconds(original["seconds"], d, config) + transformed["nanos"] = + flattenLookerInstancePeriodicExportConfigStartTimeNanos(original["nanos"], d, config) + return []interface{}{transformed} +} +func flattenLookerInstancePeriodicExportConfigStartTimeHours(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenLookerInstancePeriodicExportConfigStartTimeMinutes(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenLookerInstancePeriodicExportConfigStartTimeSeconds(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenLookerInstancePeriodicExportConfigStartTimeNanos(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + func flattenLookerInstancePlatformEdition(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { return v } @@ -2395,6 +2583,109 @@ func expandLookerInstanceOauthConfigClientSecret(v interface{}, d tpgresource.Te return v, nil } +func expandLookerInstancePeriodicExportConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedKmsKey, err := expandLookerInstancePeriodicExportConfigKmsKey(original["kms_key"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedKmsKey); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["kmsKey"] = transformedKmsKey + } + + transformedGcsUri, err := expandLookerInstancePeriodicExportConfigGcsUri(original["gcs_uri"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedGcsUri); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["gcsUri"] = transformedGcsUri + } + + transformedStartTime, err := expandLookerInstancePeriodicExportConfigStartTime(original["start_time"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedStartTime); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["startTime"] = transformedStartTime + } + + return transformed, nil +} + +func expandLookerInstancePeriodicExportConfigKmsKey(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLookerInstancePeriodicExportConfigGcsUri(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLookerInstancePeriodicExportConfigStartTime(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedHours, err := expandLookerInstancePeriodicExportConfigStartTimeHours(original["hours"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedHours); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["hours"] = transformedHours + } + + transformedMinutes, err := expandLookerInstancePeriodicExportConfigStartTimeMinutes(original["minutes"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedMinutes); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["minutes"] = transformedMinutes + } + + transformedSeconds, err := expandLookerInstancePeriodicExportConfigStartTimeSeconds(original["seconds"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSeconds); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["seconds"] = transformedSeconds + } + + transformedNanos, err := expandLookerInstancePeriodicExportConfigStartTimeNanos(original["nanos"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedNanos); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["nanos"] = transformedNanos + } + + return transformed, nil +} + +func expandLookerInstancePeriodicExportConfigStartTimeHours(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLookerInstancePeriodicExportConfigStartTimeMinutes(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLookerInstancePeriodicExportConfigStartTimeSeconds(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLookerInstancePeriodicExportConfigStartTimeNanos(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandLookerInstancePlatformEdition(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/google/services/looker/resource_looker_instance_generated_meta.yaml b/google/services/looker/resource_looker_instance_generated_meta.yaml index bb6a3165b4e..5cc56ebf414 100644 --- a/google/services/looker/resource_looker_instance_generated_meta.yaml +++ b/google/services/looker/resource_looker_instance_generated_meta.yaml @@ -1,62 +1,68 @@ -resource: 'google_looker_instance' -generation_type: 'mmv1' -source_file: 'products/looker/Instance.yaml' -api_service_name: 'looker.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_looker_instance +generation_type: mmv1 +source_file: products/looker/Instance.yaml +api_service_name: looker.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'adminSettings.allowedEmailDomains' - - api_field: 'consumerNetwork' - - api_field: 'controlledEgressConfig.egressFqdns' - - api_field: 'controlledEgressConfig.marketplaceEnabled' - - api_field: 'controlledEgressEnabled' - - api_field: 'createTime' - - api_field: 'customDomain.domain' - - api_field: 'customDomain.state' - - field: 'deletion_policy' - provider_only: true - - api_field: 'denyMaintenancePeriod.endDate.day' - - api_field: 'denyMaintenancePeriod.endDate.month' - - api_field: 'denyMaintenancePeriod.endDate.year' - - api_field: 'denyMaintenancePeriod.startDate.day' - - api_field: 'denyMaintenancePeriod.startDate.month' - - api_field: 'denyMaintenancePeriod.startDate.year' - - api_field: 'denyMaintenancePeriod.time.hours' - - api_field: 'denyMaintenancePeriod.time.minutes' - - api_field: 'denyMaintenancePeriod.time.nanos' - - api_field: 'denyMaintenancePeriod.time.seconds' - - api_field: 'egressPublicIp' - - api_field: 'encryptionConfig.kmsKeyName' - - api_field: 'encryptionConfig.kmsKeyNameVersion' - - api_field: 'encryptionConfig.kmsKeyState' - - api_field: 'fipsEnabled' - - api_field: 'geminiEnabled' - - api_field: 'ingressPrivateIp' - - api_field: 'ingressPublicIp' - - api_field: 'lookerUri' - - api_field: 'lookerVersion' - - api_field: 'maintenanceWindow.dayOfWeek' - - api_field: 'maintenanceWindow.startTime.hours' - - api_field: 'maintenanceWindow.startTime.minutes' - - api_field: 'maintenanceWindow.startTime.nanos' - - api_field: 'maintenanceWindow.startTime.seconds' - - field: 'name' - provider_only: true - - api_field: 'oauthConfig.clientId' - - api_field: 'oauthConfig.clientSecret' - - api_field: 'platformEdition' - - api_field: 'privateIpEnabled' - - api_field: 'pscConfig.allowedVpcs' - - api_field: 'pscConfig.lookerServiceAttachmentUri' - - api_field: 'pscConfig.serviceAttachments.connectionStatus' - - api_field: 'pscConfig.serviceAttachments.localFqdn' - - api_field: 'pscConfig.serviceAttachments.targetServiceAttachmentUri' - - api_field: 'pscEnabled' - - api_field: 'publicIpEnabled' - - field: 'region' - provider_only: true - - api_field: 'reservedRange' - - api_field: 'updateTime' - - api_field: 'userMetadata.additionalDeveloperUserCount' - - api_field: 'userMetadata.additionalStandardUserCount' - - api_field: 'userMetadata.additionalViewerUserCount' + - api_field: adminSettings.allowedEmailDomains + - api_field: consumerNetwork + - api_field: controlledEgressConfig.egressFqdns + - api_field: controlledEgressConfig.marketplaceEnabled + - api_field: controlledEgressEnabled + - api_field: createTime + - api_field: customDomain.domain + - api_field: customDomain.state + - field: deletion_policy + provider_only: true + - api_field: denyMaintenancePeriod.endDate.day + - api_field: denyMaintenancePeriod.endDate.month + - api_field: denyMaintenancePeriod.endDate.year + - api_field: denyMaintenancePeriod.startDate.day + - api_field: denyMaintenancePeriod.startDate.month + - api_field: denyMaintenancePeriod.startDate.year + - api_field: denyMaintenancePeriod.time.hours + - api_field: denyMaintenancePeriod.time.minutes + - api_field: denyMaintenancePeriod.time.nanos + - api_field: denyMaintenancePeriod.time.seconds + - api_field: egressPublicIp + - api_field: encryptionConfig.kmsKeyName + - api_field: encryptionConfig.kmsKeyNameVersion + - api_field: encryptionConfig.kmsKeyState + - api_field: fipsEnabled + - api_field: geminiEnabled + - api_field: ingressPrivateIp + - api_field: ingressPublicIp + - api_field: lookerUri + - api_field: lookerVersion + - api_field: maintenanceWindow.dayOfWeek + - api_field: maintenanceWindow.startTime.hours + - api_field: maintenanceWindow.startTime.minutes + - api_field: maintenanceWindow.startTime.nanos + - api_field: maintenanceWindow.startTime.seconds + - field: name + provider_only: true + - api_field: oauthConfig.clientId + - api_field: oauthConfig.clientSecret + - api_field: periodicExportConfig.gcsUri + - api_field: periodicExportConfig.kmsKey + - api_field: periodicExportConfig.startTime.hours + - api_field: periodicExportConfig.startTime.minutes + - api_field: periodicExportConfig.startTime.nanos + - api_field: periodicExportConfig.startTime.seconds + - api_field: platformEdition + - api_field: privateIpEnabled + - api_field: pscConfig.allowedVpcs + - api_field: pscConfig.lookerServiceAttachmentUri + - api_field: pscConfig.serviceAttachments.connectionStatus + - api_field: pscConfig.serviceAttachments.localFqdn + - api_field: pscConfig.serviceAttachments.targetServiceAttachmentUri + - api_field: pscEnabled + - api_field: publicIpEnabled + - field: region + provider_only: true + - api_field: reservedRange + - api_field: updateTime + - api_field: userMetadata.additionalDeveloperUserCount + - api_field: userMetadata.additionalStandardUserCount + - api_field: userMetadata.additionalViewerUserCount diff --git a/google/services/looker/resource_looker_instance_generated_test.go b/google/services/looker/resource_looker_instance_generated_test.go index cbf73ba3cd7..de531697cc3 100644 --- a/google/services/looker/resource_looker_instance_generated_test.go +++ b/google/services/looker/resource_looker_instance_generated_test.go @@ -419,8 +419,24 @@ resource "google_looker_instance" "looker-instance" { } psc_config { allowed_vpcs = ["projects/test-project/global/networks/test"] - # update only - # service_attachments = [{local_fqdn: "www.local-fqdn.com" target_service_attachment_uri: "projects/my-project/regions/us-east1/serviceAttachments/sa"}] + + # First Service Attachment + # service_attachments { + # local_fqdn = "www.example-one.com" + # target_service_attachment_uri = "projects/my-project/regions/us-east1/serviceAttachments/sa-1" + # } + + # Second Service Attachment + # service_attachments { + # local_fqdn = "api.internal-partner.com" + # target_service_attachment_uri = "projects/partner-project/regions/us-central1/serviceAttachments/sa-gateway" + # } + + # Third Service Attachment + # service_attachments { + # local_fqdn = "git.internal-repo.com" + # target_service_attachment_uri = "projects/devops-project/regions/us-west1/serviceAttachments/gitlab-sa" + # } } } `, context) diff --git a/google/services/looker/resource_looker_instance_test.go b/google/services/looker/resource_looker_instance_test.go index 4c953d698c4..5e8d59d9820 100644 --- a/google/services/looker/resource_looker_instance_test.go +++ b/google/services/looker/resource_looker_instance_test.go @@ -143,3 +143,98 @@ resource "google_looker_instance" "test" { } `, context["random_suffix"]) } + +func TestAccLookerInstance_updatePeriodicExport(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.BootstrapIamMembers(t, []acctest.IamMember{ + { + // For writing/managing the export files in GCS + Member: "serviceAccount:service-{project_number}@gcp-sa-looker.iam.gserviceaccount.com", + Role: "roles/storage.objectAdmin", + }, + { + // For using the KMS key to encrypt the export (Required for periodic_export_config) + Member: "serviceAccount:service-{project_number}@gcp-sa-looker.iam.gserviceaccount.com", + Role: "roles/cloudkms.cryptoKeyEncrypterDecrypter", + }, + }) + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccLookerInstance_basic(context), + }, + { + ResourceName: "google_looker_instance.test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"oauth_config", "region"}, + }, + { + Config: testAccLookerInstance_periodicExport(context), + }, + { + ResourceName: "google_looker_instance.test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"oauth_config", "region"}, + }, + }, + }) +} + +func testAccLookerInstance_periodicExport(context map[string]interface{}) string { + return fmt.Sprintf(` +resource "google_storage_bucket" "export" { + name = "tf-test-looker-export-%s" + location = "US" + force_destroy = true +} + +resource "google_kms_key_ring" "keyring" { + name = "tf-test-looker-keyring-%s" + location = "us-west1" +} + +resource "google_kms_crypto_key" "key" { + name = "tf-test-looker-key-%s" + key_ring = google_kms_key_ring.keyring.id +} + +resource "google_looker_instance" "test" { + name = "tf-test-looker-%s" + platform_edition = "LOOKER_CORE_ENTERPRISE_ANNUAL" + region = "us-central1" + public_ip_enabled = true + psc_enabled = true + + psc_config { + allowed_vpcs = [] + } + + periodic_export_config { + gcs_uri = "gs://${google_storage_bucket.export.name}" + kms_key = google_kms_crypto_key.key.id + + start_time { + hours = 12 + minutes = 30 + seconds = 0 + nanos = 0 + } + } + + oauth_config { + client_id = "my-client-id" + client_secret = "my-client-secret" + } +} +`, context["random_suffix"], context["random_suffix"], context["random_suffix"], context["random_suffix"]) +} diff --git a/google/services/lustre/resource_lustre_instance.go b/google/services/lustre/resource_lustre_instance.go index 8ea6811a26f..0403e16e041 100644 --- a/google/services/lustre/resource_lustre_instance.go +++ b/google/services/lustre/resource_lustre_instance.go @@ -98,9 +98,9 @@ func ResourceLustreInstance() *schema.Resource { }, Timeouts: &schema.ResourceTimeout{ - Create: schema.DefaultTimeout(40 * time.Minute), - Update: schema.DefaultTimeout(20 * time.Minute), - Delete: schema.DefaultTimeout(20 * time.Minute), + Create: schema.DefaultTimeout(120 * time.Minute), + Update: schema.DefaultTimeout(60 * time.Minute), + Delete: schema.DefaultTimeout(60 * time.Minute), }, CustomizeDiff: customdiff.All( @@ -174,6 +174,66 @@ Must be in the format Description: `The throughput of the instance in MB/s/TiB. Valid values are 125, 250, 500, 1000.`, }, + "access_rules_options": { + Type: schema.TypeList, + Optional: true, + Description: `Access control rules for the Lustre instance. Configures default root +squashing behavior and specific access rules based on IP addresses.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "default_squash_mode": { + Type: schema.TypeString, + Required: true, + ValidateFunc: verify.ValidateEnum([]string{"ROOT_SQUASH", "NO_SQUASH"}), + Description: `Set to "ROOT_SQUASH" to enable root squashing by default. +Other values include "NO_SQUASH". Possible values: ["ROOT_SQUASH", "NO_SQUASH"]`, + }, + "access_rules": { + Type: schema.TypeList, + Optional: true, + Description: `An array of access rule exceptions. Each rule defines IP address ranges +that should have different squash behavior than the default.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ip_address_ranges": { + Type: schema.TypeList, + Required: true, + Description: `An array of IP address strings or CIDR ranges that this rule applies to.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + Description: `A unique identifier for the access rule.`, + }, + "squash_mode": { + Type: schema.TypeString, + Required: true, + ValidateFunc: verify.ValidateEnum([]string{"NO_SQUASH"}), + Description: `The squash mode for this specific rule. Currently, only "NO_SQUASH" +is supported for exceptions. Possible values: ["NO_SQUASH"]`, + }, + }, + }, + }, + "default_squash_gid": { + Type: schema.TypeInt, + Optional: true, + Description: `The GID to map the root user to when root squashing is enabled +(e.g., 65534 for nobody).`, + }, + "default_squash_uid": { + Type: schema.TypeInt, + Optional: true, + Description: `The UID to map the root user to when root squashing is enabled +(e.g., 65534 for nobody).`, + }, + }, + }, + }, "description": { Type: schema.TypeString, Optional: true, @@ -317,6 +377,12 @@ func resourceLustreInstanceCreate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("kms_key"); !tpgresource.IsEmptyValue(reflect.ValueOf(kmsKeyProp)) && (ok || !reflect.DeepEqual(v, kmsKeyProp)) { obj["kmsKey"] = kmsKeyProp } + accessRulesOptionsProp, err := expandLustreInstanceAccessRulesOptions(d.Get("access_rules_options"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("access_rules_options"); !tpgresource.IsEmptyValue(reflect.ValueOf(accessRulesOptionsProp)) && (ok || !reflect.DeepEqual(v, accessRulesOptionsProp)) { + obj["accessRulesOptions"] = accessRulesOptionsProp + } effectiveLabelsProp, err := expandLustreInstanceEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -488,6 +554,9 @@ func resourceLustreInstanceRead(d *schema.ResourceData, meta interface{}) error if err := d.Set("state_reason", flattenLustreInstanceStateReason(res["stateReason"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } + if err := d.Set("access_rules_options", flattenLustreInstanceAccessRulesOptions(res["accessRulesOptions"], d, config)); err != nil { + return fmt.Errorf("Error reading Instance: %s", err) + } if err := d.Set("terraform_labels", flattenLustreInstanceTerraformLabels(res["labels"], d, config)); err != nil { return fmt.Errorf("Error reading Instance: %s", err) } @@ -583,6 +652,12 @@ func resourceLustreInstanceUpdate(d *schema.ResourceData, meta interface{}) erro } else if v, ok := d.GetOkExists("placement_policy"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, placementPolicyProp)) { obj["placementPolicy"] = placementPolicyProp } + accessRulesOptionsProp, err := expandLustreInstanceAccessRulesOptions(d.Get("access_rules_options"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("access_rules_options"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, accessRulesOptionsProp)) { + obj["accessRulesOptions"] = accessRulesOptionsProp + } effectiveLabelsProp, err := expandLustreInstanceEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -615,6 +690,10 @@ func resourceLustreInstanceUpdate(d *schema.ResourceData, meta interface{}) erro updateMask = append(updateMask, "placementPolicy") } + if d.HasChange("access_rules_options") { + updateMask = append(updateMask, "accessRulesOptions") + } + if d.HasChange("effective_labels") { updateMask = append(updateMask, "labels") } @@ -808,6 +887,95 @@ func flattenLustreInstanceStateReason(v interface{}, d *schema.ResourceData, con return v } +func flattenLustreInstanceAccessRulesOptions(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["default_squash_mode"] = + flattenLustreInstanceAccessRulesOptionsDefaultSquashMode(original["defaultSquashMode"], d, config) + transformed["default_squash_uid"] = + flattenLustreInstanceAccessRulesOptionsDefaultSquashUid(original["defaultSquashUid"], d, config) + transformed["default_squash_gid"] = + flattenLustreInstanceAccessRulesOptionsDefaultSquashGid(original["defaultSquashGid"], d, config) + transformed["access_rules"] = + flattenLustreInstanceAccessRulesOptionsAccessRules(original["accessRules"], d, config) + return []interface{}{transformed} +} +func flattenLustreInstanceAccessRulesOptionsDefaultSquashMode(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenLustreInstanceAccessRulesOptionsDefaultSquashUid(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenLustreInstanceAccessRulesOptionsDefaultSquashGid(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenLustreInstanceAccessRulesOptionsAccessRules(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "name": flattenLustreInstanceAccessRulesOptionsAccessRulesName(original["name"], d, config), + "ip_address_ranges": flattenLustreInstanceAccessRulesOptionsAccessRulesIpAddressRanges(original["ipAddressRanges"], d, config), + "squash_mode": flattenLustreInstanceAccessRulesOptionsAccessRulesSquashMode(original["squashMode"], d, config), + }) + } + return transformed +} +func flattenLustreInstanceAccessRulesOptionsAccessRulesName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenLustreInstanceAccessRulesOptionsAccessRulesIpAddressRanges(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenLustreInstanceAccessRulesOptionsAccessRulesSquashMode(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenLustreInstanceTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v @@ -859,6 +1027,112 @@ func expandLustreInstanceKmsKey(v interface{}, d tpgresource.TerraformResourceDa return v, nil } +func expandLustreInstanceAccessRulesOptions(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedDefaultSquashMode, err := expandLustreInstanceAccessRulesOptionsDefaultSquashMode(original["default_squash_mode"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedDefaultSquashMode); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["defaultSquashMode"] = transformedDefaultSquashMode + } + + transformedDefaultSquashUid, err := expandLustreInstanceAccessRulesOptionsDefaultSquashUid(original["default_squash_uid"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedDefaultSquashUid); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["defaultSquashUid"] = transformedDefaultSquashUid + } + + transformedDefaultSquashGid, err := expandLustreInstanceAccessRulesOptionsDefaultSquashGid(original["default_squash_gid"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedDefaultSquashGid); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["defaultSquashGid"] = transformedDefaultSquashGid + } + + transformedAccessRules, err := expandLustreInstanceAccessRulesOptionsAccessRules(original["access_rules"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedAccessRules); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["accessRules"] = transformedAccessRules + } + + return transformed, nil +} + +func expandLustreInstanceAccessRulesOptionsDefaultSquashMode(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLustreInstanceAccessRulesOptionsDefaultSquashUid(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLustreInstanceAccessRulesOptionsDefaultSquashGid(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLustreInstanceAccessRulesOptionsAccessRules(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + req := make([]interface{}, 0, len(l)) + for _, raw := range l { + if raw == nil { + continue + } + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedName, err := expandLustreInstanceAccessRulesOptionsAccessRulesName(original["name"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedName); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["name"] = transformedName + } + + transformedIpAddressRanges, err := expandLustreInstanceAccessRulesOptionsAccessRulesIpAddressRanges(original["ip_address_ranges"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedIpAddressRanges); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["ipAddressRanges"] = transformedIpAddressRanges + } + + transformedSquashMode, err := expandLustreInstanceAccessRulesOptionsAccessRulesSquashMode(original["squash_mode"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSquashMode); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["squashMode"] = transformedSquashMode + } + + req = append(req, transformed) + } + return req, nil +} + +func expandLustreInstanceAccessRulesOptionsAccessRulesName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLustreInstanceAccessRulesOptionsAccessRulesIpAddressRanges(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandLustreInstanceAccessRulesOptionsAccessRulesSquashMode(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandLustreInstanceEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { if v == nil { return map[string]string{}, nil diff --git a/google/services/lustre/resource_lustre_instance_generated_meta.yaml b/google/services/lustre/resource_lustre_instance_generated_meta.yaml index 98edd60ff2a..1042d8b3f3b 100644 --- a/google/services/lustre/resource_lustre_instance_generated_meta.yaml +++ b/google/services/lustre/resource_lustre_instance_generated_meta.yaml @@ -1,31 +1,37 @@ -resource: 'google_lustre_instance' -generation_type: 'mmv1' -source_file: 'products/lustre/Instance.yaml' -api_service_name: 'lustre.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_lustre_instance +generation_type: mmv1 +source_file: products/lustre/Instance.yaml +api_service_name: lustre.googleapis.com +api_version: v1 +api_resource_type_kind: Instance autogen_status: true fields: - - api_field: 'capacityGib' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'filesystem' - - api_field: 'gkeSupportEnabled' - - field: 'instance_id' - provider_only: true - - api_field: 'kmsKey' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mountPoint' - - api_field: 'name' - - api_field: 'network' - - api_field: 'perUnitStorageThroughput' - - api_field: 'placementPolicy' - - api_field: 'state' - - api_field: 'stateReason' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: accessRulesOptions.accessRules.ipAddressRanges + - api_field: accessRulesOptions.accessRules.name + - api_field: accessRulesOptions.accessRules.squashMode + - api_field: accessRulesOptions.defaultSquashGid + - api_field: accessRulesOptions.defaultSquashMode + - api_field: accessRulesOptions.defaultSquashUid + - api_field: capacityGib + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: filesystem + - api_field: gkeSupportEnabled + - field: instance_id + provider_only: true + - api_field: kmsKey + - api_field: labels + - field: location + provider_only: true + - api_field: mountPoint + - api_field: name + - api_field: network + - api_field: perUnitStorageThroughput + - api_field: placementPolicy + - api_field: state + - api_field: stateReason + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/lustre/resource_lustre_instance_test.go b/google/services/lustre/resource_lustre_instance_test.go index b2fbc72d524..a8875e9e19e 100644 --- a/google/services/lustre/resource_lustre_instance_test.go +++ b/google/services/lustre/resource_lustre_instance_test.go @@ -96,6 +96,121 @@ data "google_compute_network" "lustre-network" { `, context) } +func TestAccLustreInstance_withAccessRulesOptions(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "network_name": acctest.BootstrapSharedTestNetwork(t, "default-vpc"), + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccLustreInstance_withAccessRulesOptions(context), + }, + { + ResourceName: "google_lustre_instance.instance", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"instance_id", "labels", "gke_support_enabled", "location", "terraform_labels"}, + }, + { + Config: testAccLustreInstance_withAccessRulesOptionsUpdate(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction( + "google_lustre_instance.instance", + plancheck.ResourceActionUpdate, + ), + }, + }, + }, + { + ResourceName: "google_lustre_instance.instance", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"instance_id", "labels", "gke_support_enabled", "location", "terraform_labels"}, + }, + }, + }) +} + +func testAccLustreInstance_withAccessRulesOptions(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_lustre_instance" "instance" { + instance_id = "tf-test-my-instance%{random_suffix}" + location = "us-central1-a" + filesystem = "testfs" + network = data.google_compute_network.lustre-network.id + gke_support_enabled = false + capacity_gib = 18000 + per_unit_storage_throughput = 1000 + + access_rules_options { + default_squash_mode = "ROOT_SQUASH" + default_squash_uid = 65534 + + access_rules { + name = "admin_hosts" + ip_address_ranges = ["192.168.0.0/24","10.0.1.10/32"] + squash_mode = "NO_SQUASH" + } + + access_rules { + name = "another_admin" + ip_address_ranges = ["172.16.5.0/24"] + squash_mode = "NO_SQUASH" + } + } + + timeouts { + create = "120m" + } +} + +data "google_compute_network" "lustre-network" { + name = "%{network_name}" +} +`, context) +} + +func testAccLustreInstance_withAccessRulesOptionsUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_lustre_instance" "instance" { + instance_id = "tf-test-my-instance%{random_suffix}" + location = "us-central1-a" + filesystem = "testfs" + network = data.google_compute_network.lustre-network.id + gke_support_enabled = false + capacity_gib = 18000 + per_unit_storage_throughput = 1000 + + access_rules_options { + default_squash_mode = "NO_SQUASH" + default_squash_uid = 0 + default_squash_gid = 0 + + access_rules { + name = "updated_admin" + ip_address_ranges = ["10.0.0.0/8"] + squash_mode = "NO_SQUASH" + } + } + + timeouts { + create = "120m" + } +} + +data "google_compute_network" "lustre-network" { + name = "%{network_name}" +} +`, context) +} + func TestAccLustreInstance_withKmsKey(t *testing.T) { t.Parallel() diff --git a/google/services/managedkafka/resource_managed_kafka_acl_generated_meta.yaml b/google/services/managedkafka/resource_managed_kafka_acl_generated_meta.yaml index 5de8d662b98..2a121f4ec33 100644 --- a/google/services/managedkafka/resource_managed_kafka_acl_generated_meta.yaml +++ b/google/services/managedkafka/resource_managed_kafka_acl_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_managed_kafka_acl' -generation_type: 'mmv1' -source_file: 'products/managedkafka/Acl.yaml' -api_service_name: 'managedkafka.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Acl' +resource: google_managed_kafka_acl +generation_type: mmv1 +source_file: products/managedkafka/Acl.yaml +api_service_name: managedkafka.googleapis.com +api_version: v1 +api_resource_type_kind: Acl fields: - - api_field: 'aclEntries.host' - - api_field: 'aclEntries.operation' - - api_field: 'aclEntries.permissionType' - - api_field: 'aclEntries.principal' - - field: 'acl_id' - provider_only: true - - field: 'cluster' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'patternType' - - api_field: 'resourceName' - - api_field: 'resourceType' + - api_field: aclEntries.host + - api_field: aclEntries.operation + - api_field: aclEntries.permissionType + - api_field: aclEntries.principal + - field: acl_id + provider_only: true + - field: cluster + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: name + - api_field: patternType + - api_field: resourceName + - api_field: resourceType diff --git a/google/services/managedkafka/resource_managed_kafka_cluster.go b/google/services/managedkafka/resource_managed_kafka_cluster.go index 4d81840b179..2450dfaf3d6 100644 --- a/google/services/managedkafka/resource_managed_kafka_cluster.go +++ b/google/services/managedkafka/resource_managed_kafka_cluster.go @@ -209,10 +209,10 @@ func ResourceManagedKafkaCluster() *schema.Resource { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - "disk_size_gb": { + "disk_size_gib": { Type: schema.TypeString, Optional: true, - Description: `The disk to provision for each broker in Gigabytes. Minimum: 100 GB.`, + Description: `The disk to provision for each broker in Gibibytes. Minimum: 100 GiB.`, }, }, }, @@ -1104,17 +1104,17 @@ func expandManagedKafkaClusterBrokerCapacityConfig(v interface{}, d tpgresource. original := raw.(map[string]interface{}) transformed := make(map[string]interface{}) - transformedDiskSizeGb, err := expandManagedKafkaClusterBrokerCapacityConfigDiskSizeGb(original["disk_size_gb"], d, config) + transformedDiskSizeGib, err := expandManagedKafkaClusterBrokerCapacityConfigDiskSizeGib(original["disk_size_gib"], d, config) if err != nil { return nil, err - } else if val := reflect.ValueOf(transformedDiskSizeGb); val.IsValid() && !tpgresource.IsEmptyValue(val) { - transformed["diskSizeGb"] = transformedDiskSizeGb + } else if val := reflect.ValueOf(transformedDiskSizeGib); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["diskSizeGib"] = transformedDiskSizeGib } return transformed, nil } -func expandManagedKafkaClusterBrokerCapacityConfigDiskSizeGb(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { +func expandManagedKafkaClusterBrokerCapacityConfigDiskSizeGib(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/google/services/managedkafka/resource_managed_kafka_cluster_generated_meta.yaml b/google/services/managedkafka/resource_managed_kafka_cluster_generated_meta.yaml index f67f031b2e8..40297242098 100644 --- a/google/services/managedkafka/resource_managed_kafka_cluster_generated_meta.yaml +++ b/google/services/managedkafka/resource_managed_kafka_cluster_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_managed_kafka_cluster' -generation_type: 'mmv1' -source_file: 'products/managedkafka/Cluster.yaml' -api_service_name: 'managedkafka.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Cluster' +resource: google_managed_kafka_cluster +generation_type: mmv1 +source_file: products/managedkafka/Cluster.yaml +api_service_name: managedkafka.googleapis.com +api_version: v1 +api_resource_type_kind: Cluster autogen_status: true fields: - - api_field: 'brokerCapacityConfig.diskSizeGb' - - api_field: 'capacityConfig.memoryBytes' - - api_field: 'capacityConfig.vcpuCount' - - field: 'cluster_id' - provider_only: true - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'gcpConfig.accessConfig.networkConfigs.subnet' - - api_field: 'gcpConfig.kmsKey' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'rebalanceConfig.mode' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'tlsConfig.sslPrincipalMappingRules' - - api_field: 'tlsConfig.trustConfig.casConfigs.caPool' - - api_field: 'updateTime' + - api_field: brokerCapacityConfig.diskSizeGib + - api_field: capacityConfig.memoryBytes + - api_field: capacityConfig.vcpuCount + - field: cluster_id + provider_only: true + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: gcpConfig.accessConfig.networkConfigs.subnet + - api_field: gcpConfig.kmsKey + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: rebalanceConfig.mode + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: tlsConfig.sslPrincipalMappingRules + - api_field: tlsConfig.trustConfig.casConfigs.caPool + - api_field: updateTime diff --git a/google/services/managedkafka/resource_managed_kafka_cluster_test.go b/google/services/managedkafka/resource_managed_kafka_cluster_test.go index 65fc66434d7..f0635e0d615 100644 --- a/google/services/managedkafka/resource_managed_kafka_cluster_test.go +++ b/google/services/managedkafka/resource_managed_kafka_cluster_test.go @@ -105,7 +105,7 @@ resource "google_managed_kafka_cluster" "example" { memory_bytes = 4512135122 } broker_capacity_config { - disk_size_gb = 1500 + disk_size_gib = 1500 } gcp_config { access_config { diff --git a/google/services/managedkafka/resource_managed_kafka_connect_cluster.go b/google/services/managedkafka/resource_managed_kafka_connect_cluster.go index dc53ef98261..53c0c37b3f0 100644 --- a/google/services/managedkafka/resource_managed_kafka_connect_cluster.go +++ b/google/services/managedkafka/resource_managed_kafka_connect_cluster.go @@ -183,6 +183,7 @@ func ResourceManagedKafkaConnectCluster() *schema.Resource { "additional_subnets": { Type: schema.TypeList, Optional: true, + Deprecated: "`additionalSubnets` is deprecated and will be removed in a future major release. Managed Kafka Connect clusters can now reach any endpoint accessible from the primary subnet without the need to define additional subnets. Please see https://cloud.google.com/managed-service-for-apache-kafka/docs/connect-cluster/create-connect-cluster#worker-subnet for more information.", Description: `Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets.`, Elem: &schema.Schema{ Type: schema.TypeString, diff --git a/google/services/managedkafka/resource_managed_kafka_connect_cluster_generated_meta.yaml b/google/services/managedkafka/resource_managed_kafka_connect_cluster_generated_meta.yaml index f2c80394612..dc1bfd74d07 100644 --- a/google/services/managedkafka/resource_managed_kafka_connect_cluster_generated_meta.yaml +++ b/google/services/managedkafka/resource_managed_kafka_connect_cluster_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_managed_kafka_connect_cluster' -generation_type: 'mmv1' -source_file: 'products/managedkafka/ConnectCluster.yaml' -api_service_name: 'managedkafka.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ConnectCluster' +resource: google_managed_kafka_connect_cluster +generation_type: mmv1 +source_file: products/managedkafka/ConnectCluster.yaml +api_service_name: managedkafka.googleapis.com +api_version: v1 +api_resource_type_kind: ConnectCluster fields: - - api_field: 'capacityConfig.memoryBytes' - - api_field: 'capacityConfig.vcpuCount' - - field: 'connect_cluster_id' - provider_only: true - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'gcpConfig.accessConfig.networkConfigs.additionalSubnets' - - api_field: 'gcpConfig.accessConfig.networkConfigs.dnsDomainNames' - - api_field: 'gcpConfig.accessConfig.networkConfigs.primarySubnet' - - api_field: 'kafkaCluster' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: capacityConfig.memoryBytes + - api_field: capacityConfig.vcpuCount + - field: connect_cluster_id + provider_only: true + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: gcpConfig.accessConfig.networkConfigs.additionalSubnets + - api_field: gcpConfig.accessConfig.networkConfigs.dnsDomainNames + - api_field: gcpConfig.accessConfig.networkConfigs.primarySubnet + - api_field: kafkaCluster + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/managedkafka/resource_managed_kafka_connector_generated_meta.yaml b/google/services/managedkafka/resource_managed_kafka_connector_generated_meta.yaml index 28fcb30ebb1..53ffd40ccc6 100644 --- a/google/services/managedkafka/resource_managed_kafka_connector_generated_meta.yaml +++ b/google/services/managedkafka/resource_managed_kafka_connector_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_managed_kafka_connector' -generation_type: 'mmv1' -source_file: 'products/managedkafka/Connector.yaml' -api_service_name: 'managedkafka.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Connector' +resource: google_managed_kafka_connector +generation_type: mmv1 +source_file: products/managedkafka/Connector.yaml +api_service_name: managedkafka.googleapis.com +api_version: v1 +api_resource_type_kind: Connector fields: - - api_field: 'configs' - - field: 'connect_cluster' - provider_only: true - - field: 'connector_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'state' - - api_field: 'taskRestartPolicy.maximumBackoff' - - api_field: 'taskRestartPolicy.minimumBackoff' + - api_field: configs + - field: connect_cluster + provider_only: true + - field: connector_id + provider_only: true + - field: location + provider_only: true + - api_field: name + - api_field: state + - api_field: taskRestartPolicy.maximumBackoff + - api_field: taskRestartPolicy.minimumBackoff diff --git a/google/services/managedkafka/resource_managed_kafka_topic_generated_meta.yaml b/google/services/managedkafka/resource_managed_kafka_topic_generated_meta.yaml index 2ec1760ba2d..f61e5684e78 100644 --- a/google/services/managedkafka/resource_managed_kafka_topic_generated_meta.yaml +++ b/google/services/managedkafka/resource_managed_kafka_topic_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_managed_kafka_topic' -generation_type: 'mmv1' -source_file: 'products/managedkafka/Topic.yaml' -api_service_name: 'managedkafka.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Topic' +resource: google_managed_kafka_topic +generation_type: mmv1 +source_file: products/managedkafka/Topic.yaml +api_service_name: managedkafka.googleapis.com +api_version: v1 +api_resource_type_kind: Topic autogen_status: true fields: - - field: 'cluster' - provider_only: true - - api_field: 'configs' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'partitionCount' - - api_field: 'replicationFactor' - - field: 'topic_id' - provider_only: true + - field: cluster + provider_only: true + - api_field: configs + - field: location + provider_only: true + - api_field: name + - api_field: partitionCount + - api_field: replicationFactor + - field: topic_id + provider_only: true diff --git a/google/services/memcache/resource_memcache_instance_generated_meta.yaml b/google/services/memcache/resource_memcache_instance_generated_meta.yaml index 1f5cdfb6904..c48a94d3a09 100644 --- a/google/services/memcache/resource_memcache_instance_generated_meta.yaml +++ b/google/services/memcache/resource_memcache_instance_generated_meta.yaml @@ -1,50 +1,50 @@ -resource: 'google_memcache_instance' -generation_type: 'mmv1' -source_file: 'products/memcache/Instance.yaml' -api_service_name: 'memcache.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_memcache_instance +generation_type: mmv1 +source_file: products/memcache/Instance.yaml +api_service_name: memcache.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'authorizedNetwork' - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - api_field: 'discoveryEndpoint' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'maintenancePolicy.createTime' - - api_field: 'maintenancePolicy.description' - - api_field: 'maintenancePolicy.updateTime' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.day' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.duration' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.hours' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds' - - api_field: 'maintenanceSchedule.endTime' - - api_field: 'maintenanceSchedule.scheduleDeadlineTime' - - api_field: 'maintenanceSchedule.startTime' - - api_field: 'memcacheFullVersion' - - api_field: 'memcacheNodes.host' - - api_field: 'memcacheNodes.nodeId' - - api_field: 'memcacheNodes.port' - - api_field: 'memcacheNodes.state' - - api_field: 'memcacheNodes.zone' - - api_field: 'parameters.id' - field: 'memcache_parameters.id' - - api_field: 'parameters.params' - field: 'memcache_parameters.params' - - api_field: 'memcacheVersion' - - field: 'name' - provider_only: true - - api_field: 'nodeConfig.cpuCount' - - api_field: 'nodeConfig.memorySizeMb' - - api_field: 'nodeCount' - - field: 'region' - provider_only: true - - api_field: 'reservedIpRangeId' - - field: 'terraform_labels' - provider_only: true - - api_field: 'zones' + - api_field: authorizedNetwork + - api_field: createTime + - field: deletion_protection + provider_only: true + - api_field: discoveryEndpoint + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: maintenancePolicy.createTime + - api_field: maintenancePolicy.description + - api_field: maintenancePolicy.updateTime + - api_field: maintenancePolicy.weeklyMaintenanceWindow.day + - api_field: maintenancePolicy.weeklyMaintenanceWindow.duration + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.hours + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds + - api_field: maintenanceSchedule.endTime + - api_field: maintenanceSchedule.scheduleDeadlineTime + - api_field: maintenanceSchedule.startTime + - api_field: memcacheFullVersion + - api_field: memcacheNodes.host + - api_field: memcacheNodes.nodeId + - api_field: memcacheNodes.port + - api_field: memcacheNodes.state + - api_field: memcacheNodes.zone + - api_field: parameters.id + field: memcache_parameters.id + - api_field: parameters.params + field: memcache_parameters.params + - api_field: memcacheVersion + - field: name + provider_only: true + - api_field: nodeConfig.cpuCount + - api_field: nodeConfig.memorySizeMb + - api_field: nodeCount + - field: region + provider_only: true + - api_field: reservedIpRangeId + - field: terraform_labels + provider_only: true + - api_field: zones diff --git a/google/services/memorystore/resource_memorystore_instance_desired_user_created_endpoints_generated_meta.yaml b/google/services/memorystore/resource_memorystore_instance_desired_user_created_endpoints_generated_meta.yaml index fce1e00e0a1..dcf5a49dd24 100644 --- a/google/services/memorystore/resource_memorystore_instance_desired_user_created_endpoints_generated_meta.yaml +++ b/google/services/memorystore/resource_memorystore_instance_desired_user_created_endpoints_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_memorystore_instance_desired_user_created_endpoints' -generation_type: 'mmv1' -source_file: 'products/memorystore/InstanceDesiredUserCreatedEndpoints.yaml' -api_service_name: 'memorystore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_memorystore_instance_desired_user_created_endpoints +generation_type: mmv1 +source_file: products/memorystore/InstanceDesiredUserCreatedEndpoints.yaml +api_service_name: memorystore.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'endpoints.connections.pscConnection.connectionType' - field: 'desired_user_created_endpoints.connections.psc_connection.connection_type' - - api_field: 'endpoints.connections.pscConnection.forwardingRule' - field: 'desired_user_created_endpoints.connections.psc_connection.forwarding_rule' - - api_field: 'endpoints.connections.pscConnection.ipAddress' - field: 'desired_user_created_endpoints.connections.psc_connection.ip_address' - - api_field: 'endpoints.connections.pscConnection.network' - field: 'desired_user_created_endpoints.connections.psc_connection.network' - - api_field: 'endpoints.connections.pscConnection.projectId' - field: 'desired_user_created_endpoints.connections.psc_connection.project_id' - - api_field: 'endpoints.connections.pscConnection.pscConnectionId' - field: 'desired_user_created_endpoints.connections.psc_connection.psc_connection_id' - - api_field: 'endpoints.connections.pscConnection.pscConnectionStatus' - field: 'desired_user_created_endpoints.connections.psc_connection.psc_connection_status' - - api_field: 'endpoints.connections.pscConnection.serviceAttachment' - field: 'desired_user_created_endpoints.connections.psc_connection.service_attachment' - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true + - api_field: endpoints.connections.pscConnection.connectionType + field: desired_user_created_endpoints.connections.psc_connection.connection_type + - api_field: endpoints.connections.pscConnection.forwardingRule + field: desired_user_created_endpoints.connections.psc_connection.forwarding_rule + - api_field: endpoints.connections.pscConnection.ipAddress + field: desired_user_created_endpoints.connections.psc_connection.ip_address + - api_field: endpoints.connections.pscConnection.network + field: desired_user_created_endpoints.connections.psc_connection.network + - api_field: endpoints.connections.pscConnection.projectId + field: desired_user_created_endpoints.connections.psc_connection.project_id + - api_field: endpoints.connections.pscConnection.pscConnectionId + field: desired_user_created_endpoints.connections.psc_connection.psc_connection_id + - api_field: endpoints.connections.pscConnection.pscConnectionStatus + field: desired_user_created_endpoints.connections.psc_connection.psc_connection_status + - api_field: endpoints.connections.pscConnection.serviceAttachment + field: desired_user_created_endpoints.connections.psc_connection.service_attachment + - field: name + provider_only: true + - field: region + provider_only: true diff --git a/google/services/memorystore/resource_memorystore_instance_generated_meta.yaml b/google/services/memorystore/resource_memorystore_instance_generated_meta.yaml index bc295c602cf..991a655359a 100644 --- a/google/services/memorystore/resource_memorystore_instance_generated_meta.yaml +++ b/google/services/memorystore/resource_memorystore_instance_generated_meta.yaml @@ -1,103 +1,103 @@ -resource: 'google_memorystore_instance' -generation_type: 'mmv1' -source_file: 'products/memorystore/Instance.yaml' -api_service_name: 'memorystore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_memorystore_instance +generation_type: mmv1 +source_file: products/memorystore/Instance.yaml +api_service_name: memorystore.googleapis.com +api_version: v1 +api_resource_type_kind: Instance autogen_status: true fields: - - api_field: 'authorizationMode' - - api_field: 'automatedBackupConfig.fixedFrequencySchedule.startTime.hours' - - api_field: 'automatedBackupConfig.retention' - - api_field: 'availableMaintenanceVersions' - - api_field: 'backupCollection' - - api_field: 'createTime' - - api_field: 'crossInstanceReplicationConfig.instanceRole' - - api_field: 'crossInstanceReplicationConfig.membership.primaryInstance.instance' - - api_field: 'crossInstanceReplicationConfig.membership.primaryInstance.uid' - - api_field: 'crossInstanceReplicationConfig.membership.secondaryInstance.instance' - - api_field: 'crossInstanceReplicationConfig.membership.secondaryInstance.uid' - - api_field: 'crossInstanceReplicationConfig.primaryInstance.instance' - - api_field: 'crossInstanceReplicationConfig.primaryInstance.uid' - - api_field: 'crossInstanceReplicationConfig.secondaryInstances.instance' - - api_field: 'crossInstanceReplicationConfig.secondaryInstances.uid' - - api_field: 'crossInstanceReplicationConfig.updateTime' - - api_field: 'deletionProtectionEnabled' - - field: 'desired_auto_created_endpoints.network' - provider_only: true - - field: 'desired_auto_created_endpoints.project_id' - provider_only: true - - field: 'desired_psc_auto_connections.network' - provider_only: true - - field: 'desired_psc_auto_connections.project_id' - provider_only: true - - api_field: 'discoveryEndpoints.address' - - api_field: 'discoveryEndpoints.network' - - api_field: 'discoveryEndpoints.port' - - field: 'effective_labels' - provider_only: true - - api_field: 'effectiveMaintenanceVersion' - - api_field: 'endpoints.connections.pscAutoConnection.connectionType' - - api_field: 'endpoints.connections.pscAutoConnection.forwardingRule' - - api_field: 'endpoints.connections.pscAutoConnection.ipAddress' - - api_field: 'endpoints.connections.pscAutoConnection.network' - - api_field: 'endpoints.connections.pscAutoConnection.port' - - api_field: 'endpoints.connections.pscAutoConnection.projectId' - - api_field: 'endpoints.connections.pscAutoConnection.pscConnectionId' - - api_field: 'endpoints.connections.pscAutoConnection.serviceAttachment' - - api_field: 'engineConfigs' - - api_field: 'engineVersion' - - api_field: 'gcsSource.uris' - - field: 'instance_id' - provider_only: true - - api_field: 'kmsKey' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'maintenancePolicy.createTime' - - api_field: 'maintenancePolicy.updateTime' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.day' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.duration' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.hours' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds' - - api_field: 'maintenanceSchedule.endTime' - - api_field: 'maintenanceSchedule.scheduleDeadlineTime' - - api_field: 'maintenanceSchedule.startTime' - - api_field: 'maintenanceVersion' - - api_field: 'managedBackupSource.backup' - - api_field: 'managedServerCa.caCerts.certificates' - - api_field: 'mode' - - api_field: 'name' - - api_field: 'nodeConfig.sizeGb' - - api_field: 'nodeType' - - api_field: 'persistenceConfig.aofConfig.appendFsync' - - api_field: 'persistenceConfig.mode' - - api_field: 'persistenceConfig.rdbConfig.rdbSnapshotPeriod' - - api_field: 'persistenceConfig.rdbConfig.rdbSnapshotStartTime' - - api_field: 'pscAttachmentDetails.connectionType' - - api_field: 'pscAttachmentDetails.serviceAttachment' - - api_field: 'pscAutoConnections.connectionType' - - api_field: 'pscAutoConnections.forwardingRule' - - api_field: 'pscAutoConnections.ipAddress' - - api_field: 'pscAutoConnections.network' - - api_field: 'pscAutoConnections.port' - - api_field: 'pscAutoConnections.projectId' - - api_field: 'pscAutoConnections.pscConnectionId' - - api_field: 'pscAutoConnections.pscConnectionStatus' - - api_field: 'pscAutoConnections.serviceAttachment' - - api_field: 'replicaCount' - - api_field: 'shardCount' - - api_field: 'state' - - api_field: 'stateInfo.updateInfo.targetEngineVersion' - - api_field: 'stateInfo.updateInfo.targetNodeType' - - api_field: 'stateInfo.updateInfo.targetReplicaCount' - - api_field: 'stateInfo.updateInfo.targetShardCount' - - field: 'terraform_labels' - provider_only: true - - api_field: 'transitEncryptionMode' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'zoneDistributionConfig.mode' - - api_field: 'zoneDistributionConfig.zone' + - api_field: authorizationMode + - api_field: automatedBackupConfig.fixedFrequencySchedule.startTime.hours + - api_field: automatedBackupConfig.retention + - api_field: availableMaintenanceVersions + - api_field: backupCollection + - api_field: createTime + - api_field: crossInstanceReplicationConfig.instanceRole + - api_field: crossInstanceReplicationConfig.membership.primaryInstance.instance + - api_field: crossInstanceReplicationConfig.membership.primaryInstance.uid + - api_field: crossInstanceReplicationConfig.membership.secondaryInstance.instance + - api_field: crossInstanceReplicationConfig.membership.secondaryInstance.uid + - api_field: crossInstanceReplicationConfig.primaryInstance.instance + - api_field: crossInstanceReplicationConfig.primaryInstance.uid + - api_field: crossInstanceReplicationConfig.secondaryInstances.instance + - api_field: crossInstanceReplicationConfig.secondaryInstances.uid + - api_field: crossInstanceReplicationConfig.updateTime + - api_field: deletionProtectionEnabled + - field: desired_auto_created_endpoints.network + provider_only: true + - field: desired_auto_created_endpoints.project_id + provider_only: true + - field: desired_psc_auto_connections.network + provider_only: true + - field: desired_psc_auto_connections.project_id + provider_only: true + - api_field: discoveryEndpoints.address + - api_field: discoveryEndpoints.network + - api_field: discoveryEndpoints.port + - field: effective_labels + provider_only: true + - api_field: effectiveMaintenanceVersion + - api_field: endpoints.connections.pscAutoConnection.connectionType + - api_field: endpoints.connections.pscAutoConnection.forwardingRule + - api_field: endpoints.connections.pscAutoConnection.ipAddress + - api_field: endpoints.connections.pscAutoConnection.network + - api_field: endpoints.connections.pscAutoConnection.port + - api_field: endpoints.connections.pscAutoConnection.projectId + - api_field: endpoints.connections.pscAutoConnection.pscConnectionId + - api_field: endpoints.connections.pscAutoConnection.serviceAttachment + - api_field: engineConfigs + - api_field: engineVersion + - api_field: gcsSource.uris + - field: instance_id + provider_only: true + - api_field: kmsKey + - api_field: labels + - field: location + provider_only: true + - api_field: maintenancePolicy.createTime + - api_field: maintenancePolicy.updateTime + - api_field: maintenancePolicy.weeklyMaintenanceWindow.day + - api_field: maintenancePolicy.weeklyMaintenanceWindow.duration + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.hours + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds + - api_field: maintenanceSchedule.endTime + - api_field: maintenanceSchedule.scheduleDeadlineTime + - api_field: maintenanceSchedule.startTime + - api_field: maintenanceVersion + - api_field: managedBackupSource.backup + - api_field: managedServerCa.caCerts.certificates + - api_field: mode + - api_field: name + - api_field: nodeConfig.sizeGb + - api_field: nodeType + - api_field: persistenceConfig.aofConfig.appendFsync + - api_field: persistenceConfig.mode + - api_field: persistenceConfig.rdbConfig.rdbSnapshotPeriod + - api_field: persistenceConfig.rdbConfig.rdbSnapshotStartTime + - api_field: pscAttachmentDetails.connectionType + - api_field: pscAttachmentDetails.serviceAttachment + - api_field: pscAutoConnections.connectionType + - api_field: pscAutoConnections.forwardingRule + - api_field: pscAutoConnections.ipAddress + - api_field: pscAutoConnections.network + - api_field: pscAutoConnections.port + - api_field: pscAutoConnections.projectId + - api_field: pscAutoConnections.pscConnectionId + - api_field: pscAutoConnections.pscConnectionStatus + - api_field: pscAutoConnections.serviceAttachment + - api_field: replicaCount + - api_field: shardCount + - api_field: state + - api_field: stateInfo.updateInfo.targetEngineVersion + - api_field: stateInfo.updateInfo.targetNodeType + - api_field: stateInfo.updateInfo.targetReplicaCount + - api_field: stateInfo.updateInfo.targetShardCount + - field: terraform_labels + provider_only: true + - api_field: transitEncryptionMode + - api_field: uid + - api_field: updateTime + - api_field: zoneDistributionConfig.mode + - api_field: zoneDistributionConfig.zone diff --git a/google/services/migrationcenter/resource_migration_center_group_generated_meta.yaml b/google/services/migrationcenter/resource_migration_center_group_generated_meta.yaml index 565bcbf3764..44c1d8e8dc7 100644 --- a/google/services/migrationcenter/resource_migration_center_group_generated_meta.yaml +++ b/google/services/migrationcenter/resource_migration_center_group_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_migration_center_group' -generation_type: 'mmv1' -source_file: 'products/migrationcenter/Group.yaml' -api_service_name: 'migrationcenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Group' +resource: google_migration_center_group +generation_type: mmv1 +source_file: products/migrationcenter/Group.yaml +api_service_name: migrationcenter.googleapis.com +api_version: v1 +api_resource_type_kind: Group autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - field: 'group_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - field: group_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/migrationcenter/resource_migration_center_preference_set_generated_meta.yaml b/google/services/migrationcenter/resource_migration_center_preference_set_generated_meta.yaml index 845cacb5b77..06145312df2 100644 --- a/google/services/migrationcenter/resource_migration_center_preference_set_generated_meta.yaml +++ b/google/services/migrationcenter/resource_migration_center_preference_set_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_migration_center_preference_set' -generation_type: 'mmv1' -source_file: 'products/migrationcenter/PreferenceSet.yaml' -api_service_name: 'migrationcenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PreferenceSet' +resource: google_migration_center_preference_set +generation_type: mmv1 +source_file: products/migrationcenter/PreferenceSet.yaml +api_service_name: migrationcenter.googleapis.com +api_version: v1 +api_resource_type_kind: PreferenceSet autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'preference_set_id' - provider_only: true - - api_field: 'updateTime' - - api_field: 'virtualMachinePreferences.commitmentPlan' - - api_field: 'virtualMachinePreferences.computeEnginePreferences.licenseType' - - api_field: 'virtualMachinePreferences.computeEnginePreferences.machinePreferences.allowedMachineSeries.code' - - api_field: 'virtualMachinePreferences.regionPreferences.preferredRegions' - - api_field: 'virtualMachinePreferences.sizingOptimizationStrategy' - - api_field: 'virtualMachinePreferences.soleTenancyPreferences.commitmentPlan' - - api_field: 'virtualMachinePreferences.soleTenancyPreferences.cpuOvercommitRatio' - - api_field: 'virtualMachinePreferences.soleTenancyPreferences.hostMaintenancePolicy' - - api_field: 'virtualMachinePreferences.soleTenancyPreferences.nodeTypes.nodeName' - - api_field: 'virtualMachinePreferences.targetProduct' - - api_field: 'virtualMachinePreferences.vmwareEnginePreferences.commitmentPlan' - - api_field: 'virtualMachinePreferences.vmwareEnginePreferences.cpuOvercommitRatio' - - api_field: 'virtualMachinePreferences.vmwareEnginePreferences.memoryOvercommitRatio' - - api_field: 'virtualMachinePreferences.vmwareEnginePreferences.storageDeduplicationCompressionRatio' + - api_field: createTime + - api_field: description + - api_field: displayName + - field: location + provider_only: true + - api_field: name + - field: preference_set_id + provider_only: true + - api_field: updateTime + - api_field: virtualMachinePreferences.commitmentPlan + - api_field: virtualMachinePreferences.computeEnginePreferences.licenseType + - api_field: virtualMachinePreferences.computeEnginePreferences.machinePreferences.allowedMachineSeries.code + - api_field: virtualMachinePreferences.regionPreferences.preferredRegions + - api_field: virtualMachinePreferences.sizingOptimizationStrategy + - api_field: virtualMachinePreferences.soleTenancyPreferences.commitmentPlan + - api_field: virtualMachinePreferences.soleTenancyPreferences.cpuOvercommitRatio + - api_field: virtualMachinePreferences.soleTenancyPreferences.hostMaintenancePolicy + - api_field: virtualMachinePreferences.soleTenancyPreferences.nodeTypes.nodeName + - api_field: virtualMachinePreferences.targetProduct + - api_field: virtualMachinePreferences.vmwareEnginePreferences.commitmentPlan + - api_field: virtualMachinePreferences.vmwareEnginePreferences.cpuOvercommitRatio + - api_field: virtualMachinePreferences.vmwareEnginePreferences.memoryOvercommitRatio + - api_field: virtualMachinePreferences.vmwareEnginePreferences.storageDeduplicationCompressionRatio diff --git a/google/services/mlengine/resource_ml_engine_model_generated_meta.yaml b/google/services/mlengine/resource_ml_engine_model_generated_meta.yaml index 59cf5d4f224..c9bdb7afe57 100644 --- a/google/services/mlengine/resource_ml_engine_model_generated_meta.yaml +++ b/google/services/mlengine/resource_ml_engine_model_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_ml_engine_model' -generation_type: 'mmv1' -source_file: 'products/mlengine/Model.yaml' -api_service_name: 'ml.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Model' +resource: google_ml_engine_model +generation_type: mmv1 +source_file: products/mlengine/Model.yaml +api_service_name: ml.googleapis.com +api_version: v1 +api_resource_type_kind: Model fields: - - api_field: 'defaultVersion.name' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'onlinePredictionConsoleLogging' - - api_field: 'onlinePredictionLogging' - - api_field: 'regions' - - field: 'terraform_labels' - provider_only: true + - api_field: defaultVersion.name + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: onlinePredictionConsoleLogging + - api_field: onlinePredictionLogging + - api_field: regions + - field: terraform_labels + provider_only: true diff --git a/google/services/modelarmor/resource_model_armor_template_generated_meta.yaml b/google/services/modelarmor/resource_model_armor_template_generated_meta.yaml index c43d0156b5f..ec945c10a8d 100644 --- a/google/services/modelarmor/resource_model_armor_template_generated_meta.yaml +++ b/google/services/modelarmor/resource_model_armor_template_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_model_armor_template' -generation_type: 'mmv1' -source_file: 'products/modelarmor/Template.yaml' -api_service_name: 'modelarmor.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Template' +resource: google_model_armor_template +generation_type: mmv1 +source_file: products/modelarmor/Template.yaml +api_service_name: modelarmor.googleapis.com +api_version: v1 +api_resource_type_kind: Template autogen_status: true fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'filterConfig.maliciousUriFilterSettings.filterEnforcement' - - api_field: 'filterConfig.piAndJailbreakFilterSettings.confidenceLevel' - - api_field: 'filterConfig.piAndJailbreakFilterSettings.filterEnforcement' - - api_field: 'filterConfig.raiSettings.raiFilters.confidenceLevel' - - api_field: 'filterConfig.raiSettings.raiFilters.filterType' - - api_field: 'filterConfig.sdpSettings.advancedConfig.deidentifyTemplate' - - api_field: 'filterConfig.sdpSettings.advancedConfig.inspectTemplate' - - api_field: 'filterConfig.sdpSettings.basicConfig.filterEnforcement' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'template_id' - provider_only: true - - api_field: 'templateMetadata.customLlmResponseSafetyErrorCode' - - api_field: 'templateMetadata.customLlmResponseSafetyErrorMessage' - - api_field: 'templateMetadata.customPromptSafetyErrorCode' - - api_field: 'templateMetadata.customPromptSafetyErrorMessage' - - api_field: 'templateMetadata.enforcementType' - - api_field: 'templateMetadata.ignorePartialInvocationFailures' - - api_field: 'templateMetadata.logSanitizeOperations' - - api_field: 'templateMetadata.logTemplateOperations' - - api_field: 'templateMetadata.multiLanguageDetection.enableMultiLanguageDetection' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: filterConfig.maliciousUriFilterSettings.filterEnforcement + - api_field: filterConfig.piAndJailbreakFilterSettings.confidenceLevel + - api_field: filterConfig.piAndJailbreakFilterSettings.filterEnforcement + - api_field: filterConfig.raiSettings.raiFilters.confidenceLevel + - api_field: filterConfig.raiSettings.raiFilters.filterType + - api_field: filterConfig.sdpSettings.advancedConfig.deidentifyTemplate + - api_field: filterConfig.sdpSettings.advancedConfig.inspectTemplate + - api_field: filterConfig.sdpSettings.basicConfig.filterEnforcement + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: template_id + provider_only: true + - api_field: templateMetadata.customLlmResponseSafetyErrorCode + - api_field: templateMetadata.customLlmResponseSafetyErrorMessage + - api_field: templateMetadata.customPromptSafetyErrorCode + - api_field: templateMetadata.customPromptSafetyErrorMessage + - api_field: templateMetadata.enforcementType + - api_field: templateMetadata.ignorePartialInvocationFailures + - api_field: templateMetadata.logSanitizeOperations + - api_field: templateMetadata.logTemplateOperations + - api_field: templateMetadata.multiLanguageDetection.enableMultiLanguageDetection + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/modelarmorglobal/resource_model_armor_floorsetting_generated_meta.yaml b/google/services/modelarmorglobal/resource_model_armor_floorsetting_generated_meta.yaml index cdf9d38a6c2..191ec7e2a0d 100644 --- a/google/services/modelarmorglobal/resource_model_armor_floorsetting_generated_meta.yaml +++ b/google/services/modelarmorglobal/resource_model_armor_floorsetting_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_model_armor_floorsetting' -generation_type: 'mmv1' -source_file: 'products/modelarmorglobal/Floorsetting.yaml' -api_service_name: 'modelarmor.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Floorsetting' +resource: google_model_armor_floorsetting +generation_type: mmv1 +source_file: products/modelarmorglobal/Floorsetting.yaml +api_service_name: modelarmor.googleapis.com +api_version: v1 +api_resource_type_kind: Floorsetting fields: - - api_field: 'aiPlatformFloorSetting.enableCloudLogging' - - api_field: 'aiPlatformFloorSetting.inspectAndBlock' - - api_field: 'aiPlatformFloorSetting.inspectOnly' - - api_field: 'createTime' - - api_field: 'enableFloorSettingEnforcement' - - api_field: 'filterConfig.maliciousUriFilterSettings.filterEnforcement' - - api_field: 'filterConfig.piAndJailbreakFilterSettings.confidenceLevel' - - api_field: 'filterConfig.piAndJailbreakFilterSettings.filterEnforcement' - - api_field: 'filterConfig.raiSettings.raiFilters.confidenceLevel' - - api_field: 'filterConfig.raiSettings.raiFilters.filterType' - - api_field: 'filterConfig.sdpSettings.advancedConfig.deidentifyTemplate' - - api_field: 'filterConfig.sdpSettings.advancedConfig.inspectTemplate' - - api_field: 'filterConfig.sdpSettings.basicConfig.filterEnforcement' - - api_field: 'floorSettingMetadata.multiLanguageDetection.enableMultiLanguageDetection' - - api_field: 'googleMcpServerFloorSetting.enableCloudLogging' - - api_field: 'googleMcpServerFloorSetting.inspectAndBlock' - - api_field: 'googleMcpServerFloorSetting.inspectOnly' - - api_field: 'integratedServices' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'updateTime' + - api_field: aiPlatformFloorSetting.enableCloudLogging + - api_field: aiPlatformFloorSetting.inspectAndBlock + - api_field: aiPlatformFloorSetting.inspectOnly + - api_field: createTime + - api_field: enableFloorSettingEnforcement + - api_field: filterConfig.maliciousUriFilterSettings.filterEnforcement + - api_field: filterConfig.piAndJailbreakFilterSettings.confidenceLevel + - api_field: filterConfig.piAndJailbreakFilterSettings.filterEnforcement + - api_field: filterConfig.raiSettings.raiFilters.confidenceLevel + - api_field: filterConfig.raiSettings.raiFilters.filterType + - api_field: filterConfig.sdpSettings.advancedConfig.deidentifyTemplate + - api_field: filterConfig.sdpSettings.advancedConfig.inspectTemplate + - api_field: filterConfig.sdpSettings.basicConfig.filterEnforcement + - api_field: floorSettingMetadata.multiLanguageDetection.enableMultiLanguageDetection + - api_field: googleMcpServerFloorSetting.enableCloudLogging + - api_field: googleMcpServerFloorSetting.inspectAndBlock + - api_field: googleMcpServerFloorSetting.inspectOnly + - api_field: integratedServices + - field: location + provider_only: true + - api_field: name + - field: parent + provider_only: true + - api_field: updateTime diff --git a/google/services/monitoring/resource_monitoring_alert_policy_generated_meta.yaml b/google/services/monitoring/resource_monitoring_alert_policy_generated_meta.yaml index 6d132bdfacb..ea29950d43c 100644 --- a/google/services/monitoring/resource_monitoring_alert_policy_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_alert_policy_generated_meta.yaml @@ -1,79 +1,79 @@ -resource: 'google_monitoring_alert_policy' -generation_type: 'mmv1' -source_file: 'products/monitoring/AlertPolicy.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'AlertPolicy' +resource: google_monitoring_alert_policy +generation_type: mmv1 +source_file: products/monitoring/AlertPolicy.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: AlertPolicy fields: - - api_field: 'alertStrategy.autoClose' - - api_field: 'alertStrategy.notificationChannelStrategy.notificationChannelNames' - - api_field: 'alertStrategy.notificationChannelStrategy.renotifyInterval' - - api_field: 'alertStrategy.notificationPrompts' - - api_field: 'alertStrategy.notificationRateLimit.period' - - api_field: 'combiner' - - api_field: 'conditions.conditionAbsent.aggregations.alignmentPeriod' - - api_field: 'conditions.conditionAbsent.aggregations.crossSeriesReducer' - - api_field: 'conditions.conditionAbsent.aggregations.groupByFields' - - api_field: 'conditions.conditionAbsent.aggregations.perSeriesAligner' - - api_field: 'conditions.conditionAbsent.duration' - - api_field: 'conditions.conditionAbsent.filter' - - api_field: 'conditions.conditionAbsent.trigger.count' - - api_field: 'conditions.conditionAbsent.trigger.percent' - - api_field: 'conditions.conditionMatchedLog.filter' - - api_field: 'conditions.conditionMatchedLog.labelExtractors' - - api_field: 'conditions.conditionMonitoringQueryLanguage.duration' - - api_field: 'conditions.conditionMonitoringQueryLanguage.evaluationMissingData' - - api_field: 'conditions.conditionMonitoringQueryLanguage.query' - - api_field: 'conditions.conditionMonitoringQueryLanguage.trigger.count' - - api_field: 'conditions.conditionMonitoringQueryLanguage.trigger.percent' - - api_field: 'conditions.conditionPrometheusQueryLanguage.alertRule' - - api_field: 'conditions.conditionPrometheusQueryLanguage.disableMetricValidation' - - api_field: 'conditions.conditionPrometheusQueryLanguage.duration' - - api_field: 'conditions.conditionPrometheusQueryLanguage.evaluationInterval' - - api_field: 'conditions.conditionPrometheusQueryLanguage.labels' - - api_field: 'conditions.conditionPrometheusQueryLanguage.query' - - api_field: 'conditions.conditionPrometheusQueryLanguage.ruleGroup' - - api_field: 'conditions.conditionSql.booleanTest.column' - - api_field: 'conditions.conditionSql.daily.executionTime.hours' - - api_field: 'conditions.conditionSql.daily.executionTime.minutes' - - api_field: 'conditions.conditionSql.daily.executionTime.nanos' - - api_field: 'conditions.conditionSql.daily.executionTime.seconds' - - api_field: 'conditions.conditionSql.daily.periodicity' - - api_field: 'conditions.conditionSql.hourly.minuteOffset' - - api_field: 'conditions.conditionSql.hourly.periodicity' - - api_field: 'conditions.conditionSql.minutes.periodicity' - - api_field: 'conditions.conditionSql.query' - - api_field: 'conditions.conditionSql.rowCountTest.comparison' - - api_field: 'conditions.conditionSql.rowCountTest.threshold' - - api_field: 'conditions.conditionThreshold.aggregations.alignmentPeriod' - - api_field: 'conditions.conditionThreshold.aggregations.crossSeriesReducer' - - api_field: 'conditions.conditionThreshold.aggregations.groupByFields' - - api_field: 'conditions.conditionThreshold.aggregations.perSeriesAligner' - - api_field: 'conditions.conditionThreshold.comparison' - - api_field: 'conditions.conditionThreshold.denominatorAggregations.alignmentPeriod' - - api_field: 'conditions.conditionThreshold.denominatorAggregations.crossSeriesReducer' - - api_field: 'conditions.conditionThreshold.denominatorAggregations.groupByFields' - - api_field: 'conditions.conditionThreshold.denominatorAggregations.perSeriesAligner' - - api_field: 'conditions.conditionThreshold.denominatorFilter' - - api_field: 'conditions.conditionThreshold.duration' - - api_field: 'conditions.conditionThreshold.evaluationMissingData' - - api_field: 'conditions.conditionThreshold.filter' - - api_field: 'conditions.conditionThreshold.forecastOptions.forecastHorizon' - - api_field: 'conditions.conditionThreshold.thresholdValue' - - api_field: 'conditions.conditionThreshold.trigger.count' - - api_field: 'conditions.conditionThreshold.trigger.percent' - - api_field: 'conditions.displayName' - - api_field: 'conditions.name' - - api_field: 'creationRecord.mutateTime' - - api_field: 'creationRecord.mutatedBy' - - api_field: 'displayName' - - api_field: 'documentation.content' - - api_field: 'documentation.links.displayName' - - api_field: 'documentation.links.url' - - api_field: 'documentation.mimeType' - - api_field: 'documentation.subject' - - api_field: 'enabled' - - api_field: 'name' - - api_field: 'notificationChannels' - - api_field: 'severity' - - api_field: 'userLabels' + - api_field: alertStrategy.autoClose + - api_field: alertStrategy.notificationChannelStrategy.notificationChannelNames + - api_field: alertStrategy.notificationChannelStrategy.renotifyInterval + - api_field: alertStrategy.notificationPrompts + - api_field: alertStrategy.notificationRateLimit.period + - api_field: combiner + - api_field: conditions.conditionAbsent.aggregations.alignmentPeriod + - api_field: conditions.conditionAbsent.aggregations.crossSeriesReducer + - api_field: conditions.conditionAbsent.aggregations.groupByFields + - api_field: conditions.conditionAbsent.aggregations.perSeriesAligner + - api_field: conditions.conditionAbsent.duration + - api_field: conditions.conditionAbsent.filter + - api_field: conditions.conditionAbsent.trigger.count + - api_field: conditions.conditionAbsent.trigger.percent + - api_field: conditions.conditionMatchedLog.filter + - api_field: conditions.conditionMatchedLog.labelExtractors + - api_field: conditions.conditionMonitoringQueryLanguage.duration + - api_field: conditions.conditionMonitoringQueryLanguage.evaluationMissingData + - api_field: conditions.conditionMonitoringQueryLanguage.query + - api_field: conditions.conditionMonitoringQueryLanguage.trigger.count + - api_field: conditions.conditionMonitoringQueryLanguage.trigger.percent + - api_field: conditions.conditionPrometheusQueryLanguage.alertRule + - api_field: conditions.conditionPrometheusQueryLanguage.disableMetricValidation + - api_field: conditions.conditionPrometheusQueryLanguage.duration + - api_field: conditions.conditionPrometheusQueryLanguage.evaluationInterval + - api_field: conditions.conditionPrometheusQueryLanguage.labels + - api_field: conditions.conditionPrometheusQueryLanguage.query + - api_field: conditions.conditionPrometheusQueryLanguage.ruleGroup + - api_field: conditions.conditionSql.booleanTest.column + - api_field: conditions.conditionSql.daily.executionTime.hours + - api_field: conditions.conditionSql.daily.executionTime.minutes + - api_field: conditions.conditionSql.daily.executionTime.nanos + - api_field: conditions.conditionSql.daily.executionTime.seconds + - api_field: conditions.conditionSql.daily.periodicity + - api_field: conditions.conditionSql.hourly.minuteOffset + - api_field: conditions.conditionSql.hourly.periodicity + - api_field: conditions.conditionSql.minutes.periodicity + - api_field: conditions.conditionSql.query + - api_field: conditions.conditionSql.rowCountTest.comparison + - api_field: conditions.conditionSql.rowCountTest.threshold + - api_field: conditions.conditionThreshold.aggregations.alignmentPeriod + - api_field: conditions.conditionThreshold.aggregations.crossSeriesReducer + - api_field: conditions.conditionThreshold.aggregations.groupByFields + - api_field: conditions.conditionThreshold.aggregations.perSeriesAligner + - api_field: conditions.conditionThreshold.comparison + - api_field: conditions.conditionThreshold.denominatorAggregations.alignmentPeriod + - api_field: conditions.conditionThreshold.denominatorAggregations.crossSeriesReducer + - api_field: conditions.conditionThreshold.denominatorAggregations.groupByFields + - api_field: conditions.conditionThreshold.denominatorAggregations.perSeriesAligner + - api_field: conditions.conditionThreshold.denominatorFilter + - api_field: conditions.conditionThreshold.duration + - api_field: conditions.conditionThreshold.evaluationMissingData + - api_field: conditions.conditionThreshold.filter + - api_field: conditions.conditionThreshold.forecastOptions.forecastHorizon + - api_field: conditions.conditionThreshold.thresholdValue + - api_field: conditions.conditionThreshold.trigger.count + - api_field: conditions.conditionThreshold.trigger.percent + - api_field: conditions.displayName + - api_field: conditions.name + - api_field: creationRecord.mutateTime + - api_field: creationRecord.mutatedBy + - api_field: displayName + - api_field: documentation.content + - api_field: documentation.links.displayName + - api_field: documentation.links.url + - api_field: documentation.mimeType + - api_field: documentation.subject + - api_field: enabled + - api_field: name + - api_field: notificationChannels + - api_field: severity + - api_field: userLabels diff --git a/google/services/monitoring/resource_monitoring_custom_service_generated_meta.yaml b/google/services/monitoring/resource_monitoring_custom_service_generated_meta.yaml index f77401a5dd5..efb1d0cc0b8 100644 --- a/google/services/monitoring/resource_monitoring_custom_service_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_custom_service_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_monitoring_custom_service' -generation_type: 'mmv1' -source_file: 'products/monitoring/Service.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Service' +resource: google_monitoring_custom_service +generation_type: mmv1 +source_file: products/monitoring/Service.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: Service fields: - - api_field: 'displayName' - - api_field: 'name' - - api_field: 'name' - field: 'service_id' - - api_field: 'telemetry.resourceName' - - api_field: 'userLabels' + - api_field: displayName + - api_field: name + - api_field: name + field: service_id + - api_field: telemetry.resourceName + - api_field: userLabels diff --git a/google/services/monitoring/resource_monitoring_group_generated_meta.yaml b/google/services/monitoring/resource_monitoring_group_generated_meta.yaml index 70757120860..8e49a9b67c6 100644 --- a/google/services/monitoring/resource_monitoring_group_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_group_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_monitoring_group' -generation_type: 'mmv1' -source_file: 'products/monitoring/Group.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Group' +resource: google_monitoring_group +generation_type: mmv1 +source_file: products/monitoring/Group.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: Group fields: - - api_field: 'displayName' - - api_field: 'filter' - - api_field: 'isCluster' - - api_field: 'name' - - api_field: 'parentName' + - api_field: displayName + - api_field: filter + - api_field: isCluster + - api_field: name + - api_field: parentName diff --git a/google/services/monitoring/resource_monitoring_metric_descriptor_generated_meta.yaml b/google/services/monitoring/resource_monitoring_metric_descriptor_generated_meta.yaml index d6796189e6a..ea5a4f099c8 100644 --- a/google/services/monitoring/resource_monitoring_metric_descriptor_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_metric_descriptor_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_monitoring_metric_descriptor' -generation_type: 'mmv1' -source_file: 'products/monitoring/MetricDescriptor.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'MetricDescriptor' +resource: google_monitoring_metric_descriptor +generation_type: mmv1 +source_file: products/monitoring/MetricDescriptor.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: MetricDescriptor fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'labels.description' - - api_field: 'labels.key' - - api_field: 'labels.valueType' - - api_field: 'launchStage' - - api_field: 'metadata.ingestDelay' - - api_field: 'metadata.samplePeriod' - - api_field: 'metricKind' - - api_field: 'monitoredResourceTypes' - - api_field: 'name' - - api_field: 'type' - - api_field: 'unit' - - api_field: 'valueType' + - api_field: description + - api_field: displayName + - api_field: labels.description + - api_field: labels.key + - api_field: labels.valueType + - api_field: launchStage + - api_field: metadata.ingestDelay + - api_field: metadata.samplePeriod + - api_field: metricKind + - api_field: monitoredResourceTypes + - api_field: name + - api_field: type + - api_field: unit + - api_field: valueType diff --git a/google/services/monitoring/resource_monitoring_monitored_project_generated_meta.yaml b/google/services/monitoring/resource_monitoring_monitored_project_generated_meta.yaml index a1e8d481ca2..431e783d925 100644 --- a/google/services/monitoring/resource_monitoring_monitored_project_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_monitored_project_generated_meta.yaml @@ -1,11 +1,11 @@ -resource: 'google_monitoring_monitored_project' -generation_type: 'mmv1' -source_file: 'products/monitoring/MonitoredProject.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MonitoredProject' +resource: google_monitoring_monitored_project +generation_type: mmv1 +source_file: products/monitoring/MonitoredProject.yaml +api_service_name: monitoring.googleapis.com +api_version: v1 +api_resource_type_kind: MonitoredProject fields: - - api_field: 'createTime' - - field: 'metrics_scope' - provider_only: true - - api_field: 'name' + - api_field: createTime + - field: metrics_scope + provider_only: true + - api_field: name diff --git a/google/services/monitoring/resource_monitoring_notification_channel_generated_meta.yaml b/google/services/monitoring/resource_monitoring_notification_channel_generated_meta.yaml index 69dd85d842c..2e74d23d73d 100644 --- a/google/services/monitoring/resource_monitoring_notification_channel_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_notification_channel_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_monitoring_notification_channel' -generation_type: 'mmv1' -source_file: 'products/monitoring/NotificationChannel.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'NotificationChannel' +resource: google_monitoring_notification_channel +generation_type: mmv1 +source_file: products/monitoring/NotificationChannel.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: NotificationChannel fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'enabled' - - field: 'force_delete' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - field: 'sensitive_labels.auth_token' - provider_only: true - - field: 'sensitive_labels.password' - provider_only: true - - field: 'sensitive_labels.service_key' - provider_only: true - - api_field: 'type' - - api_field: 'userLabels' - - api_field: 'verificationStatus' + - api_field: description + - api_field: displayName + - api_field: enabled + - field: force_delete + provider_only: true + - api_field: labels + - api_field: name + - field: sensitive_labels.auth_token + provider_only: true + - field: sensitive_labels.password + provider_only: true + - field: sensitive_labels.service_key + provider_only: true + - api_field: type + - api_field: userLabels + - api_field: verificationStatus diff --git a/google/services/monitoring/resource_monitoring_service_generated_meta.yaml b/google/services/monitoring/resource_monitoring_service_generated_meta.yaml index 483d9814a13..5d14deae17f 100644 --- a/google/services/monitoring/resource_monitoring_service_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_service_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_monitoring_service' -generation_type: 'mmv1' -source_file: 'products/monitoring/GenericService.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Service' +resource: google_monitoring_service +generation_type: mmv1 +source_file: products/monitoring/GenericService.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: Service fields: - - api_field: 'basicService.serviceLabels' - - api_field: 'basicService.serviceType' - - api_field: 'displayName' - - api_field: 'name' - - field: 'service_id' - provider_only: true - - api_field: 'telemetry.resourceName' - - api_field: 'userLabels' + - api_field: basicService.serviceLabels + - api_field: basicService.serviceType + - api_field: displayName + - api_field: name + - field: service_id + provider_only: true + - api_field: telemetry.resourceName + - api_field: userLabels diff --git a/google/services/monitoring/resource_monitoring_slo_generated_meta.yaml b/google/services/monitoring/resource_monitoring_slo_generated_meta.yaml index 3d1757448b2..c9b639786e3 100644 --- a/google/services/monitoring/resource_monitoring_slo_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_slo_generated_meta.yaml @@ -1,80 +1,80 @@ -resource: 'google_monitoring_slo' -generation_type: 'mmv1' -source_file: 'products/monitoring/Slo.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'ServiceLevelObjective' +resource: google_monitoring_slo +generation_type: mmv1 +source_file: products/monitoring/Slo.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: ServiceLevelObjective fields: - - api_field: 'serviceLevelIndicator.basicSli.availability.enabled' - field: 'basic_sli.availability.enabled' - - api_field: 'serviceLevelIndicator.basicSli.latency.threshold' - field: 'basic_sli.latency.threshold' - - api_field: 'serviceLevelIndicator.basicSli.location' - field: 'basic_sli.location' - - api_field: 'serviceLevelIndicator.basicSli.method' - field: 'basic_sli.method' - - api_field: 'serviceLevelIndicator.basicSli.version' - field: 'basic_sli.version' - - api_field: 'calendarPeriod' - - api_field: 'displayName' - - api_field: 'goal' - - api_field: 'name' - - api_field: 'serviceLevelIndicator.requestBased.distributionCut.distributionFilter' - field: 'request_based_sli.distribution_cut.distribution_filter' - - api_field: 'serviceLevelIndicator.requestBased.distributionCut.range.max' - field: 'request_based_sli.distribution_cut.range.max' - - api_field: 'serviceLevelIndicator.requestBased.distributionCut.range.min' - field: 'request_based_sli.distribution_cut.range.min' - - api_field: 'serviceLevelIndicator.requestBased.goodTotalRatio.badServiceFilter' - field: 'request_based_sli.good_total_ratio.bad_service_filter' - - api_field: 'serviceLevelIndicator.requestBased.goodTotalRatio.goodServiceFilter' - field: 'request_based_sli.good_total_ratio.good_service_filter' - - api_field: 'serviceLevelIndicator.requestBased.goodTotalRatio.totalServiceFilter' - field: 'request_based_sli.good_total_ratio.total_service_filter' - - api_field: 'rollingPeriod' - field: 'rolling_period_days' - - field: 'service' - provider_only: true - - api_field: 'name' - field: 'slo_id' - - api_field: 'userLabels' - - api_field: 'serviceLevelIndicator.windowsBased.goodBadMetricFilter' - field: 'windows_based_sli.good_bad_metric_filter' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.availability.enabled' - field: 'windows_based_sli.good_total_ratio_threshold.basic_sli_performance.availability.enabled' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.latency.threshold' - field: 'windows_based_sli.good_total_ratio_threshold.basic_sli_performance.latency.threshold' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.location' - field: 'windows_based_sli.good_total_ratio_threshold.basic_sli_performance.location' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.method' - field: 'windows_based_sli.good_total_ratio_threshold.basic_sli_performance.method' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.version' - field: 'windows_based_sli.good_total_ratio_threshold.basic_sli_performance.version' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.distributionCut.distributionFilter' - field: 'windows_based_sli.good_total_ratio_threshold.performance.distribution_cut.distribution_filter' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.distributionCut.range.max' - field: 'windows_based_sli.good_total_ratio_threshold.performance.distribution_cut.range.max' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.distributionCut.range.min' - field: 'windows_based_sli.good_total_ratio_threshold.performance.distribution_cut.range.min' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.goodTotalRatio.badServiceFilter' - field: 'windows_based_sli.good_total_ratio_threshold.performance.good_total_ratio.bad_service_filter' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.goodTotalRatio.goodServiceFilter' - field: 'windows_based_sli.good_total_ratio_threshold.performance.good_total_ratio.good_service_filter' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.goodTotalRatio.totalServiceFilter' - field: 'windows_based_sli.good_total_ratio_threshold.performance.good_total_ratio.total_service_filter' - - api_field: 'serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.threshold' - field: 'windows_based_sli.good_total_ratio_threshold.threshold' - - api_field: 'serviceLevelIndicator.windowsBased.metricMeanInRange.range.max' - field: 'windows_based_sli.metric_mean_in_range.range.max' - - api_field: 'serviceLevelIndicator.windowsBased.metricMeanInRange.range.min' - field: 'windows_based_sli.metric_mean_in_range.range.min' - - api_field: 'serviceLevelIndicator.windowsBased.metricMeanInRange.timeSeries' - field: 'windows_based_sli.metric_mean_in_range.time_series' - - api_field: 'serviceLevelIndicator.windowsBased.metricSumInRange.range.max' - field: 'windows_based_sli.metric_sum_in_range.range.max' - - api_field: 'serviceLevelIndicator.windowsBased.metricSumInRange.range.min' - field: 'windows_based_sli.metric_sum_in_range.range.min' - - api_field: 'serviceLevelIndicator.windowsBased.metricSumInRange.timeSeries' - field: 'windows_based_sli.metric_sum_in_range.time_series' - - api_field: 'serviceLevelIndicator.windowsBased.windowPeriod' - field: 'windows_based_sli.window_period' + - api_field: serviceLevelIndicator.basicSli.availability.enabled + field: basic_sli.availability.enabled + - api_field: serviceLevelIndicator.basicSli.latency.threshold + field: basic_sli.latency.threshold + - api_field: serviceLevelIndicator.basicSli.location + field: basic_sli.location + - api_field: serviceLevelIndicator.basicSli.method + field: basic_sli.method + - api_field: serviceLevelIndicator.basicSli.version + field: basic_sli.version + - api_field: calendarPeriod + - api_field: displayName + - api_field: goal + - api_field: name + - api_field: serviceLevelIndicator.requestBased.distributionCut.distributionFilter + field: request_based_sli.distribution_cut.distribution_filter + - api_field: serviceLevelIndicator.requestBased.distributionCut.range.max + field: request_based_sli.distribution_cut.range.max + - api_field: serviceLevelIndicator.requestBased.distributionCut.range.min + field: request_based_sli.distribution_cut.range.min + - api_field: serviceLevelIndicator.requestBased.goodTotalRatio.badServiceFilter + field: request_based_sli.good_total_ratio.bad_service_filter + - api_field: serviceLevelIndicator.requestBased.goodTotalRatio.goodServiceFilter + field: request_based_sli.good_total_ratio.good_service_filter + - api_field: serviceLevelIndicator.requestBased.goodTotalRatio.totalServiceFilter + field: request_based_sli.good_total_ratio.total_service_filter + - api_field: rollingPeriod + field: rolling_period_days + - field: service + provider_only: true + - api_field: name + field: slo_id + - api_field: userLabels + - api_field: serviceLevelIndicator.windowsBased.goodBadMetricFilter + field: windows_based_sli.good_bad_metric_filter + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.availability.enabled + field: windows_based_sli.good_total_ratio_threshold.basic_sli_performance.availability.enabled + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.latency.threshold + field: windows_based_sli.good_total_ratio_threshold.basic_sli_performance.latency.threshold + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.location + field: windows_based_sli.good_total_ratio_threshold.basic_sli_performance.location + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.method + field: windows_based_sli.good_total_ratio_threshold.basic_sli_performance.method + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.basicSliPerformance.version + field: windows_based_sli.good_total_ratio_threshold.basic_sli_performance.version + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.distributionCut.distributionFilter + field: windows_based_sli.good_total_ratio_threshold.performance.distribution_cut.distribution_filter + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.distributionCut.range.max + field: windows_based_sli.good_total_ratio_threshold.performance.distribution_cut.range.max + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.distributionCut.range.min + field: windows_based_sli.good_total_ratio_threshold.performance.distribution_cut.range.min + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.goodTotalRatio.badServiceFilter + field: windows_based_sli.good_total_ratio_threshold.performance.good_total_ratio.bad_service_filter + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.goodTotalRatio.goodServiceFilter + field: windows_based_sli.good_total_ratio_threshold.performance.good_total_ratio.good_service_filter + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.performance.goodTotalRatio.totalServiceFilter + field: windows_based_sli.good_total_ratio_threshold.performance.good_total_ratio.total_service_filter + - api_field: serviceLevelIndicator.windowsBased.goodTotalRatioThreshold.threshold + field: windows_based_sli.good_total_ratio_threshold.threshold + - api_field: serviceLevelIndicator.windowsBased.metricMeanInRange.range.max + field: windows_based_sli.metric_mean_in_range.range.max + - api_field: serviceLevelIndicator.windowsBased.metricMeanInRange.range.min + field: windows_based_sli.metric_mean_in_range.range.min + - api_field: serviceLevelIndicator.windowsBased.metricMeanInRange.timeSeries + field: windows_based_sli.metric_mean_in_range.time_series + - api_field: serviceLevelIndicator.windowsBased.metricSumInRange.range.max + field: windows_based_sli.metric_sum_in_range.range.max + - api_field: serviceLevelIndicator.windowsBased.metricSumInRange.range.min + field: windows_based_sli.metric_sum_in_range.range.min + - api_field: serviceLevelIndicator.windowsBased.metricSumInRange.timeSeries + field: windows_based_sli.metric_sum_in_range.time_series + - api_field: serviceLevelIndicator.windowsBased.windowPeriod + field: windows_based_sli.window_period diff --git a/google/services/monitoring/resource_monitoring_uptime_check_config_generated_meta.yaml b/google/services/monitoring/resource_monitoring_uptime_check_config_generated_meta.yaml index e40c9d48b2d..10ab6903e22 100644 --- a/google/services/monitoring/resource_monitoring_uptime_check_config_generated_meta.yaml +++ b/google/services/monitoring/resource_monitoring_uptime_check_config_generated_meta.yaml @@ -1,46 +1,46 @@ -resource: 'google_monitoring_uptime_check_config' -generation_type: 'mmv1' -source_file: 'products/monitoring/UptimeCheckConfig.yaml' -api_service_name: 'monitoring.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'UptimeCheckConfig' +resource: google_monitoring_uptime_check_config +generation_type: mmv1 +source_file: products/monitoring/UptimeCheckConfig.yaml +api_service_name: monitoring.googleapis.com +api_version: v3 +api_resource_type_kind: UptimeCheckConfig fields: - - api_field: 'checkerType' - - api_field: 'contentMatchers.content' - - api_field: 'contentMatchers.jsonPathMatcher.jsonMatcher' - - api_field: 'contentMatchers.jsonPathMatcher.jsonPath' - - api_field: 'contentMatchers.matcher' - - api_field: 'displayName' - - api_field: 'httpCheck.acceptedResponseStatusCodes.statusClass' - - api_field: 'httpCheck.acceptedResponseStatusCodes.statusValue' - - api_field: 'httpCheck.authInfo.password' - - api_field: 'httpCheck.authInfo.passwordWo' - - api_field: 'httpCheck.authInfo.passwordWoVersion' - - api_field: 'httpCheck.authInfo.username' - - api_field: 'httpCheck.body' - - api_field: 'httpCheck.contentType' - - api_field: 'httpCheck.customContentType' - - api_field: 'httpCheck.headers' - - api_field: 'httpCheck.maskHeaders' - - api_field: 'httpCheck.path' - - api_field: 'httpCheck.pingConfig.pingsCount' - - api_field: 'httpCheck.port' - - api_field: 'httpCheck.requestMethod' - - api_field: 'httpCheck.serviceAgentAuthentication.type' - - api_field: 'httpCheck.useSsl' - - api_field: 'httpCheck.validateSsl' - - api_field: 'logCheckFailures' - - api_field: 'monitoredResource.labels' - - api_field: 'monitoredResource.type' - - api_field: 'name' - - api_field: 'period' - - api_field: 'resourceGroup.groupId' - - api_field: 'resourceGroup.resourceType' - - api_field: 'selectedRegions' - - api_field: 'syntheticMonitor.cloudFunctionV2.name' - - api_field: 'tcpCheck.pingConfig.pingsCount' - - api_field: 'tcpCheck.port' - - api_field: 'timeout' - - api_field: 'id' - field: 'uptime_check_id' - - api_field: 'userLabels' + - api_field: checkerType + - api_field: contentMatchers.content + - api_field: contentMatchers.jsonPathMatcher.jsonMatcher + - api_field: contentMatchers.jsonPathMatcher.jsonPath + - api_field: contentMatchers.matcher + - api_field: displayName + - api_field: httpCheck.acceptedResponseStatusCodes.statusClass + - api_field: httpCheck.acceptedResponseStatusCodes.statusValue + - api_field: httpCheck.authInfo.password + - api_field: httpCheck.authInfo.passwordWo + - api_field: httpCheck.authInfo.passwordWoVersion + - api_field: httpCheck.authInfo.username + - api_field: httpCheck.body + - api_field: httpCheck.contentType + - api_field: httpCheck.customContentType + - api_field: httpCheck.headers + - api_field: httpCheck.maskHeaders + - api_field: httpCheck.path + - api_field: httpCheck.pingConfig.pingsCount + - api_field: httpCheck.port + - api_field: httpCheck.requestMethod + - api_field: httpCheck.serviceAgentAuthentication.type + - api_field: httpCheck.useSsl + - api_field: httpCheck.validateSsl + - api_field: logCheckFailures + - api_field: monitoredResource.labels + - api_field: monitoredResource.type + - api_field: name + - api_field: period + - api_field: resourceGroup.groupId + - api_field: resourceGroup.resourceType + - api_field: selectedRegions + - api_field: syntheticMonitor.cloudFunctionV2.name + - api_field: tcpCheck.pingConfig.pingsCount + - api_field: tcpCheck.port + - api_field: timeout + - api_field: id + field: uptime_check_id + - api_field: userLabels diff --git a/google/services/netapp/resource_netapp_active_directory_generated_meta.yaml b/google/services/netapp/resource_netapp_active_directory_generated_meta.yaml index de1b796dc0a..7c0f4bc0c2a 100644 --- a/google/services/netapp/resource_netapp_active_directory_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_active_directory_generated_meta.yaml @@ -1,36 +1,36 @@ -resource: 'google_netapp_active_directory' -generation_type: 'mmv1' -source_file: 'products/netapp/ActiveDirectory.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ActiveDirectory' +resource: google_netapp_active_directory +generation_type: mmv1 +source_file: products/netapp/ActiveDirectory.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: ActiveDirectory fields: - - api_field: 'administrators' - - api_field: 'aesEncryption' - - api_field: 'backupOperators' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'dns' - - api_field: 'domain' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptDcConnections' - - api_field: 'kdcHostname' - - api_field: 'kdcIp' - - api_field: 'labels' - - api_field: 'ldapSigning' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'netBiosPrefix' - - api_field: 'nfsUsersWithLdap' - - api_field: 'organizationalUnit' - - api_field: 'password' - - api_field: 'securityOperators' - - api_field: 'site' - - api_field: 'state' - - api_field: 'stateDetails' - - field: 'terraform_labels' - provider_only: true - - api_field: 'username' + - api_field: administrators + - api_field: aesEncryption + - api_field: backupOperators + - api_field: createTime + - api_field: description + - api_field: dns + - api_field: domain + - field: effective_labels + provider_only: true + - api_field: encryptDcConnections + - api_field: kdcHostname + - api_field: kdcIp + - api_field: labels + - api_field: ldapSigning + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: netBiosPrefix + - api_field: nfsUsersWithLdap + - api_field: organizationalUnit + - api_field: password + - api_field: securityOperators + - api_field: site + - api_field: state + - api_field: stateDetails + - field: terraform_labels + provider_only: true + - api_field: username diff --git a/google/services/netapp/resource_netapp_backup_generated_meta.yaml b/google/services/netapp/resource_netapp_backup_generated_meta.yaml index fbef7e5fae5..34751a548da 100644 --- a/google/services/netapp/resource_netapp_backup_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_backup_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_netapp_backup' -generation_type: 'mmv1' -source_file: 'products/netapp/Backup.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Backup' +resource: google_netapp_backup +generation_type: mmv1 +source_file: products/netapp/Backup.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: Backup api_variant_patterns: - - 'projects/{project}/locations/{location}/backupVaults/{backupVault}/backups/{backup}' + - projects/{project}/locations/{location}/backupVaults/{backupVault}/backups/{backup} fields: - - api_field: 'backupRegion' - - api_field: 'backupType' - - api_field: 'chainStorageBytes' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'sourceSnapshot' - - api_field: 'sourceVolume' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - field: 'vault_name' - provider_only: true - - api_field: 'volumeRegion' - - api_field: 'volumeUsageBytes' + - api_field: backupRegion + - api_field: backupType + - api_field: chainStorageBytes + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: sourceSnapshot + - api_field: sourceVolume + - api_field: state + - field: terraform_labels + provider_only: true + - field: vault_name + provider_only: true + - api_field: volumeRegion + - api_field: volumeUsageBytes diff --git a/google/services/netapp/resource_netapp_backup_policy_generated_meta.yaml b/google/services/netapp/resource_netapp_backup_policy_generated_meta.yaml index 33ca2d41e8e..ffb401c0cfd 100644 --- a/google/services/netapp/resource_netapp_backup_policy_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_backup_policy_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_netapp_backup_policy' -generation_type: 'mmv1' -source_file: 'products/netapp/BackupPolicy.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupPolicy' +resource: google_netapp_backup_policy +generation_type: mmv1 +source_file: products/netapp/BackupPolicy.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: BackupPolicy fields: - - api_field: 'assignedVolumeCount' - - api_field: 'createTime' - - api_field: 'dailyBackupLimit' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'enabled' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'monthlyBackupLimit' - - field: 'name' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'weeklyBackupLimit' + - api_field: assignedVolumeCount + - api_field: createTime + - api_field: dailyBackupLimit + - api_field: description + - field: effective_labels + provider_only: true + - api_field: enabled + - api_field: labels + - field: location + provider_only: true + - api_field: monthlyBackupLimit + - field: name + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: weeklyBackupLimit diff --git a/google/services/netapp/resource_netapp_backup_vault_generated_meta.yaml b/google/services/netapp/resource_netapp_backup_vault_generated_meta.yaml index 23d5150defa..99a0bed56b3 100644 --- a/google/services/netapp/resource_netapp_backup_vault_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_backup_vault_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_netapp_backup_vault' -generation_type: 'mmv1' -source_file: 'products/netapp/BackupVault.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupVault' +resource: google_netapp_backup_vault +generation_type: mmv1 +source_file: products/netapp/BackupVault.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: BackupVault fields: - - api_field: 'backupRegion' - - api_field: 'backupRetentionPolicy.backupMinimumEnforcedRetentionDays' - - api_field: 'backupRetentionPolicy.dailyBackupImmutable' - - api_field: 'backupRetentionPolicy.manualBackupImmutable' - - api_field: 'backupRetentionPolicy.monthlyBackupImmutable' - - api_field: 'backupRetentionPolicy.weeklyBackupImmutable' - - api_field: 'backupVaultType' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'destinationBackupVault' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'sourceBackupVault' - - api_field: 'sourceRegion' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: backupRegion + - api_field: backupRetentionPolicy.backupMinimumEnforcedRetentionDays + - api_field: backupRetentionPolicy.dailyBackupImmutable + - api_field: backupRetentionPolicy.manualBackupImmutable + - api_field: backupRetentionPolicy.monthlyBackupImmutable + - api_field: backupRetentionPolicy.weeklyBackupImmutable + - api_field: backupVaultType + - api_field: createTime + - api_field: description + - api_field: destinationBackupVault + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: sourceBackupVault + - api_field: sourceRegion + - api_field: state + - field: terraform_labels + provider_only: true diff --git a/google/services/netapp/resource_netapp_host_group.go b/google/services/netapp/resource_netapp_host_group.go index 5963caf0d36..a361c556fe7 100644 --- a/google/services/netapp/resource_netapp_host_group.go +++ b/google/services/netapp/resource_netapp_host_group.go @@ -112,11 +112,11 @@ func ResourceNetappHostGroup() *schema.Resource { Version: 1, SchemaFunc: func() map[string]*schema.Schema { return map[string]*schema.Schema{ - "location": { + "name": { Type: schema.TypeString, RequiredForImport: true, }, - "name": { + "location": { Type: schema.TypeString, RequiredForImport: true, }, @@ -221,6 +221,12 @@ func resourceNetappHostGroupCreate(d *schema.ResourceData, meta interface{}) err } obj := make(map[string]interface{}) + nameProp, err := expandNetappHostGroupName(d.Get("name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("name"); !tpgresource.IsEmptyValue(reflect.ValueOf(nameProp)) && (ok || !reflect.DeepEqual(v, nameProp)) { + obj["name"] = nameProp + } descriptionProp, err := expandNetappHostGroupDescription(d.Get("description"), d, config) if err != nil { return err @@ -295,16 +301,16 @@ func resourceNetappHostGroupCreate(d *schema.ResourceData, meta interface{}) err identity, err := d.Identity() if err == nil && identity != nil { - if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { - if err = identity.Set("location", locationValue.(string)); err != nil { - return fmt.Errorf("Error setting location: %s", err) - } - } if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { if err = identity.Set("name", nameValue.(string)); err != nil { return fmt.Errorf("Error setting name: %s", err) } } + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { if err = identity.Set("project", projectValue.(string)); err != nil { return fmt.Errorf("Error setting project: %s", err) @@ -371,6 +377,9 @@ func resourceNetappHostGroupRead(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error reading HostGroup: %s", err) } + if err := d.Set("name", flattenNetappHostGroupName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading HostGroup: %s", err) + } if err := d.Set("state", flattenNetappHostGroupState(res["state"], d, config)); err != nil { return fmt.Errorf("Error reading HostGroup: %s", err) } @@ -401,18 +410,18 @@ func resourceNetappHostGroupRead(d *schema.ResourceData, meta interface{}) error identity, err := d.Identity() if err == nil && identity != nil { - if v, ok := identity.GetOk("location"); !ok && v == "" { - err = identity.Set("location", d.Get("location").(string)) - if err != nil { - return fmt.Errorf("Error setting location: %s", err) - } - } if v, ok := identity.GetOk("name"); !ok && v == "" { err = identity.Set("name", d.Get("name").(string)) if err != nil { return fmt.Errorf("Error setting name: %s", err) } } + if v, ok := identity.GetOk("location"); !ok && v == "" { + err = identity.Set("location", d.Get("location").(string)) + if err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } if v, ok := identity.GetOk("project"); !ok && v == "" { err = identity.Set("project", d.Get("project").(string)) if err != nil { @@ -435,16 +444,16 @@ func resourceNetappHostGroupUpdate(d *schema.ResourceData, meta interface{}) err identity, err := d.Identity() if err == nil && identity != nil { - if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { - if err = identity.Set("location", locationValue.(string)); err != nil { - return fmt.Errorf("Error setting location: %s", err) - } - } if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { if err = identity.Set("name", nameValue.(string)); err != nil { return fmt.Errorf("Error setting name: %s", err) } } + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { if err = identity.Set("project", projectValue.(string)); err != nil { return fmt.Errorf("Error setting project: %s", err) @@ -621,6 +630,13 @@ func resourceNetappHostGroupImport(d *schema.ResourceData, meta interface{}) ([] return []*schema.ResourceData{d}, nil } +func flattenNetappHostGroupName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + return tpgresource.GetResourceNameFromSelfLink(v.(string)) +} + func flattenNetappHostGroupState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { return v } @@ -679,6 +695,10 @@ func flattenNetappHostGroupEffectiveLabels(v interface{}, d *schema.ResourceData return v } +func expandNetappHostGroupName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandNetappHostGroupDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/google/services/netapp/resource_netapp_host_group_generated_meta.yaml b/google/services/netapp/resource_netapp_host_group_generated_meta.yaml index 788e8104090..f6b75a613ac 100644 --- a/google/services/netapp/resource_netapp_host_group_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_host_group_generated_meta.yaml @@ -1,22 +1,21 @@ -resource: 'google_netapp_host_group' -generation_type: 'mmv1' -source_file: 'products/netapp/HostGroup.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HostGroup' +resource: google_netapp_host_group +generation_type: mmv1 +source_file: products/netapp/HostGroup.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: HostGroup fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'hosts' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'osType' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: hosts + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: osType + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: type diff --git a/google/services/netapp/resource_netapp_host_group_generated_test.go b/google/services/netapp/resource_netapp_host_group_generated_test.go index 9f0e438e848..ffc4174cef8 100644 --- a/google/services/netapp/resource_netapp_host_group_generated_test.go +++ b/google/services/netapp/resource_netapp_host_group_generated_test.go @@ -69,7 +69,7 @@ func TestAccNetappHostGroup_netappHostGroupExample(t *testing.T) { ResourceName: "google_netapp_host_group.test_host_group", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"labels", "location", "name", "terraform_labels"}, + ImportStateVerifyIgnore: []string{"labels", "location", "terraform_labels"}, }, { ResourceName: "google_netapp_host_group.test_host_group", diff --git a/google/services/netapp/resource_netapp_kmsconfig_generated_meta.yaml b/google/services/netapp/resource_netapp_kmsconfig_generated_meta.yaml index 8889aeb3423..52c2bfac2ec 100644 --- a/google/services/netapp/resource_netapp_kmsconfig_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_kmsconfig_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_netapp_kmsconfig' -generation_type: 'mmv1' -source_file: 'products/netapp/kmsconfig.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'KmsConfig' +resource: google_netapp_kmsconfig +generation_type: mmv1 +source_file: products/netapp/kmsconfig.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: KmsConfig fields: - - api_field: 'cryptoKeyName' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'instructions' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'serviceAccount' - - field: 'terraform_labels' - provider_only: true + - api_field: cryptoKeyName + - api_field: description + - field: effective_labels + provider_only: true + - api_field: instructions + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: serviceAccount + - field: terraform_labels + provider_only: true diff --git a/google/services/netapp/resource_netapp_storage_pool_generated_meta.yaml b/google/services/netapp/resource_netapp_storage_pool_generated_meta.yaml index 98e29ebe4c6..b8c491a1cc5 100644 --- a/google/services/netapp/resource_netapp_storage_pool_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_storage_pool_generated_meta.yaml @@ -1,39 +1,39 @@ -resource: 'google_netapp_storage_pool' -generation_type: 'mmv1' -source_file: 'products/netapp/StoragePool.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'StoragePool' +resource: google_netapp_storage_pool +generation_type: mmv1 +source_file: products/netapp/StoragePool.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: StoragePool fields: - - api_field: 'activeDirectory' - - api_field: 'allowAutoTiering' - - api_field: 'availableThroughputMibps' - - api_field: 'capacityGib' - - api_field: 'coldTierSizeUsedGib' - - api_field: 'customPerformanceEnabled' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableHotTierAutoResize' - - api_field: 'encryptionType' - - api_field: 'hotTierSizeGib' - - api_field: 'hotTierSizeUsedGib' - - api_field: 'kmsConfig' - - api_field: 'labels' - - api_field: 'ldapEnabled' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'qosType' - - api_field: 'replicaZone' - - api_field: 'serviceLevel' - - field: 'terraform_labels' - provider_only: true - - api_field: 'totalIops' - - api_field: 'totalThroughputMibps' - - api_field: 'type' - - api_field: 'volumeCapacityGib' - - api_field: 'volumeCount' - - api_field: 'zone' + - api_field: activeDirectory + - api_field: allowAutoTiering + - api_field: availableThroughputMibps + - api_field: capacityGib + - api_field: coldTierSizeUsedGib + - api_field: customPerformanceEnabled + - api_field: description + - field: effective_labels + provider_only: true + - api_field: enableHotTierAutoResize + - api_field: encryptionType + - api_field: hotTierSizeGib + - api_field: hotTierSizeUsedGib + - api_field: kmsConfig + - api_field: labels + - api_field: ldapEnabled + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: network + - api_field: qosType + - api_field: replicaZone + - api_field: serviceLevel + - field: terraform_labels + provider_only: true + - api_field: totalIops + - api_field: totalThroughputMibps + - api_field: type + - api_field: volumeCapacityGib + - api_field: volumeCount + - api_field: zone diff --git a/google/services/netapp/resource_netapp_volume.go b/google/services/netapp/resource_netapp_volume.go index 7ef532565a9..71132043dad 100644 --- a/google/services/netapp/resource_netapp_volume.go +++ b/google/services/netapp/resource_netapp_volume.go @@ -485,16 +485,19 @@ It overwrites the has_root_access parameter. Use either squash_mode or has_root_ }, }, "hybrid_replication_parameters": { - Type: schema.TypeList, - Optional: true, - Description: `The Hybrid Replication parameters for the volume.`, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + Description: `[Volume migration](https://docs.cloud.google.com/netapp/volumes/docs/migrate/ontap/overview) and +[external replication](https://docs.cloud.google.com/netapp/volumes/docs/protect-data/replicate-ontap/overview) +are two types of Hybrid Replication. This parameter block specifies the parameters for a hybrid replication.`, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cluster_location": { - Type: schema.TypeString, - Optional: true, - Description: `Optional. Name of source cluster location associated with the Hybrid replication. This is a free-form field for the display purpose only.`, + Type: schema.TypeString, + Optional: true, + Description: `Optional. Name of source cluster location associated with the replication. This is a free-form field +for display purposes only.`, }, "description": { Type: schema.TypeString, @@ -505,7 +508,10 @@ It overwrites the has_root_access parameter. Use either squash_mode or has_root_ Type: schema.TypeString, Optional: true, ValidateFunc: verify.ValidateEnum([]string{"MIGRATION", "CONTINUOUS_REPLICATION", "ONPREM_REPLICATION", "REVERSE_ONPREM_REPLICATION", ""}), - Description: `Optional. Type of the volume's hybrid replication. Possible values: ["MIGRATION", "CONTINUOUS_REPLICATION", "ONPREM_REPLICATION", "REVERSE_ONPREM_REPLICATION"]`, + Description: `Optional. Type of the hybrid replication. Use 'MIGRATION' to create a volume migration +and 'ONPREM_REPLICATION' to create an external replication. +Other values are read-only. 'REVERSE_ONPREM_REPLICATION' is used to represent an external +replication which got reversed. Default is 'MIGRATION'. Possible values: ["MIGRATION", "CONTINUOUS_REPLICATION", "ONPREM_REPLICATION", "REVERSE_ONPREM_REPLICATION"]`, }, "labels": { Type: schema.TypeMap, @@ -517,17 +523,17 @@ An object containing a list of "key": value pairs. Example: { "name": "wrench", "large_volume_constituent_count": { Type: schema.TypeInt, Optional: true, - Description: `Optional. Constituent volume count for large volume.`, + Description: `Optional. If the source is a FlexGroup volume, this field needs to match the number of constituents in the FlexGroup.`, }, "peer_cluster_name": { Type: schema.TypeString, Optional: true, - Description: `Required. Name of the user's local source cluster to be peered with the destination cluster.`, + Description: `Required. Name of the ONTAP source cluster to be peered with NetApp Volumes.`, }, "peer_ip_addresses": { Type: schema.TypeList, Optional: true, - Description: `Required. List of node ip addresses to be peered with.`, + Description: `Required. List of all intercluster LIF IP addresses of the ONTAP source cluster.`, Elem: &schema.Schema{ Type: schema.TypeString, }, @@ -535,12 +541,12 @@ An object containing a list of "key": value pairs. Example: { "name": "wrench", "peer_svm_name": { Type: schema.TypeString, Optional: true, - Description: `Required. Name of the user's local source vserver svm to be peered with the destination vserver svm.`, + Description: `Required. Name of the ONTAP source vserver SVM to be peered with NetApp Volumes.`, }, "peer_volume_name": { Type: schema.TypeString, Optional: true, - Description: `Required. Name of the user's local source volume to be peered with the destination volume.`, + Description: `Required. Name of the ONTAP source volume to be replicated to NetApp Volumes destination volume.`, }, "replication": { Type: schema.TypeString, diff --git a/google/services/netapp/resource_netapp_volume_generated_meta.yaml b/google/services/netapp/resource_netapp_volume_generated_meta.yaml index 6547e1f2a06..90fb3d4d199 100644 --- a/google/services/netapp/resource_netapp_volume_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_volume_generated_meta.yaml @@ -1,115 +1,115 @@ -resource: 'google_netapp_volume' -generation_type: 'mmv1' -source_file: 'products/netapp/Volume.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Volume' +resource: google_netapp_volume +generation_type: mmv1 +source_file: products/netapp/Volume.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: Volume fields: - - api_field: 'activeDirectory' - - api_field: 'backupConfig.backupPolicies' - - api_field: 'backupConfig.backupVault' - - api_field: 'backupConfig.scheduledBackupEnabled' - - api_field: 'blockDevices.hostGroups' - - api_field: 'blockDevices.identifier' - - api_field: 'blockDevices.name' - - api_field: 'blockDevices.osType' - - api_field: 'blockDevices.sizeGib' - - api_field: 'cacheParameters.cacheConfig.cifsChangeNotifyEnabled' - - api_field: 'cacheParameters.cacheState' - - api_field: 'cacheParameters.command' - - api_field: 'cacheParameters.enableGlobalFileLock' - - api_field: 'cacheParameters.passphrase' - - api_field: 'cacheParameters.peerClusterName' - - api_field: 'cacheParameters.peerIpAddresses' - - api_field: 'cacheParameters.peerSvmName' - - api_field: 'cacheParameters.peerVolumeName' - - api_field: 'cacheParameters.peeringCommandExpiryTime' - - api_field: 'cacheParameters.stateDetails' - - api_field: 'capacityGib' - - api_field: 'coldTierSizeGib' - - api_field: 'createTime' - - field: 'deletion_policy' - provider_only: true - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionType' - - api_field: 'exportPolicy.rules.accessType' - - api_field: 'exportPolicy.rules.allowedClients' - - api_field: 'exportPolicy.rules.anonUid' - - api_field: 'exportPolicy.rules.hasRootAccess' - - api_field: 'exportPolicy.rules.kerberos5ReadOnly' - - api_field: 'exportPolicy.rules.kerberos5ReadWrite' - - api_field: 'exportPolicy.rules.kerberos5iReadOnly' - - api_field: 'exportPolicy.rules.kerberos5iReadWrite' - - api_field: 'exportPolicy.rules.kerberos5pReadOnly' - - api_field: 'exportPolicy.rules.kerberos5pReadWrite' - - api_field: 'exportPolicy.rules.nfsv3' - - api_field: 'exportPolicy.rules.nfsv4' - - api_field: 'exportPolicy.rules.squashMode' - - api_field: 'hasReplication' - - api_field: 'hotTierSizeUsedGib' - - api_field: 'hybridReplicationParameters.clusterLocation' - - api_field: 'hybridReplicationParameters.description' - - api_field: 'hybridReplicationParameters.hybridReplicationType' - - api_field: 'hybridReplicationParameters.labels' - - api_field: 'hybridReplicationParameters.largeVolumeConstituentCount' - - api_field: 'hybridReplicationParameters.peerClusterName' - - api_field: 'hybridReplicationParameters.peerIpAddresses' - - api_field: 'hybridReplicationParameters.peerSvmName' - - api_field: 'hybridReplicationParameters.peerVolumeName' - - api_field: 'hybridReplicationParameters.replication' - - api_field: 'hybridReplicationParameters.replicationSchedule' - - api_field: 'kerberosEnabled' - - api_field: 'kmsConfig' - - api_field: 'labels' - - api_field: 'largeCapacity' - - api_field: 'ldapEnabled' - - field: 'location' - provider_only: true - - api_field: 'mountOptions.export' - - api_field: 'mountOptions.exportFull' - - api_field: 'mountOptions.instructions' - - api_field: 'mountOptions.ipAddress' - - api_field: 'mountOptions.protocol' - - api_field: 'multipleEndpoints' - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'protocols' - - api_field: 'psaRange' - - api_field: 'replicaZone' - - api_field: 'restoreParameters.sourceBackup' - - api_field: 'restoreParameters.sourceSnapshot' - - api_field: 'restrictedActions' - - api_field: 'securityStyle' - - api_field: 'serviceLevel' - - api_field: 'shareName' - - api_field: 'smbSettings' - - api_field: 'snapshotDirectory' - - api_field: 'snapshotPolicy.dailySchedule.hour' - - api_field: 'snapshotPolicy.dailySchedule.minute' - - api_field: 'snapshotPolicy.dailySchedule.snapshotsToKeep' - - api_field: 'snapshotPolicy.enabled' - - api_field: 'snapshotPolicy.hourlySchedule.minute' - - api_field: 'snapshotPolicy.hourlySchedule.snapshotsToKeep' - - api_field: 'snapshotPolicy.monthlySchedule.daysOfMonth' - - api_field: 'snapshotPolicy.monthlySchedule.hour' - - api_field: 'snapshotPolicy.monthlySchedule.minute' - - api_field: 'snapshotPolicy.monthlySchedule.snapshotsToKeep' - - api_field: 'snapshotPolicy.weeklySchedule.day' - - api_field: 'snapshotPolicy.weeklySchedule.hour' - - api_field: 'snapshotPolicy.weeklySchedule.minute' - - api_field: 'snapshotPolicy.weeklySchedule.snapshotsToKeep' - - api_field: 'state' - - api_field: 'stateDetails' - - api_field: 'storagePool' - - field: 'terraform_labels' - provider_only: true - - api_field: 'throughputMibps' - - api_field: 'tieringPolicy.coolingThresholdDays' - - api_field: 'tieringPolicy.hotTierBypassModeEnabled' - - api_field: 'tieringPolicy.tierAction' - - api_field: 'unixPermissions' - - api_field: 'usedGib' - - api_field: 'zone' + - api_field: activeDirectory + - api_field: backupConfig.backupPolicies + - api_field: backupConfig.backupVault + - api_field: backupConfig.scheduledBackupEnabled + - api_field: blockDevices.hostGroups + - api_field: blockDevices.identifier + - api_field: blockDevices.name + - api_field: blockDevices.osType + - api_field: blockDevices.sizeGib + - api_field: cacheParameters.cacheConfig.cifsChangeNotifyEnabled + - api_field: cacheParameters.cacheState + - api_field: cacheParameters.command + - api_field: cacheParameters.enableGlobalFileLock + - api_field: cacheParameters.passphrase + - api_field: cacheParameters.peerClusterName + - api_field: cacheParameters.peerIpAddresses + - api_field: cacheParameters.peerSvmName + - api_field: cacheParameters.peerVolumeName + - api_field: cacheParameters.peeringCommandExpiryTime + - api_field: cacheParameters.stateDetails + - api_field: capacityGib + - api_field: coldTierSizeGib + - api_field: createTime + - field: deletion_policy + provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: encryptionType + - api_field: exportPolicy.rules.accessType + - api_field: exportPolicy.rules.allowedClients + - api_field: exportPolicy.rules.anonUid + - api_field: exportPolicy.rules.hasRootAccess + - api_field: exportPolicy.rules.kerberos5ReadOnly + - api_field: exportPolicy.rules.kerberos5ReadWrite + - api_field: exportPolicy.rules.kerberos5iReadOnly + - api_field: exportPolicy.rules.kerberos5iReadWrite + - api_field: exportPolicy.rules.kerberos5pReadOnly + - api_field: exportPolicy.rules.kerberos5pReadWrite + - api_field: exportPolicy.rules.nfsv3 + - api_field: exportPolicy.rules.nfsv4 + - api_field: exportPolicy.rules.squashMode + - api_field: hasReplication + - api_field: hotTierSizeUsedGib + - api_field: hybridReplicationParameters.clusterLocation + - api_field: hybridReplicationParameters.description + - api_field: hybridReplicationParameters.hybridReplicationType + - api_field: hybridReplicationParameters.labels + - api_field: hybridReplicationParameters.largeVolumeConstituentCount + - api_field: hybridReplicationParameters.peerClusterName + - api_field: hybridReplicationParameters.peerIpAddresses + - api_field: hybridReplicationParameters.peerSvmName + - api_field: hybridReplicationParameters.peerVolumeName + - api_field: hybridReplicationParameters.replication + - api_field: hybridReplicationParameters.replicationSchedule + - api_field: kerberosEnabled + - api_field: kmsConfig + - api_field: labels + - api_field: largeCapacity + - api_field: ldapEnabled + - field: location + provider_only: true + - api_field: mountOptions.export + - api_field: mountOptions.exportFull + - api_field: mountOptions.instructions + - api_field: mountOptions.ipAddress + - api_field: mountOptions.protocol + - api_field: multipleEndpoints + - field: name + provider_only: true + - api_field: network + - api_field: protocols + - api_field: psaRange + - api_field: replicaZone + - api_field: restoreParameters.sourceBackup + - api_field: restoreParameters.sourceSnapshot + - api_field: restrictedActions + - api_field: securityStyle + - api_field: serviceLevel + - api_field: shareName + - api_field: smbSettings + - api_field: snapshotDirectory + - api_field: snapshotPolicy.dailySchedule.hour + - api_field: snapshotPolicy.dailySchedule.minute + - api_field: snapshotPolicy.dailySchedule.snapshotsToKeep + - api_field: snapshotPolicy.enabled + - api_field: snapshotPolicy.hourlySchedule.minute + - api_field: snapshotPolicy.hourlySchedule.snapshotsToKeep + - api_field: snapshotPolicy.monthlySchedule.daysOfMonth + - api_field: snapshotPolicy.monthlySchedule.hour + - api_field: snapshotPolicy.monthlySchedule.minute + - api_field: snapshotPolicy.monthlySchedule.snapshotsToKeep + - api_field: snapshotPolicy.weeklySchedule.day + - api_field: snapshotPolicy.weeklySchedule.hour + - api_field: snapshotPolicy.weeklySchedule.minute + - api_field: snapshotPolicy.weeklySchedule.snapshotsToKeep + - api_field: state + - api_field: stateDetails + - api_field: storagePool + - field: terraform_labels + provider_only: true + - api_field: throughputMibps + - api_field: tieringPolicy.coolingThresholdDays + - api_field: tieringPolicy.hotTierBypassModeEnabled + - api_field: tieringPolicy.tierAction + - api_field: unixPermissions + - api_field: usedGib + - api_field: zone diff --git a/google/services/netapp/resource_netapp_volume_quota_rule_generated_meta.yaml b/google/services/netapp/resource_netapp_volume_quota_rule_generated_meta.yaml index 82b4d35a0bf..4e24c25cf8e 100644 --- a/google/services/netapp/resource_netapp_volume_quota_rule_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_volume_quota_rule_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_netapp_volume_quota_rule' -generation_type: 'mmv1' -source_file: 'products/netapp/VolumeQuotaRule.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'QuotaRule' +resource: google_netapp_volume_quota_rule +generation_type: mmv1 +source_file: products/netapp/VolumeQuotaRule.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: QuotaRule fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'diskLimitMib' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'state' - - api_field: 'stateDetails' - - api_field: 'target' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - field: 'volume_name' - provider_only: true + - api_field: createTime + - api_field: description + - api_field: diskLimitMib + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: state + - api_field: stateDetails + - api_field: target + - field: terraform_labels + provider_only: true + - api_field: type + - field: volume_name + provider_only: true diff --git a/google/services/netapp/resource_netapp_volume_replication_generated_meta.yaml b/google/services/netapp/resource_netapp_volume_replication_generated_meta.yaml index 5df1e07fc4b..2a21c7f9d72 100644 --- a/google/services/netapp/resource_netapp_volume_replication_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_volume_replication_generated_meta.yaml @@ -1,59 +1,59 @@ -resource: 'google_netapp_volume_replication' -generation_type: 'mmv1' -source_file: 'products/netapp/VolumeReplication.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Replication' +resource: google_netapp_volume_replication +generation_type: mmv1 +source_file: products/netapp/VolumeReplication.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: Replication fields: - - api_field: 'createTime' - - field: 'delete_destination_volume' - provider_only: true - - api_field: 'description' - - api_field: 'destinationVolume' - - api_field: 'destinationVolumeParameters.description' - - api_field: 'destinationVolumeParameters.shareName' - - api_field: 'destinationVolumeParameters.storagePool' - - api_field: 'destinationVolumeParameters.tieringPolicy.coolingThresholdDays' - - api_field: 'destinationVolumeParameters.tieringPolicy.tierAction' - - api_field: 'destinationVolumeParameters.volumeId' - - field: 'effective_labels' - provider_only: true - - field: 'force_stopping' - provider_only: true - - api_field: 'healthy' - - api_field: 'hybridPeeringDetails.command' - - api_field: 'hybridPeeringDetails.commandExpiryTime' - - api_field: 'hybridPeeringDetails.passphrase' - - api_field: 'hybridPeeringDetails.peerClusterName' - - api_field: 'hybridPeeringDetails.peerSvmName' - - api_field: 'hybridPeeringDetails.peerVolumeName' - - api_field: 'hybridPeeringDetails.subnetIp' - - api_field: 'hybridReplicationType' - - api_field: 'hybridReplicationUserCommands.commands' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mirrorState' - - field: 'name' - provider_only: true - - field: 'replication_enabled' - provider_only: true - - api_field: 'replicationSchedule' - - api_field: 'role' - - api_field: 'sourceVolume' - - api_field: 'state' - - api_field: 'stateDetails' - - field: 'terraform_labels' - provider_only: true - - api_field: 'transferStats.lagDuration' - - api_field: 'transferStats.lastTransferBytes' - - api_field: 'transferStats.lastTransferDuration' - - api_field: 'transferStats.lastTransferEndTime' - - api_field: 'transferStats.lastTransferError' - - api_field: 'transferStats.totalTransferDuration' - - api_field: 'transferStats.transferBytes' - - api_field: 'transferStats.updateTime' - - field: 'volume_name' - provider_only: true - - field: 'wait_for_mirror' - provider_only: true + - api_field: createTime + - field: delete_destination_volume + provider_only: true + - api_field: description + - api_field: destinationVolume + - api_field: destinationVolumeParameters.description + - api_field: destinationVolumeParameters.shareName + - api_field: destinationVolumeParameters.storagePool + - api_field: destinationVolumeParameters.tieringPolicy.coolingThresholdDays + - api_field: destinationVolumeParameters.tieringPolicy.tierAction + - api_field: destinationVolumeParameters.volumeId + - field: effective_labels + provider_only: true + - field: force_stopping + provider_only: true + - api_field: healthy + - api_field: hybridPeeringDetails.command + - api_field: hybridPeeringDetails.commandExpiryTime + - api_field: hybridPeeringDetails.passphrase + - api_field: hybridPeeringDetails.peerClusterName + - api_field: hybridPeeringDetails.peerSvmName + - api_field: hybridPeeringDetails.peerVolumeName + - api_field: hybridPeeringDetails.subnetIp + - api_field: hybridReplicationType + - api_field: hybridReplicationUserCommands.commands + - api_field: labels + - field: location + provider_only: true + - api_field: mirrorState + - field: name + provider_only: true + - field: replication_enabled + provider_only: true + - api_field: replicationSchedule + - api_field: role + - api_field: sourceVolume + - api_field: state + - api_field: stateDetails + - field: terraform_labels + provider_only: true + - api_field: transferStats.lagDuration + - api_field: transferStats.lastTransferBytes + - api_field: transferStats.lastTransferDuration + - api_field: transferStats.lastTransferEndTime + - api_field: transferStats.lastTransferError + - api_field: transferStats.totalTransferDuration + - api_field: transferStats.transferBytes + - api_field: transferStats.updateTime + - field: volume_name + provider_only: true + - field: wait_for_mirror + provider_only: true diff --git a/google/services/netapp/resource_netapp_volume_snapshot_generated_meta.yaml b/google/services/netapp/resource_netapp_volume_snapshot_generated_meta.yaml index c6b1c8e7765..6f6085e27ee 100644 --- a/google/services/netapp/resource_netapp_volume_snapshot_generated_meta.yaml +++ b/google/services/netapp/resource_netapp_volume_snapshot_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_netapp_volume_snapshot' -generation_type: 'mmv1' -source_file: 'products/netapp/VolumeSnapshot.yaml' -api_service_name: 'netapp.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Snapshot' +resource: google_netapp_volume_snapshot +generation_type: mmv1 +source_file: products/netapp/VolumeSnapshot.yaml +api_service_name: netapp.googleapis.com +api_version: v1 +api_resource_type_kind: Snapshot fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'usedBytes' - - field: 'volume_name' - provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: usedBytes + - field: volume_name + provider_only: true diff --git a/google/services/networkconnectivity/resource_network_connectivity_destination.go b/google/services/networkconnectivity/resource_network_connectivity_destination.go new file mode 100644 index 00000000000..5eb029490d6 --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_destination.go @@ -0,0 +1,950 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkconnectivity/Destination.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networkconnectivity + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceNetworkConnectivityDestination() *schema.Resource { + return &schema.Resource{ + Create: resourceNetworkConnectivityDestinationCreate, + Read: resourceNetworkConnectivityDestinationRead, + Update: resourceNetworkConnectivityDestinationUpdate, + Delete: resourceNetworkConnectivityDestinationDelete, + + Importer: &schema.ResourceImporter{ + State: resourceNetworkConnectivityDestinationImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.SetLabelsDiff, + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "multicloud_data_transfer_config": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "location": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "name": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "endpoints": { + Type: schema.TypeSet, + Required: true, + Description: `The list of DestinationEndpoint resources configured for the IP prefix.`, + Elem: networkconnectivityDestinationEndpointsSchema(), + // Default schema.HashSchema is used. + }, + "ip_prefix": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The IP prefix that represents your workload on another CSP.`, + }, + "location": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The location of the destination.`, + }, + "multicloud_data_transfer_config": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The multicloud data transfer config of the destination.`, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the destination.`, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Description: `A description of this resource.`, + }, + "labels": { + Type: schema.TypeMap, + Optional: true, + Description: `User-defined labels. + + +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field 'effective_labels' for all of the labels present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `Time when the 'Destination' resource was created.`, + }, + "effective_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "etag": { + Type: schema.TypeString, + Computed: true, + Description: `The etag is computed by the server, and might be sent with update and +delete requests so that the client has an up-to-date value before +proceeding.`, + }, + "state_timeline": { + Type: schema.TypeList, + Computed: true, + Description: `The timeline of the expected 'Destination' states or the current rest +state. If a state change is expected, the value is 'ADDING', +'DELETING' or 'SUSPENDING', depending on the action specified.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "states": { + Type: schema.TypeList, + Computed: true, + Description: `The state and activation time details of the resource state.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "effective_time": { + Type: schema.TypeString, + Computed: true, + Description: `Accompanies only the transient states, which include 'ADDING', +'DELETING', and 'SUSPENDING', to denote the time until which the +transient state of the resource will be effective. For instance, if the +state is 'ADDING', this field shows the time when the resource state +transitions to 'ACTIVE'.`, + }, + "state": { + Type: schema.TypeString, + Computed: true, + Description: `The state of the resource.`, + }, + }, + }, + }, + }, + }, + }, + "terraform_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `The combination of labels configured directly on the resource + and default labels configured on the provider.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "uid": { + Type: schema.TypeString, + Computed: true, + Description: `The Google-generated unique ID for the 'Destination' resource. +This value is unique across all 'Destination' resources. +If a resource is deleted and another with the same name is +created, the new resource is assigned a different and unique ID.`, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `Time when the 'Destination' resource was updated.`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func networkconnectivityDestinationEndpointsSchema() *schema.Resource { + return &schema.Resource{ + Schema: map[string]*schema.Schema{ + "asn": { + Type: schema.TypeString, + Required: true, + Description: `The ASN of the remote IP prefix.`, + }, + "csp": { + Type: schema.TypeString, + Required: true, + Description: `The CSP of the remote IP prefix.`, + }, + "state": { + Type: schema.TypeString, + Computed: true, + Description: `The state of the DestinationEndpoint resource.`, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `Time when the DestinationEndpoint resource was updated.`, + }, + }, + } +} + +func resourceNetworkConnectivityDestinationCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + etagProp, err := expandNetworkConnectivityDestinationEtag(d.Get("etag"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("etag"); !tpgresource.IsEmptyValue(reflect.ValueOf(etagProp)) && (ok || !reflect.DeepEqual(v, etagProp)) { + obj["etag"] = etagProp + } + descriptionProp, err := expandNetworkConnectivityDestinationDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + ipPrefixProp, err := expandNetworkConnectivityDestinationIpPrefix(d.Get("ip_prefix"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("ip_prefix"); !tpgresource.IsEmptyValue(reflect.ValueOf(ipPrefixProp)) && (ok || !reflect.DeepEqual(v, ipPrefixProp)) { + obj["ipPrefix"] = ipPrefixProp + } + endpointsProp, err := expandNetworkConnectivityDestinationEndpoints(d.Get("endpoints"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("endpoints"); !tpgresource.IsEmptyValue(reflect.ValueOf(endpointsProp)) && (ok || !reflect.DeepEqual(v, endpointsProp)) { + obj["endpoints"] = endpointsProp + } + effectiveLabelsProp, err := expandNetworkConnectivityDestinationEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(effectiveLabelsProp)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations?destination_id={{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new Destination: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Destination: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating Destination: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if multicloudDataTransferConfigValue, ok := d.GetOk("multicloud_data_transfer_config"); ok && multicloudDataTransferConfigValue.(string) != "" { + if err = identity.Set("multicloud_data_transfer_config", multicloudDataTransferConfigValue.(string)); err != nil { + return fmt.Errorf("Error setting multicloud_data_transfer_config: %s", err) + } + } + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + err = NetworkConnectivityOperationWaitTime( + config, res, project, "Creating Destination", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create Destination: %s", err) + } + + log.Printf("[DEBUG] Finished creating Destination %q: %#v", d.Id(), res) + + return resourceNetworkConnectivityDestinationRead(d, meta) +} + +func resourceNetworkConnectivityDestinationRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Destination: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("NetworkConnectivityDestination %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + + if err := d.Set("create_time", flattenNetworkConnectivityDestinationCreateTime(res["createTime"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("update_time", flattenNetworkConnectivityDestinationUpdateTime(res["updateTime"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("labels", flattenNetworkConnectivityDestinationLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("etag", flattenNetworkConnectivityDestinationEtag(res["etag"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("description", flattenNetworkConnectivityDestinationDescription(res["description"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("ip_prefix", flattenNetworkConnectivityDestinationIpPrefix(res["ipPrefix"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("endpoints", flattenNetworkConnectivityDestinationEndpoints(res["endpoints"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("state_timeline", flattenNetworkConnectivityDestinationStateTimeline(res["stateTimeline"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("uid", flattenNetworkConnectivityDestinationUid(res["uid"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("terraform_labels", flattenNetworkConnectivityDestinationTerraformLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + if err := d.Set("effective_labels", flattenNetworkConnectivityDestinationEffectiveLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Destination: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("multicloud_data_transfer_config"); !ok && v == "" { + err = identity.Set("multicloud_data_transfer_config", d.Get("multicloud_data_transfer_config").(string)) + if err != nil { + return fmt.Errorf("Error setting multicloud_data_transfer_config: %s", err) + } + } + if v, ok := identity.GetOk("location"); !ok && v == "" { + err = identity.Set("location", d.Get("location").(string)) + if err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if v, ok := identity.GetOk("name"); !ok && v == "" { + err = identity.Set("name", d.Get("name").(string)) + if err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceNetworkConnectivityDestinationUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if multicloudDataTransferConfigValue, ok := d.GetOk("multicloud_data_transfer_config"); ok && multicloudDataTransferConfigValue.(string) != "" { + if err = identity.Set("multicloud_data_transfer_config", multicloudDataTransferConfigValue.(string)); err != nil { + return fmt.Errorf("Error setting multicloud_data_transfer_config: %s", err) + } + } + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Destination: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + etagProp, err := expandNetworkConnectivityDestinationEtag(d.Get("etag"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("etag"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, etagProp)) { + obj["etag"] = etagProp + } + descriptionProp, err := expandNetworkConnectivityDestinationDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + endpointsProp, err := expandNetworkConnectivityDestinationEndpoints(d.Get("endpoints"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("endpoints"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, endpointsProp)) { + obj["endpoints"] = endpointsProp + } + effectiveLabelsProp, err := expandNetworkConnectivityDestinationEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating Destination %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + if d.HasChange("etag") { + updateMask = append(updateMask, "etag") + } + + if d.HasChange("description") { + updateMask = append(updateMask, "description") + } + + if d.HasChange("endpoints") { + updateMask = append(updateMask, "endpoints") + } + + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating Destination %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating Destination %q: %#v", d.Id(), res) + } + + err = NetworkConnectivityOperationWaitTime( + config, res, project, "Updating Destination", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + } + + return resourceNetworkConnectivityDestinationRead(d, meta) +} + +func resourceNetworkConnectivityDestinationDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for Destination: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting Destination %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "Destination") + } + + err = NetworkConnectivityOperationWaitTime( + config, res, project, "Deleting Destination", userAgent, + d.Timeout(schema.TimeoutDelete)) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Finished deleting Destination %q: %#v", d.Id(), res) + return nil +} + +func resourceNetworkConnectivityDestinationImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/locations/(?P[^/]+)/multicloudDataTransferConfigs/(?P[^/]+)/destinations/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenNetworkConnectivityDestinationCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkConnectivityDestinationEtag(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationDescription(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationIpPrefix(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationEndpoints(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := schema.NewSet(schema.HashResource(networkconnectivityDestinationEndpointsSchema()), []interface{}{}) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed.Add(map[string]interface{}{ + "asn": flattenNetworkConnectivityDestinationEndpointsAsn(original["asn"], d, config), + "csp": flattenNetworkConnectivityDestinationEndpointsCsp(original["csp"], d, config), + "state": flattenNetworkConnectivityDestinationEndpointsState(original["state"], d, config), + "update_time": flattenNetworkConnectivityDestinationEndpointsUpdateTime(original["updateTime"], d, config), + }) + } + return transformed +} +func flattenNetworkConnectivityDestinationEndpointsAsn(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationEndpointsCsp(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationEndpointsState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationEndpointsUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationStateTimeline(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["states"] = + flattenNetworkConnectivityDestinationStateTimelineStates(original["states"], d, config) + return []interface{}{transformed} +} +func flattenNetworkConnectivityDestinationStateTimelineStates(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + l := v.([]interface{}) + transformed := make([]interface{}, 0, len(l)) + for _, raw := range l { + original := raw.(map[string]interface{}) + if len(original) < 1 { + // Do not include empty json objects coming back from the api + continue + } + transformed = append(transformed, map[string]interface{}{ + "state": flattenNetworkConnectivityDestinationStateTimelineStatesState(original["state"], d, config), + "effective_time": flattenNetworkConnectivityDestinationStateTimelineStatesEffectiveTime(original["effectiveTime"], d, config), + }) + } + return transformed +} +func flattenNetworkConnectivityDestinationStateTimelineStatesState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationStateTimelineStatesEffectiveTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationUid(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityDestinationTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkConnectivityDestinationEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandNetworkConnectivityDestinationEtag(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityDestinationDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityDestinationIpPrefix(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityDestinationEndpoints(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + v = v.(*schema.Set).List() + if v == nil { + return nil, nil + } + l := v.([]interface{}) + req := make([]interface{}, 0, len(l)) + for _, raw := range l { + if raw == nil { + continue + } + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedAsn, err := expandNetworkConnectivityDestinationEndpointsAsn(original["asn"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedAsn); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["asn"] = transformedAsn + } + + transformedCsp, err := expandNetworkConnectivityDestinationEndpointsCsp(original["csp"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedCsp); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["csp"] = transformedCsp + } + + transformedState, err := expandNetworkConnectivityDestinationEndpointsState(original["state"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedState); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["state"] = transformedState + } + + transformedUpdateTime, err := expandNetworkConnectivityDestinationEndpointsUpdateTime(original["update_time"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedUpdateTime); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["updateTime"] = transformedUpdateTime + } + + req = append(req, transformed) + } + return req, nil +} + +func expandNetworkConnectivityDestinationEndpointsAsn(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityDestinationEndpointsCsp(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityDestinationEndpointsState(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityDestinationEndpointsUpdateTime(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityDestinationEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} diff --git a/google/services/networkconnectivity/resource_network_connectivity_destination_generated_meta.yaml b/google/services/networkconnectivity/resource_network_connectivity_destination_generated_meta.yaml new file mode 100644 index 00000000000..f7b93f0d588 --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_destination_generated_meta.yaml @@ -0,0 +1,30 @@ +resource: google_network_connectivity_destination +generation_type: mmv1 +source_file: products/networkconnectivity/Destination.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: Destination +fields: + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: endpoints.asn + - api_field: endpoints.csp + - api_field: endpoints.state + - api_field: endpoints.updateTime + - api_field: etag + - api_field: ipPrefix + - api_field: labels + - field: location + provider_only: true + - field: multicloud_data_transfer_config + provider_only: true + - field: name + provider_only: true + - api_field: stateTimeline.states.effectiveTime + - api_field: stateTimeline.states.state + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/networkconnectivity/resource_network_connectivity_destination_generated_test.go b/google/services/networkconnectivity/resource_network_connectivity_destination_generated_test.go new file mode 100644 index 00000000000..c90826d28fb --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_destination_generated_test.go @@ -0,0 +1,146 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package networkconnectivity_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccNetworkConnectivityDestination_networkConnectivityDestinationBasicExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkConnectivityDestinationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkConnectivityDestination_networkConnectivityDestinationBasicExample(context), + }, + { + ResourceName: "google_network_connectivity_destination.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicloud_data_transfer_config", "name", "terraform_labels"}, + }, + { + ResourceName: "google_network_connectivity_destination.example", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccNetworkConnectivityDestination_networkConnectivityDestinationBasicExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "config" { + name = "tf-test-basic-config%{random_suffix}" + location = "europe-west4" + description = "A basic multicloud data transfer config for the destination example" +} + +resource "google_network_connectivity_destination" "example" { + name = "tf-test-basic-destination%{random_suffix}" + location = "europe-west4" + multicloud_data_transfer_config = google_network_connectivity_multicloud_data_transfer_config.config.name + description = "A basic destination" + labels = { + foo = "bar" + } + ip_prefix = "10.0.0.0/8" + endpoints { + asn = "14618" + csp = "AWS" + } +} +`, context) +} + +func testAccCheckNetworkConnectivityDestinationDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_network_connectivity_destination" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("NetworkConnectivityDestination still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/networkconnectivity/resource_network_connectivity_destination_test.go b/google/services/networkconnectivity/resource_network_connectivity_destination_test.go new file mode 100644 index 00000000000..c26677809b7 --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_destination_test.go @@ -0,0 +1,168 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkconnectivity/resource_network_connectivity_destination_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package networkconnectivity_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccNetworkConnectivityDestination_update(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkConnectivityDestinationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkConnectivityDestination_basic(context), + }, + { + ResourceName: "google_network_connectivity_destination.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicloud_data_transfer_config", "name", "terraform_labels"}, + }, + { + Config: testAccNetworkConnectivityDestination_update(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_connectivity_destination.example", plancheck.ResourceActionUpdate), + }, + }, + }, + { + ResourceName: "google_network_connectivity_destination.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicloud_data_transfer_config", "name", "terraform_labels"}, + }, + }, + }) +} + +func testAccNetworkConnectivityDestination_basic(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "config" { + name = "tf-test-basic-config%{random_suffix}" + location = "europe-west3" + description = "A basic multicloud data transfer config for the destination example" + services { + service_name = "big-query" + } + services { + service_name = "cloud-storage" + } +} + +resource "google_network_connectivity_destination" "example" { + name = "tf-test-basic-destination%{random_suffix}" + location = "europe-west3" + multicloud_data_transfer_config = google_network_connectivity_multicloud_data_transfer_config.config.name + description = "A basic destination" + labels = { + foo = "bar" + } + ip_prefix = "10.0.0.0/8" + endpoints { + asn = "14618" + csp = "AWS" + } +} +`, context) +} + +func testAccNetworkConnectivityDestination_update(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "config" { + name = "tf-test-basic-config%{random_suffix}" + location = "europe-west3" + description = "A basic multicloud data transfer config for the destination example" +} + +resource "google_network_connectivity_destination" "example" { + name = "tf-test-basic-destination%{random_suffix}" + location = "europe-west3" + multicloud_data_transfer_config = google_network_connectivity_multicloud_data_transfer_config.config.name + description = "Updated desfintion of basic destination" + labels = { + abc = "xyz" + foo = "baz" + } + ip_prefix = "10.0.0.0/8" + endpoints { + asn = "45102" + csp = "Alibaba" + } + endpoints { + asn = "14618" + csp = "AWS" + } +} +`, context) +} diff --git a/google/services/networkconnectivity/resource_network_connectivity_group_generated_meta.yaml b/google/services/networkconnectivity/resource_network_connectivity_group_generated_meta.yaml index 69a5c90c914..fdcfccde96d 100644 --- a/google/services/networkconnectivity/resource_network_connectivity_group_generated_meta.yaml +++ b/google/services/networkconnectivity/resource_network_connectivity_group_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_network_connectivity_group' -generation_type: 'mmv1' -source_file: 'products/networkconnectivity/Group.yaml' -api_service_name: 'networkconnectivity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Group' +resource: google_network_connectivity_group +generation_type: mmv1 +source_file: products/networkconnectivity/Group.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: Group fields: - - api_field: 'autoAccept.autoAcceptProjects' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - field: 'hub' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'routeTable' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: autoAccept.autoAcceptProjects + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - field: hub + provider_only: true + - api_field: labels + - api_field: name + - api_field: routeTable + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/networkconnectivity/resource_network_connectivity_hub_generated_meta.yaml b/google/services/networkconnectivity/resource_network_connectivity_hub_generated_meta.yaml index fa0b6e9ac84..b8f704f1ce2 100644 --- a/google/services/networkconnectivity/resource_network_connectivity_hub_generated_meta.yaml +++ b/google/services/networkconnectivity/resource_network_connectivity_hub_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_network_connectivity_hub' -generation_type: 'mmv1' -source_file: 'products/networkconnectivity/Hub.yaml' -api_service_name: 'networkconnectivity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Hub' +resource: google_network_connectivity_hub +generation_type: mmv1 +source_file: products/networkconnectivity/Hub.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: Hub fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'exportPsc' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'policyMode' - - api_field: 'presetTopology' - - api_field: 'routingVpcs.uri' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: exportPsc + - api_field: labels + - api_field: name + - api_field: policyMode + - api_field: presetTopology + - api_field: routingVpcs.uri + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config.go b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config.go new file mode 100644 index 00000000000..2d653326a76 --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config.go @@ -0,0 +1,885 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkconnectivity/MulticloudDataTransferConfig.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networkconnectivity + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceNetworkConnectivityMulticloudDataTransferConfig() *schema.Resource { + return &schema.Resource{ + Create: resourceNetworkConnectivityMulticloudDataTransferConfigCreate, + Read: resourceNetworkConnectivityMulticloudDataTransferConfigRead, + Update: resourceNetworkConnectivityMulticloudDataTransferConfigUpdate, + Delete: resourceNetworkConnectivityMulticloudDataTransferConfigDelete, + + Importer: &schema.ResourceImporter{ + State: resourceNetworkConnectivityMulticloudDataTransferConfigImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.SetLabelsDiff, + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "name": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The location of the multicloud data transfer config.`, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The name of the MulticloudDataTransferConfig resource.`, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Description: `A description of this resource.`, + }, + "labels": { + Type: schema.TypeMap, + Optional: true, + Description: `User-defined labels. + + +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field 'effective_labels' for all of the labels present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "services": { + Type: schema.TypeList, + Optional: true, + Description: `Maps services to their current or planned states. Service names are keys, +and the associated values describe the state of the service.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_name": { + Type: schema.TypeString, + Required: true, + Description: `The name of the service, like "big-query" or "cloud-storage". +This corresponds to the map key in the API.`, + }, + "states": { + Type: schema.TypeList, + Computed: true, + Description: `The state and activation time details for the service.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "effective_time": { + Type: schema.TypeString, + Computed: true, + Description: `The time when the state becomes effective`, + }, + "state": { + Type: schema.TypeString, + Computed: true, + Description: `The state of the resource.`, + }, + }, + }, + }, + }, + }, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `Time when the MulticloudDataTransferConfig resource was created.`, + }, + "destinations_active_count": { + Type: schema.TypeInt, + Computed: true, + Description: `The number of Destination resources in use with the +MulticloudDataTransferConfig resource.`, + }, + "destinations_count": { + Type: schema.TypeInt, + Computed: true, + Description: `The number of Destination resources configured for the +MulticloudDataTransferConfig resource.`, + }, + "effective_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "etag": { + Type: schema.TypeString, + Computed: true, + Description: `The etag is computed by the server, and might be sent with update and +delete requests so that the client has an up-to-date value before +proceeding.`, + }, + "terraform_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `The combination of labels configured directly on the resource + and default labels configured on the provider.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "uid": { + Type: schema.TypeString, + Computed: true, + Description: `The Google-generated unique ID for the MulticloudDataTransferConfig +resource. This value is unique across all MulticloudDataTransferConfig +resources. If a resource is deleted and another with the same name is +created, the new resource is assigned a different and unique ID.`, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `Time when the MulticloudDataTransferConfig resource was updated.`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceNetworkConnectivityMulticloudDataTransferConfigCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + etagProp, err := expandNetworkConnectivityMulticloudDataTransferConfigEtag(d.Get("etag"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("etag"); !tpgresource.IsEmptyValue(reflect.ValueOf(etagProp)) && (ok || !reflect.DeepEqual(v, etagProp)) { + obj["etag"] = etagProp + } + descriptionProp, err := expandNetworkConnectivityMulticloudDataTransferConfigDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + servicesProp, err := expandNetworkConnectivityMulticloudDataTransferConfigServices(d.Get("services"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("services"); !tpgresource.IsEmptyValue(reflect.ValueOf(servicesProp)) && (ok || !reflect.DeepEqual(v, servicesProp)) { + obj["services"] = servicesProp + } + effectiveLabelsProp, err := expandNetworkConnectivityMulticloudDataTransferConfigEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(effectiveLabelsProp)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs?multicloudDataTransferConfigId={{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new MulticloudDataTransferConfig: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticloudDataTransferConfig: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating MulticloudDataTransferConfig: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + err = NetworkConnectivityOperationWaitTime( + config, res, project, "Creating MulticloudDataTransferConfig", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create MulticloudDataTransferConfig: %s", err) + } + + log.Printf("[DEBUG] Finished creating MulticloudDataTransferConfig %q: %#v", d.Id(), res) + + return resourceNetworkConnectivityMulticloudDataTransferConfigRead(d, meta) +} + +func resourceNetworkConnectivityMulticloudDataTransferConfigRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticloudDataTransferConfig: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("NetworkConnectivityMulticloudDataTransferConfig %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + + if err := d.Set("create_time", flattenNetworkConnectivityMulticloudDataTransferConfigCreateTime(res["createTime"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("update_time", flattenNetworkConnectivityMulticloudDataTransferConfigUpdateTime(res["updateTime"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("labels", flattenNetworkConnectivityMulticloudDataTransferConfigLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("etag", flattenNetworkConnectivityMulticloudDataTransferConfigEtag(res["etag"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("description", flattenNetworkConnectivityMulticloudDataTransferConfigDescription(res["description"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("destinations_count", flattenNetworkConnectivityMulticloudDataTransferConfigDestinationsCount(res["destinationsCount"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("destinations_active_count", flattenNetworkConnectivityMulticloudDataTransferConfigDestinationsActiveCount(res["destinationsActiveCount"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("services", flattenNetworkConnectivityMulticloudDataTransferConfigServices(res["services"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("uid", flattenNetworkConnectivityMulticloudDataTransferConfigUid(res["uid"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("terraform_labels", flattenNetworkConnectivityMulticloudDataTransferConfigTerraformLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + if err := d.Set("effective_labels", flattenNetworkConnectivityMulticloudDataTransferConfigEffectiveLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticloudDataTransferConfig: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("location"); !ok && v == "" { + err = identity.Set("location", d.Get("location").(string)) + if err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if v, ok := identity.GetOk("name"); !ok && v == "" { + err = identity.Set("name", d.Get("name").(string)) + if err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceNetworkConnectivityMulticloudDataTransferConfigUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticloudDataTransferConfig: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + etagProp, err := expandNetworkConnectivityMulticloudDataTransferConfigEtag(d.Get("etag"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("etag"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, etagProp)) { + obj["etag"] = etagProp + } + descriptionProp, err := expandNetworkConnectivityMulticloudDataTransferConfigDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + servicesProp, err := expandNetworkConnectivityMulticloudDataTransferConfigServices(d.Get("services"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("services"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, servicesProp)) { + obj["services"] = servicesProp + } + effectiveLabelsProp, err := expandNetworkConnectivityMulticloudDataTransferConfigEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating MulticloudDataTransferConfig %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + if d.HasChange("etag") { + updateMask = append(updateMask, "etag") + } + + if d.HasChange("description") { + updateMask = append(updateMask, "description") + } + + if d.HasChange("services") { + updateMask = append(updateMask, "services") + } + + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating MulticloudDataTransferConfig %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating MulticloudDataTransferConfig %q: %#v", d.Id(), res) + } + + err = NetworkConnectivityOperationWaitTime( + config, res, project, "Updating MulticloudDataTransferConfig", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + } + + return resourceNetworkConnectivityMulticloudDataTransferConfigRead(d, meta) +} + +func resourceNetworkConnectivityMulticloudDataTransferConfigDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticloudDataTransferConfig: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting MulticloudDataTransferConfig %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "MulticloudDataTransferConfig") + } + + err = NetworkConnectivityOperationWaitTime( + config, res, project, "Deleting MulticloudDataTransferConfig", userAgent, + d.Timeout(schema.TimeoutDelete)) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Finished deleting MulticloudDataTransferConfig %q: %#v", d.Id(), res) + return nil +} + +func resourceNetworkConnectivityMulticloudDataTransferConfigImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/locations/(?P[^/]+)/multicloudDataTransferConfigs/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigEtag(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigDescription(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigDestinationsCount(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigDestinationsActiveCount(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigServices(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + + servicesMap, ok := v.(map[string]interface{}) + if !ok { + return nil + } + + transformed := make([]interface{}, 0, len(servicesMap)) + + // Sort the service names to ensure a consistent ordering. + serviceNames := make([]string, 0, len(servicesMap)) + for name := range servicesMap { + serviceNames = append(serviceNames, name) + } + sort.Strings(serviceNames) + + for _, serviceName := range serviceNames { + stateTimelineRaw := servicesMap[serviceName] + stateTimeline, ok := stateTimelineRaw.(map[string]interface{}) + if !ok { + continue + } + + var flattenedStates []interface{} + if states, ok := stateTimeline["states"].([]interface{}); ok { + for _, stateRaw := range states { + state, ok := stateRaw.(map[string]interface{}) + if !ok { + continue + } + flattenedState := make(map[string]interface{}) + if s, ok := state["state"].(string); ok { + flattenedState["state"] = s + } + if et, ok := state["effectiveTime"].(string); ok { + flattenedState["effective_time"] = et + } + flattenedStates = append(flattenedStates, flattenedState) + } + } + + flattenedService := map[string]interface{}{ + "service_name": serviceName, + "states": flattenedStates, + } + transformed = append(transformed, flattenedService) + } + + return transformed +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigUid(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkConnectivityMulticloudDataTransferConfigEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandNetworkConnectivityMulticloudDataTransferConfigEtag(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityMulticloudDataTransferConfigDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkConnectivityMulticloudDataTransferConfigServices(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return make(map[string]interface{}), nil + } + + l, ok := v.([]interface{}) + if !ok { + return nil, fmt.Errorf("expected 'services' to be a list, got %T", v) + } + + req := make(map[string]interface{}) + for _, raw := range l { + if raw == nil { + continue + } + + original, ok := raw.(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("expected a service item to be a map, got %T", raw) + } + + serviceName, ok := original["service_name"].(string) + if !ok || serviceName == "" { + // Skip items without a valid service name + continue + } + + var apiStates []interface{} + if states, ok := original["states"].([]interface{}); ok { + for _, stateRaw := range states { + state, ok := stateRaw.(map[string]interface{}) + if !ok { + continue + } + + apiState := make(map[string]interface{}) + if s, ok := state["state"].(string); ok { + apiState["state"] = s + } + if et, ok := state["effective_time"].(string); ok { + apiState["effectiveTime"] = et + } + apiStates = append(apiStates, apiState) + } + } + + req[serviceName] = map[string]interface{}{ + "states": apiStates, + } + } + + return req, nil +} + +func expandNetworkConnectivityMulticloudDataTransferConfigEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} diff --git a/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_generated_meta.yaml b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_generated_meta.yaml new file mode 100644 index 00000000000..c7bdfd524fc --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_generated_meta.yaml @@ -0,0 +1,26 @@ +resource: google_network_connectivity_multicloud_data_transfer_config +generation_type: mmv1 +source_file: products/networkconnectivity/MulticloudDataTransferConfig.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: MulticloudDataTransferConfig +fields: + - api_field: createTime + - api_field: description + - api_field: destinationsActiveCount + - api_field: destinationsCount + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: services.service_name + - api_field: services.states.effective_time + - api_field: services.states.state + - field: terraform_labels + provider_only: true + - api_field: uid + - api_field: updateTime diff --git a/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_generated_test.go b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_generated_test.go new file mode 100644 index 00000000000..613ead20063 --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_generated_test.go @@ -0,0 +1,140 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package networkconnectivity_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccNetworkConnectivityMulticloudDataTransferConfig_networkConnectivityMulticloudDataTransferConfigBasicExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkConnectivityMulticloudDataTransferConfigDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkConnectivityMulticloudDataTransferConfig_networkConnectivityMulticloudDataTransferConfigBasicExample(context), + }, + { + ResourceName: "google_network_connectivity_multicloud_data_transfer_config.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "name", "terraform_labels"}, + }, + { + ResourceName: "google_network_connectivity_multicloud_data_transfer_config.example", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccNetworkConnectivityMulticloudDataTransferConfig_networkConnectivityMulticloudDataTransferConfigBasicExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "example" { + name = "tf_test_basic_config%{random_suffix}" + location = "europe-west1" + description = "A basic multicloud data transfer configs" + labels = { + foo = "bar" + } + services { + service_name = "big-query" + } + services { + service_name = "cloud-storage" + } +} +`, context) +} + +func testAccCheckNetworkConnectivityMulticloudDataTransferConfigDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_network_connectivity_multicloud_data_transfer_config" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{NetworkConnectivityBasePath}}projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("NetworkConnectivityMulticloudDataTransferConfig still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_sweeper.go b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_sweeper.go new file mode 100644 index 00000000000..a333c206be5 --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_sweeper.go @@ -0,0 +1,223 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkconnectivity/MulticloudDataTransferConfig.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/sweeper_file.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networkconnectivity + +import ( + "context" + "fmt" + "log" + "strings" + "testing" + + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/sweeper" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func init() { + // Initialize base sweeper object + s := &sweeper.Sweeper{ + Name: "google_network_connectivity_multicloud_data_transfer_config", + ListAndAction: listAndActionNetworkConnectivityMulticloudDataTransferConfig, + DeleteFunction: testSweepNetworkConnectivityMulticloudDataTransferConfig, + } + + // Register the sweeper + sweeper.AddTestSweepers(s) +} + +func testSweepNetworkConnectivityMulticloudDataTransferConfig(_ string) error { + return listAndActionNetworkConnectivityMulticloudDataTransferConfig(deleteResourceNetworkConnectivityMulticloudDataTransferConfig) +} + +func listAndActionNetworkConnectivityMulticloudDataTransferConfig(action sweeper.ResourceAction) error { + var lastError error + resourceName := "NetworkConnectivityMulticloudDataTransferConfig" + log.Printf("[INFO][SWEEPER_LOG] Starting sweeper for %s", resourceName) + + // Prepare configurations to iterate over + var configs []*tpgresource.ResourceDataMock + t := &testing.T{} + billingId := envvar.GetTestBillingAccountFromEnv(t) + // Default single config + intermediateValues := []map[string]string{ + { + "region": "us-central1", + }, + } + + // Create configs from intermediate values + for _, values := range intermediateValues { + mockConfig := &tpgresource.ResourceDataMock{ + FieldsInSchema: map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "billing_account": billingId, + }, + } + + // Apply all provided values + for key, value := range values { + mockConfig.FieldsInSchema[key] = value + } + + // Set fallback values for common fields + region, hasRegion := mockConfig.FieldsInSchema["region"].(string) + if !hasRegion { + region = "us-central1" + mockConfig.FieldsInSchema["region"] = region + } + + if _, hasLocation := mockConfig.FieldsInSchema["location"]; !hasLocation { + mockConfig.FieldsInSchema["location"] = region + } + + if _, hasZone := mockConfig.FieldsInSchema["zone"]; !hasZone { + mockConfig.FieldsInSchema["zone"] = region + "-a" + } + + configs = append(configs, mockConfig) + } + + // Process all configurations (either from parent resources or direct substitutions) + for _, mockConfig := range configs { + // Get region from config + region := sweeper.GetFieldOrDefault(mockConfig, "region", "us-central1") + + // Create shared config for this region + config, err := sweeper.SharedConfigForRegion(region) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error getting shared config for region: %s", err) + lastError = err + continue + } + + err = config.LoadAndValidate(context.Background()) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error loading: %s", err) + lastError = err + continue + } + + // Prepare list URL + listTemplate := strings.Split("https://networkconnectivity.googleapis.com/v1/projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs", "?")[0] + listUrl, err := tpgresource.ReplaceVars(mockConfig, config, listTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) + lastError = err + continue + } + + // Log additional info for parent-based resources + log.Printf("[INFO][SWEEPER_LOG] Listing %s resources at %s", resourceName, listUrl) + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: config.Project, + RawURL: listUrl, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in response from request %s: %s", listUrl, err) + lastError = err + continue + } + + // First try the expected resource key + resourceList, ok := res["multicloudDataTransferConfigs"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'multicloudDataTransferConfigs'") + } else { + // Next, try the common "items" pattern + resourceList, ok = res["items"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under standard 'items' key") + } else { + log.Printf("[INFO][SWEEPER_LOG] no resources found") + continue + } + } + rl := resourceList.([]interface{}) + + log.Printf("[INFO][SWEEPER_LOG] Found %d items in %s list response.", len(rl), resourceName) + // Keep count of items that aren't sweepable for logging. + nonPrefixCount := 0 + for _, ri := range rl { + obj, ok := ri.(map[string]interface{}) + if !ok { + log.Printf("[INFO][SWEEPER_LOG] Item was not a map: %T", ri) + continue + } + + if err := action(config, mockConfig, obj); err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in action: %s", err) + lastError = err + } else { + nonPrefixCount++ + } + } + } + + return lastError +} + +func deleteResourceNetworkConnectivityMulticloudDataTransferConfig(config *transport_tpg.Config, d *tpgresource.ResourceDataMock, obj map[string]interface{}) error { + var deletionerror error + resourceName := "NetworkConnectivityMulticloudDataTransferConfig" + var name string + if obj["name"] == nil { + log.Printf("[INFO][SWEEPER_LOG] %s resource name was nil", resourceName) + return fmt.Errorf("%s resource name was nil", resourceName) + } + + name = tpgresource.GetResourceNameFromSelfLink(obj["name"].(string)) + + // Skip resources that shouldn't be sweeped + if !sweeper.IsSweepableTestResource(name) { + return nil + } + + deleteTemplate := "https://networkconnectivity.googleapis.com/v1/projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}" + + url, err := tpgresource.ReplaceVars(d, config, deleteTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) + deletionerror = err + } + url = url + name + + // Don't wait on operations as we may have a lot to delete + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: config.Project, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error deleting for url %s : %s", url, err) + deletionerror = err + } else { + log.Printf("[INFO][SWEEPER_LOG] Sent delete request for %s resource: %s", resourceName, name) + } + + return deletionerror +} diff --git a/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_test.go b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_test.go new file mode 100644 index 00000000000..ce238f63860 --- /dev/null +++ b/google/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_test.go @@ -0,0 +1,227 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkconnectivity/resource_network_connectivity_multicloud_data_transfer_config_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package networkconnectivity_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccNetworkConnectivityMulticloudDataTransferConfig_update(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkConnectivityMulticloudDataTransferConfigDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkConnectivityMulticloudDataTransferConfig_basic(context), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_network_connectivity_multicloud_data_transfer_config.example", "services.#", "2"), + ), + }, + { + ResourceName: "google_network_connectivity_multicloud_data_transfer_config.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "name", "terraform_labels"}, + }, + { + Config: testAccNetworkConnectivityMulticloudDataTransferConfig_addService(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_connectivity_multicloud_data_transfer_config.example", plancheck.ResourceActionUpdate), + }, + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_network_connectivity_multicloud_data_transfer_config.example", "services.#", "3"), + ), + }, + { + ResourceName: "google_network_connectivity_multicloud_data_transfer_config.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "name", "terraform_labels"}, + }, + { + Config: testAccNetworkConnectivityMulticloudDataTransferConfig_removeService(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_connectivity_multicloud_data_transfer_config.example", plancheck.ResourceActionUpdate), + }, + }, + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("google_network_connectivity_multicloud_data_transfer_config.example", "services.#", "2"), + ), + }, + { + ResourceName: "google_network_connectivity_multicloud_data_transfer_config.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "name", "terraform_labels"}, + }, + { + Config: testAccNetworkConnectivityMulticloudDataTransferConfig_updateDescription(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_connectivity_multicloud_data_transfer_config.example", plancheck.ResourceActionUpdate), + }, + }, + }, + { + ResourceName: "google_network_connectivity_multicloud_data_transfer_config.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "name", "terraform_labels"}, + }, + { + Config: testAccNetworkConnectivityMulticloudDataTransferConfig_updateLabels(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_connectivity_multicloud_data_transfer_config.example", plancheck.ResourceActionUpdate), + }, + }, + }, + { + ResourceName: "google_network_connectivity_multicloud_data_transfer_config.example", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "name", "terraform_labels"}, + }, + }, + }) +} + +func testAccNetworkConnectivityMulticloudDataTransferConfig_basic(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "example" { + name = "tf-test-update-config%{random_suffix}" + location = "europe-west2" + description = "A config for update tests" + services { + service_name = "cloud-run" + } + services { + service_name = "cloud-storage" + } +} +`, context) +} + +func testAccNetworkConnectivityMulticloudDataTransferConfig_addService(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "example" { + name = "tf-test-update-config%{random_suffix}" + location = "europe-west2" + description = "A config for update tests" + services { + service_name = "big-query" + } + services { + service_name = "cloud-run" + } + services { + service_name = "cloud-storage" + } +} +`, context) +} + +func testAccNetworkConnectivityMulticloudDataTransferConfig_removeService(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "example" { + name = "tf-test-update-config%{random_suffix}" + location = "europe-west2" + description = "A config for update tests" + services { + service_name = "big-query" + } + services { + service_name = "cloud-run" + } +} +`, context) +} + +func testAccNetworkConnectivityMulticloudDataTransferConfig_updateDescription(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "example" { + name = "tf-test-update-config%{random_suffix}" + location = "europe-west2" + description = "Update config for update tests" + services { + service_name = "big-query" + } + services { + service_name = "cloud-run" + } +} +`, context) +} + +func testAccNetworkConnectivityMulticloudDataTransferConfig_updateLabels(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_network_connectivity_multicloud_data_transfer_config" "example" { + name = "tf-test-update-config%{random_suffix}" + location = "europe-west2" + description = "Update config for update tests" + labels = { + foo = "bar" + } + services { + service_name = "big-query" + } + services { + service_name = "cloud-run" + } +} +`, context) +} diff --git a/google/services/networkconnectivity/resource_network_connectivity_policy_based_route_generated_meta.yaml b/google/services/networkconnectivity/resource_network_connectivity_policy_based_route_generated_meta.yaml index e227c1beddf..a8c29717f95 100644 --- a/google/services/networkconnectivity/resource_network_connectivity_policy_based_route_generated_meta.yaml +++ b/google/services/networkconnectivity/resource_network_connectivity_policy_based_route_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_network_connectivity_policy_based_route' -generation_type: 'mmv1' -source_file: 'products/networkconnectivity/PolicyBasedRoute.yaml' -api_service_name: 'networkconnectivity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PolicyBasedRoute' +resource: google_network_connectivity_policy_based_route +generation_type: mmv1 +source_file: products/networkconnectivity/PolicyBasedRoute.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: PolicyBasedRoute fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'filter.destRange' - - api_field: 'filter.ipProtocol' - - api_field: 'filter.protocolVersion' - - api_field: 'filter.srcRange' - - api_field: 'interconnectAttachment.region' - - api_field: 'kind' - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'nextHopIlbIp' - - api_field: 'nextHopOtherRoutes' - - api_field: 'priority' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'virtualMachine.tags' - - api_field: 'warnings.code' - - api_field: 'warnings.data' - - api_field: 'warnings.warningMessage' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: filter.destRange + - api_field: filter.ipProtocol + - api_field: filter.protocolVersion + - api_field: filter.srcRange + - api_field: interconnectAttachment.region + - api_field: kind + - api_field: labels + - field: name + provider_only: true + - api_field: network + - api_field: nextHopIlbIp + - api_field: nextHopOtherRoutes + - api_field: priority + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: virtualMachine.tags + - api_field: warnings.code + - api_field: warnings.data + - api_field: warnings.warningMessage diff --git a/google/services/networkconnectivity/resource_network_connectivity_regional_endpoint_generated_meta.yaml b/google/services/networkconnectivity/resource_network_connectivity_regional_endpoint_generated_meta.yaml index bbad003535f..a967633dd3e 100644 --- a/google/services/networkconnectivity/resource_network_connectivity_regional_endpoint_generated_meta.yaml +++ b/google/services/networkconnectivity/resource_network_connectivity_regional_endpoint_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_network_connectivity_regional_endpoint' -generation_type: 'mmv1' -source_file: 'products/networkconnectivity/RegionalEndpoint.yaml' -api_service_name: 'networkconnectivity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RegionalEndpoint' +resource: google_network_connectivity_regional_endpoint +generation_type: mmv1 +source_file: products/networkconnectivity/RegionalEndpoint.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: RegionalEndpoint fields: - - api_field: 'accessType' - - api_field: 'address' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'pscForwardingRule' - - api_field: 'subnetwork' - - api_field: 'targetGoogleApi' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: accessType + - api_field: address + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: network + - api_field: pscForwardingRule + - api_field: subnetwork + - api_field: targetGoogleApi + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networkconnectivity/resource_network_connectivity_spoke_generated_meta.yaml b/google/services/networkconnectivity/resource_network_connectivity_spoke_generated_meta.yaml index c3488d7b69b..367cbfc1248 100644 --- a/google/services/networkconnectivity/resource_network_connectivity_spoke_generated_meta.yaml +++ b/google/services/networkconnectivity/resource_network_connectivity_spoke_generated_meta.yaml @@ -1,43 +1,43 @@ -resource: 'google_network_connectivity_spoke' -generation_type: 'mmv1' -source_file: 'products/networkconnectivity/Spoke.yaml' -api_service_name: 'networkconnectivity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Spoke' +resource: google_network_connectivity_spoke +generation_type: mmv1 +source_file: products/networkconnectivity/Spoke.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: Spoke fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'group' - - api_field: 'hub' - - api_field: 'labels' - - api_field: 'linkedInterconnectAttachments.includeImportRanges' - - api_field: 'linkedInterconnectAttachments.siteToSiteDataTransfer' - - api_field: 'linkedInterconnectAttachments.uris' - - api_field: 'linkedProducerVpcNetwork.excludeExportRanges' - - api_field: 'linkedProducerVpcNetwork.includeExportRanges' - - api_field: 'linkedProducerVpcNetwork.network' - - api_field: 'linkedProducerVpcNetwork.peering' - - api_field: 'linkedProducerVpcNetwork.producerNetwork' - - api_field: 'linkedRouterApplianceInstances.includeImportRanges' - - api_field: 'linkedRouterApplianceInstances.instances.ipAddress' - - api_field: 'linkedRouterApplianceInstances.instances.virtualMachine' - - api_field: 'linkedRouterApplianceInstances.siteToSiteDataTransfer' - - api_field: 'linkedVpcNetwork.excludeExportRanges' - - api_field: 'linkedVpcNetwork.includeExportRanges' - - api_field: 'linkedVpcNetwork.uri' - - api_field: 'linkedVpnTunnels.includeImportRanges' - - api_field: 'linkedVpnTunnels.siteToSiteDataTransfer' - - api_field: 'linkedVpnTunnels.uris' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reasons.code' - - api_field: 'reasons.message' - - api_field: 'reasons.userDetails' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: group + - api_field: hub + - api_field: labels + - api_field: linkedInterconnectAttachments.includeImportRanges + - api_field: linkedInterconnectAttachments.siteToSiteDataTransfer + - api_field: linkedInterconnectAttachments.uris + - api_field: linkedProducerVpcNetwork.excludeExportRanges + - api_field: linkedProducerVpcNetwork.includeExportRanges + - api_field: linkedProducerVpcNetwork.network + - api_field: linkedProducerVpcNetwork.peering + - api_field: linkedProducerVpcNetwork.producerNetwork + - api_field: linkedRouterApplianceInstances.includeImportRanges + - api_field: linkedRouterApplianceInstances.instances.ipAddress + - api_field: linkedRouterApplianceInstances.instances.virtualMachine + - api_field: linkedRouterApplianceInstances.siteToSiteDataTransfer + - api_field: linkedVpcNetwork.excludeExportRanges + - api_field: linkedVpcNetwork.includeExportRanges + - api_field: linkedVpcNetwork.uri + - api_field: linkedVpnTunnels.includeImportRanges + - api_field: linkedVpnTunnels.siteToSiteDataTransfer + - api_field: linkedVpnTunnels.uris + - field: location + provider_only: true + - api_field: name + - api_field: reasons.code + - api_field: reasons.message + - api_field: reasons.userDetails + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkconnectivityv1/resource_network_connectivity_internal_range_generated_meta.yaml b/google/services/networkconnectivityv1/resource_network_connectivity_internal_range_generated_meta.yaml index f56d1b2d6b6..93c2ac26c16 100644 --- a/google/services/networkconnectivityv1/resource_network_connectivity_internal_range_generated_meta.yaml +++ b/google/services/networkconnectivityv1/resource_network_connectivity_internal_range_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_network_connectivity_internal_range' -generation_type: 'mmv1' -source_file: 'products/networkconnectivityv1/InternalRange.yaml' -api_service_name: 'networkconnectivity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InternalRange' +resource: google_network_connectivity_internal_range +generation_type: mmv1 +source_file: products/networkconnectivityv1/InternalRange.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: InternalRange fields: - - api_field: 'allocationOptions.allocationStrategy' - - api_field: 'allocationOptions.firstAvailableRangesLookupSize' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'excludeCidrRanges' - - api_field: 'immutable' - - api_field: 'ipCidrRange' - - api_field: 'labels' - - api_field: 'migration.source' - - api_field: 'migration.target' - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'overlaps' - - api_field: 'peering' - - api_field: 'prefixLength' - - api_field: 'targetCidrRange' - - field: 'terraform_labels' - provider_only: true - - api_field: 'usage' - - api_field: 'users' + - api_field: allocationOptions.allocationStrategy + - api_field: allocationOptions.firstAvailableRangesLookupSize + - api_field: description + - field: effective_labels + provider_only: true + - api_field: excludeCidrRanges + - api_field: immutable + - api_field: ipCidrRange + - api_field: labels + - api_field: migration.source + - api_field: migration.target + - field: name + provider_only: true + - api_field: network + - api_field: overlaps + - api_field: peering + - api_field: prefixLength + - api_field: targetCidrRange + - field: terraform_labels + provider_only: true + - api_field: usage + - api_field: users diff --git a/google/services/networkconnectivityv1/resource_network_connectivity_service_connection_policy_generated_meta.yaml b/google/services/networkconnectivityv1/resource_network_connectivity_service_connection_policy_generated_meta.yaml index 1d6372cedd4..b80b6ea3abb 100644 --- a/google/services/networkconnectivityv1/resource_network_connectivity_service_connection_policy_generated_meta.yaml +++ b/google/services/networkconnectivityv1/resource_network_connectivity_service_connection_policy_generated_meta.yaml @@ -1,40 +1,40 @@ -resource: 'google_network_connectivity_service_connection_policy' -generation_type: 'mmv1' -source_file: 'products/networkconnectivityv1/ServiceConnectionPolicy.yaml' -api_service_name: 'networkconnectivity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServiceConnectionPolicy' +resource: google_network_connectivity_service_connection_policy +generation_type: mmv1 +source_file: products/networkconnectivityv1/ServiceConnectionPolicy.yaml +api_service_name: networkconnectivity.googleapis.com +api_version: v1 +api_resource_type_kind: ServiceConnectionPolicy fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'infrastructure' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'pscConfig.allowedGoogleProducersResourceHierarchyLevel' - - api_field: 'pscConfig.limit' - - api_field: 'pscConfig.producerInstanceLocation' - - api_field: 'pscConfig.subnetworks' - - api_field: 'pscConnections.consumerAddress' - - api_field: 'pscConnections.consumerForwardingRule' - - api_field: 'pscConnections.consumerTargetProject' - - api_field: 'pscConnections.error.code' - - api_field: 'pscConnections.error.details' - - api_field: 'pscConnections.error.message' - - api_field: 'pscConnections.errorInfo.domain' - - api_field: 'pscConnections.errorInfo.metadata' - - api_field: 'pscConnections.errorInfo.reason' - - api_field: 'pscConnections.errorType' - - api_field: 'pscConnections.gceOperation' - - api_field: 'pscConnections.pscConnectionId' - - api_field: 'pscConnections.state' - - api_field: 'serviceClass' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: infrastructure + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: network + - api_field: pscConfig.allowedGoogleProducersResourceHierarchyLevel + - api_field: pscConfig.limit + - api_field: pscConfig.producerInstanceLocation + - api_field: pscConfig.subnetworks + - api_field: pscConnections.consumerAddress + - api_field: pscConnections.consumerForwardingRule + - api_field: pscConnections.consumerTargetProject + - api_field: pscConnections.error.code + - api_field: pscConnections.error.details + - api_field: pscConnections.error.message + - api_field: pscConnections.errorInfo.domain + - api_field: pscConnections.errorInfo.metadata + - api_field: pscConnections.errorInfo.reason + - api_field: pscConnections.errorType + - api_field: pscConnections.gceOperation + - api_field: pscConnections.pscConnectionId + - api_field: pscConnections.state + - api_field: serviceClass + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networkmanagement/resource_network_management_connectivity_test_generated_meta.yaml b/google/services/networkmanagement/resource_network_management_connectivity_test_generated_meta.yaml index f7908c9e3b7..5508ee25278 100644 --- a/google/services/networkmanagement/resource_network_management_connectivity_test_generated_meta.yaml +++ b/google/services/networkmanagement/resource_network_management_connectivity_test_generated_meta.yaml @@ -1,40 +1,40 @@ -resource: 'google_network_management_connectivity_test' -generation_type: 'mmv1' -source_file: 'products/networkmanagement/ConnectivityTest.yaml' -api_service_name: 'networkmanagement.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ConnectivityTest' +resource: google_network_management_connectivity_test +generation_type: mmv1 +source_file: products/networkmanagement/ConnectivityTest.yaml +api_service_name: networkmanagement.googleapis.com +api_version: v1 +api_resource_type_kind: ConnectivityTest fields: - - api_field: 'bypassFirewallChecks' - - api_field: 'description' - - api_field: 'destination.cloudSqlInstance' - - api_field: 'destination.forwardingRule' - - api_field: 'destination.fqdn' - - api_field: 'destination.gkeMasterCluster' - - api_field: 'destination.instance' - - api_field: 'destination.ipAddress' - - api_field: 'destination.network' - - api_field: 'destination.port' - - api_field: 'destination.projectId' - - api_field: 'destination.redisCluster' - - api_field: 'destination.redisInstance' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'protocol' - - api_field: 'relatedProjects' - - api_field: 'roundTrip' - - api_field: 'source.appEngineVersion.uri' - - api_field: 'source.cloudFunction.uri' - - api_field: 'source.cloudRunRevision.uri' - - api_field: 'source.cloudSqlInstance' - - api_field: 'source.gkeMasterCluster' - - api_field: 'source.instance' - - api_field: 'source.ipAddress' - - api_field: 'source.network' - - api_field: 'source.networkType' - - api_field: 'source.port' - - api_field: 'source.projectId' - - field: 'terraform_labels' - provider_only: true + - api_field: bypassFirewallChecks + - api_field: description + - api_field: destination.cloudSqlInstance + - api_field: destination.forwardingRule + - api_field: destination.fqdn + - api_field: destination.gkeMasterCluster + - api_field: destination.instance + - api_field: destination.ipAddress + - api_field: destination.network + - api_field: destination.port + - api_field: destination.projectId + - api_field: destination.redisCluster + - api_field: destination.redisInstance + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: protocol + - api_field: relatedProjects + - api_field: roundTrip + - api_field: source.appEngineVersion.uri + - api_field: source.cloudFunction.uri + - api_field: source.cloudRunRevision.uri + - api_field: source.cloudSqlInstance + - api_field: source.gkeMasterCluster + - api_field: source.instance + - api_field: source.ipAddress + - api_field: source.network + - api_field: source.networkType + - api_field: source.port + - api_field: source.projectId + - field: terraform_labels + provider_only: true diff --git a/google/services/networkmanagement/resource_network_management_organization_vpc_flow_logs_config_generated_meta.yaml b/google/services/networkmanagement/resource_network_management_organization_vpc_flow_logs_config_generated_meta.yaml index 11073d3c6da..4a273bd1f63 100644 --- a/google/services/networkmanagement/resource_network_management_organization_vpc_flow_logs_config_generated_meta.yaml +++ b/google/services/networkmanagement/resource_network_management_organization_vpc_flow_logs_config_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_network_management_organization_vpc_flow_logs_config' -generation_type: 'mmv1' -source_file: 'products/networkmanagement/OrganizationVpcFlowLogsConfig.yaml' -api_service_name: 'networkmanagement.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'OrganizationVpcFlowLogsConfig' +resource: google_network_management_organization_vpc_flow_logs_config +generation_type: mmv1 +source_file: products/networkmanagement/OrganizationVpcFlowLogsConfig.yaml +api_service_name: networkmanagement.googleapis.com +api_version: v1 +api_resource_type_kind: OrganizationVpcFlowLogsConfig fields: - - api_field: 'aggregationInterval' - - api_field: 'createTime' - - api_field: 'crossProjectMetadata' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'filterExpr' - - api_field: 'flowSampling' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'metadata' - - api_field: 'metadataFields' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - field: 'vpc_flow_logs_config_id' - provider_only: true + - api_field: aggregationInterval + - api_field: createTime + - api_field: crossProjectMetadata + - api_field: description + - field: effective_labels + provider_only: true + - api_field: filterExpr + - api_field: flowSampling + - api_field: labels + - field: location + provider_only: true + - api_field: metadata + - api_field: metadataFields + - api_field: name + - field: organization + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime + - field: vpc_flow_logs_config_id + provider_only: true diff --git a/google/services/networkmanagement/resource_network_management_vpc_flow_logs_config_generated_meta.yaml b/google/services/networkmanagement/resource_network_management_vpc_flow_logs_config_generated_meta.yaml index d45504d7597..72b2f09c510 100644 --- a/google/services/networkmanagement/resource_network_management_vpc_flow_logs_config_generated_meta.yaml +++ b/google/services/networkmanagement/resource_network_management_vpc_flow_logs_config_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_network_management_vpc_flow_logs_config' -generation_type: 'mmv1' -source_file: 'products/networkmanagement/VpcFlowLogsConfig.yaml' -api_service_name: 'networkmanagement.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VpcFlowLogsConfig' +resource: google_network_management_vpc_flow_logs_config +generation_type: mmv1 +source_file: products/networkmanagement/VpcFlowLogsConfig.yaml +api_service_name: networkmanagement.googleapis.com +api_version: v1 +api_resource_type_kind: VpcFlowLogsConfig fields: - - api_field: 'aggregationInterval' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'filterExpr' - - api_field: 'flowSampling' - - api_field: 'interconnectAttachment' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'metadata' - - api_field: 'metadataFields' - - api_field: 'name' - - api_field: 'network' - - api_field: 'state' - - api_field: 'subnet' - - api_field: 'targetResourceState' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - field: 'vpc_flow_logs_config_id' - provider_only: true - - api_field: 'vpnTunnel' + - api_field: aggregationInterval + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: filterExpr + - api_field: flowSampling + - api_field: interconnectAttachment + - api_field: labels + - field: location + provider_only: true + - api_field: metadata + - api_field: metadataFields + - api_field: name + - api_field: network + - api_field: state + - api_field: subnet + - api_field: targetResourceState + - field: terraform_labels + provider_only: true + - api_field: updateTime + - field: vpc_flow_logs_config_id + provider_only: true + - api_field: vpnTunnel diff --git a/google/services/networksecurity/iam_network_security_address_group_generated_test.go b/google/services/networksecurity/iam_network_security_address_group_generated_test.go index 07d2b748f5a..90df6be90da 100644 --- a/google/services/networksecurity/iam_network_security_address_group_generated_test.go +++ b/google/services/networksecurity/iam_network_security_address_group_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -228,3 +229,57 @@ name = google_network_security_address_group.default.name } `, context) } + +func generateNetworkSecurityProjectAddressGroupIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/addressGroups/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateNetworkSecurityProjectAddressGroupIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/addressGroups/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateNetworkSecurityProjectAddressGroupIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/addressGroups/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/networksecurity/resource_network_security_address_group_generated_meta.yaml b/google/services/networksecurity/resource_network_security_address_group_generated_meta.yaml index eb8eb71f7ab..3c707064290 100644 --- a/google/services/networksecurity/resource_network_security_address_group_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_address_group_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_network_security_address_group' -generation_type: 'mmv1' -source_file: 'products/networksecurity/AddressGroup.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AddressGroup' +resource: google_network_security_address_group +generation_type: mmv1 +source_file: products/networksecurity/AddressGroup.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: AddressGroup fields: - - api_field: 'capacity' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'items' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - api_field: capacity + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: items + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: parent + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_authz_policy_generated_meta.yaml b/google/services/networksecurity/resource_network_security_authz_policy_generated_meta.yaml index 93a9eb5af2d..706f6bb764e 100644 --- a/google/services/networksecurity/resource_network_security_authz_policy_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_authz_policy_generated_meta.yaml @@ -1,96 +1,96 @@ -resource: 'google_network_security_authz_policy' -generation_type: 'mmv1' -source_file: 'products/networksecurity/AuthzPolicy.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AuthzPolicy' +resource: google_network_security_authz_policy +generation_type: mmv1 +source_file: products/networksecurity/AuthzPolicy.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: AuthzPolicy fields: - - api_field: 'action' - - api_field: 'createTime' - - api_field: 'customProvider.authzExtension.resources' - - api_field: 'customProvider.cloudIap.enabled' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'httpRules.from.notSources.ipBlocks.length' - - api_field: 'httpRules.from.notSources.ipBlocks.prefix' - - api_field: 'httpRules.from.notSources.principals.contains' - - api_field: 'httpRules.from.notSources.principals.exact' - - api_field: 'httpRules.from.notSources.principals.ignoreCase' - - api_field: 'httpRules.from.notSources.principals.prefix' - - api_field: 'httpRules.from.notSources.principals.principal.contains' - - api_field: 'httpRules.from.notSources.principals.principal.exact' - - api_field: 'httpRules.from.notSources.principals.principal.ignoreCase' - - api_field: 'httpRules.from.notSources.principals.principal.prefix' - - api_field: 'httpRules.from.notSources.principals.principal.suffix' - - api_field: 'httpRules.from.notSources.principals.principalSelector' - - api_field: 'httpRules.from.notSources.principals.suffix' - - api_field: 'httpRules.from.notSources.resources.iamServiceAccount.contains' - - api_field: 'httpRules.from.notSources.resources.iamServiceAccount.exact' - - api_field: 'httpRules.from.notSources.resources.iamServiceAccount.ignoreCase' - - api_field: 'httpRules.from.notSources.resources.iamServiceAccount.prefix' - - api_field: 'httpRules.from.notSources.resources.iamServiceAccount.suffix' - - api_field: 'httpRules.from.notSources.resources.tagValueIdSet.ids' - - api_field: 'httpRules.from.sources.ipBlocks.length' - - api_field: 'httpRules.from.sources.ipBlocks.prefix' - - api_field: 'httpRules.from.sources.principals.contains' - - api_field: 'httpRules.from.sources.principals.exact' - - api_field: 'httpRules.from.sources.principals.ignoreCase' - - api_field: 'httpRules.from.sources.principals.prefix' - - api_field: 'httpRules.from.sources.principals.principal.contains' - - api_field: 'httpRules.from.sources.principals.principal.exact' - - api_field: 'httpRules.from.sources.principals.principal.ignoreCase' - - api_field: 'httpRules.from.sources.principals.principal.prefix' - - api_field: 'httpRules.from.sources.principals.principal.suffix' - - api_field: 'httpRules.from.sources.principals.principalSelector' - - api_field: 'httpRules.from.sources.principals.suffix' - - api_field: 'httpRules.from.sources.resources.iamServiceAccount.contains' - - api_field: 'httpRules.from.sources.resources.iamServiceAccount.exact' - - api_field: 'httpRules.from.sources.resources.iamServiceAccount.ignoreCase' - - api_field: 'httpRules.from.sources.resources.iamServiceAccount.prefix' - - api_field: 'httpRules.from.sources.resources.iamServiceAccount.suffix' - - api_field: 'httpRules.from.sources.resources.tagValueIdSet.ids' - - api_field: 'httpRules.to.notOperations.headerSet.headers.name' - - api_field: 'httpRules.to.notOperations.headerSet.headers.value.contains' - - api_field: 'httpRules.to.notOperations.headerSet.headers.value.exact' - - api_field: 'httpRules.to.notOperations.headerSet.headers.value.ignoreCase' - - api_field: 'httpRules.to.notOperations.headerSet.headers.value.prefix' - - api_field: 'httpRules.to.notOperations.headerSet.headers.value.suffix' - - api_field: 'httpRules.to.notOperations.hosts.contains' - - api_field: 'httpRules.to.notOperations.hosts.exact' - - api_field: 'httpRules.to.notOperations.hosts.ignoreCase' - - api_field: 'httpRules.to.notOperations.hosts.prefix' - - api_field: 'httpRules.to.notOperations.hosts.suffix' - - api_field: 'httpRules.to.notOperations.methods' - - api_field: 'httpRules.to.notOperations.paths.contains' - - api_field: 'httpRules.to.notOperations.paths.exact' - - api_field: 'httpRules.to.notOperations.paths.ignoreCase' - - api_field: 'httpRules.to.notOperations.paths.prefix' - - api_field: 'httpRules.to.notOperations.paths.suffix' - - api_field: 'httpRules.to.operations.headerSet.headers.name' - - api_field: 'httpRules.to.operations.headerSet.headers.value.contains' - - api_field: 'httpRules.to.operations.headerSet.headers.value.exact' - - api_field: 'httpRules.to.operations.headerSet.headers.value.ignoreCase' - - api_field: 'httpRules.to.operations.headerSet.headers.value.prefix' - - api_field: 'httpRules.to.operations.headerSet.headers.value.suffix' - - api_field: 'httpRules.to.operations.hosts.contains' - - api_field: 'httpRules.to.operations.hosts.exact' - - api_field: 'httpRules.to.operations.hosts.ignoreCase' - - api_field: 'httpRules.to.operations.hosts.prefix' - - api_field: 'httpRules.to.operations.hosts.suffix' - - api_field: 'httpRules.to.operations.methods' - - api_field: 'httpRules.to.operations.paths.contains' - - api_field: 'httpRules.to.operations.paths.exact' - - api_field: 'httpRules.to.operations.paths.ignoreCase' - - api_field: 'httpRules.to.operations.paths.prefix' - - api_field: 'httpRules.to.operations.paths.suffix' - - api_field: 'httpRules.when' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'target.loadBalancingScheme' - - api_field: 'target.resources' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: action + - api_field: createTime + - api_field: customProvider.authzExtension.resources + - api_field: customProvider.cloudIap.enabled + - api_field: description + - field: effective_labels + provider_only: true + - api_field: httpRules.from.notSources.ipBlocks.length + - api_field: httpRules.from.notSources.ipBlocks.prefix + - api_field: httpRules.from.notSources.principals.contains + - api_field: httpRules.from.notSources.principals.exact + - api_field: httpRules.from.notSources.principals.ignoreCase + - api_field: httpRules.from.notSources.principals.prefix + - api_field: httpRules.from.notSources.principals.principal.contains + - api_field: httpRules.from.notSources.principals.principal.exact + - api_field: httpRules.from.notSources.principals.principal.ignoreCase + - api_field: httpRules.from.notSources.principals.principal.prefix + - api_field: httpRules.from.notSources.principals.principal.suffix + - api_field: httpRules.from.notSources.principals.principalSelector + - api_field: httpRules.from.notSources.principals.suffix + - api_field: httpRules.from.notSources.resources.iamServiceAccount.contains + - api_field: httpRules.from.notSources.resources.iamServiceAccount.exact + - api_field: httpRules.from.notSources.resources.iamServiceAccount.ignoreCase + - api_field: httpRules.from.notSources.resources.iamServiceAccount.prefix + - api_field: httpRules.from.notSources.resources.iamServiceAccount.suffix + - api_field: httpRules.from.notSources.resources.tagValueIdSet.ids + - api_field: httpRules.from.sources.ipBlocks.length + - api_field: httpRules.from.sources.ipBlocks.prefix + - api_field: httpRules.from.sources.principals.contains + - api_field: httpRules.from.sources.principals.exact + - api_field: httpRules.from.sources.principals.ignoreCase + - api_field: httpRules.from.sources.principals.prefix + - api_field: httpRules.from.sources.principals.principal.contains + - api_field: httpRules.from.sources.principals.principal.exact + - api_field: httpRules.from.sources.principals.principal.ignoreCase + - api_field: httpRules.from.sources.principals.principal.prefix + - api_field: httpRules.from.sources.principals.principal.suffix + - api_field: httpRules.from.sources.principals.principalSelector + - api_field: httpRules.from.sources.principals.suffix + - api_field: httpRules.from.sources.resources.iamServiceAccount.contains + - api_field: httpRules.from.sources.resources.iamServiceAccount.exact + - api_field: httpRules.from.sources.resources.iamServiceAccount.ignoreCase + - api_field: httpRules.from.sources.resources.iamServiceAccount.prefix + - api_field: httpRules.from.sources.resources.iamServiceAccount.suffix + - api_field: httpRules.from.sources.resources.tagValueIdSet.ids + - api_field: httpRules.to.notOperations.headerSet.headers.name + - api_field: httpRules.to.notOperations.headerSet.headers.value.contains + - api_field: httpRules.to.notOperations.headerSet.headers.value.exact + - api_field: httpRules.to.notOperations.headerSet.headers.value.ignoreCase + - api_field: httpRules.to.notOperations.headerSet.headers.value.prefix + - api_field: httpRules.to.notOperations.headerSet.headers.value.suffix + - api_field: httpRules.to.notOperations.hosts.contains + - api_field: httpRules.to.notOperations.hosts.exact + - api_field: httpRules.to.notOperations.hosts.ignoreCase + - api_field: httpRules.to.notOperations.hosts.prefix + - api_field: httpRules.to.notOperations.hosts.suffix + - api_field: httpRules.to.notOperations.methods + - api_field: httpRules.to.notOperations.paths.contains + - api_field: httpRules.to.notOperations.paths.exact + - api_field: httpRules.to.notOperations.paths.ignoreCase + - api_field: httpRules.to.notOperations.paths.prefix + - api_field: httpRules.to.notOperations.paths.suffix + - api_field: httpRules.to.operations.headerSet.headers.name + - api_field: httpRules.to.operations.headerSet.headers.value.contains + - api_field: httpRules.to.operations.headerSet.headers.value.exact + - api_field: httpRules.to.operations.headerSet.headers.value.ignoreCase + - api_field: httpRules.to.operations.headerSet.headers.value.prefix + - api_field: httpRules.to.operations.headerSet.headers.value.suffix + - api_field: httpRules.to.operations.hosts.contains + - api_field: httpRules.to.operations.hosts.exact + - api_field: httpRules.to.operations.hosts.ignoreCase + - api_field: httpRules.to.operations.hosts.prefix + - api_field: httpRules.to.operations.hosts.suffix + - api_field: httpRules.to.operations.methods + - api_field: httpRules.to.operations.paths.contains + - api_field: httpRules.to.operations.paths.exact + - api_field: httpRules.to.operations.paths.ignoreCase + - api_field: httpRules.to.operations.paths.prefix + - api_field: httpRules.to.operations.paths.suffix + - api_field: httpRules.when + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: target.loadBalancingScheme + - api_field: target.resources + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_backend_authentication_config_generated_meta.yaml b/google/services/networksecurity/resource_network_security_backend_authentication_config_generated_meta.yaml index 8ec1a5fa7b7..a7952621712 100644 --- a/google/services/networksecurity/resource_network_security_backend_authentication_config_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_backend_authentication_config_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_network_security_backend_authentication_config' -generation_type: 'mmv1' -source_file: 'products/networksecurity/BackendAuthenticationConfig.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackendAuthenticationConfig' +resource: google_network_security_backend_authentication_config +generation_type: mmv1 +source_file: products/networksecurity/BackendAuthenticationConfig.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: BackendAuthenticationConfig fields: - - api_field: 'clientCertificate' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'trustConfig' - - api_field: 'updateTime' - - api_field: 'wellKnownRoots' + - api_field: clientCertificate + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: trustConfig + - api_field: updateTime + - api_field: wellKnownRoots diff --git a/google/services/networksecurity/resource_network_security_client_tls_policy_generated_meta.yaml b/google/services/networksecurity/resource_network_security_client_tls_policy_generated_meta.yaml index 7ccf29ea2d4..3748f41da27 100644 --- a/google/services/networksecurity/resource_network_security_client_tls_policy_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_client_tls_policy_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_network_security_client_tls_policy' -generation_type: 'mmv1' -source_file: 'products/networksecurity/ClientTlsPolicy.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ClientTlsPolicy' +resource: google_network_security_client_tls_policy +generation_type: mmv1 +source_file: products/networksecurity/ClientTlsPolicy.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: ClientTlsPolicy fields: - - api_field: 'clientCertificate.certificateProviderInstance.pluginInstance' - - api_field: 'clientCertificate.grpcEndpoint.targetUri' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'serverValidationCa.certificateProviderInstance.pluginInstance' - - api_field: 'serverValidationCa.grpcEndpoint.targetUri' - - api_field: 'sni' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: clientCertificate.certificateProviderInstance.pluginInstance + - api_field: clientCertificate.grpcEndpoint.targetUri + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: serverValidationCa.certificateProviderInstance.pluginInstance + - api_field: serverValidationCa.grpcEndpoint.targetUri + - api_field: sni + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_dns_threat_detector.go b/google/services/networksecurity/resource_network_security_dns_threat_detector.go new file mode 100644 index 00000000000..80cebb67563 --- /dev/null +++ b/google/services/networksecurity/resource_network_security_dns_threat_detector.go @@ -0,0 +1,650 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networksecurity/DnsThreatDetector.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networksecurity + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceNetworkSecurityDnsThreatDetector() *schema.Resource { + return &schema.Resource{ + Create: resourceNetworkSecurityDnsThreatDetectorCreate, + Read: resourceNetworkSecurityDnsThreatDetectorRead, + Update: resourceNetworkSecurityDnsThreatDetectorUpdate, + Delete: resourceNetworkSecurityDnsThreatDetectorDelete, + + Importer: &schema.ResourceImporter{ + State: resourceNetworkSecurityDnsThreatDetectorImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.SetLabelsDiff, + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "location": { + Type: schema.TypeString, + OptionalForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `Name of the DnsThreatDetector resource.`, + }, + "excluded_networks": { + Type: schema.TypeList, + Optional: true, + Description: `List of networks that are excluded from detection. Format: projects/{project}/global/networks/{name}.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "labels": { + Type: schema.TypeMap, + Optional: true, + Description: `Set of label tags associated with the DNS Threat Detector resource. +An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + + +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field 'effective_labels' for all of the labels present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "location": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `The location of the DNS Threat Detector. The only supported value is 'global'.`, + Default: "global", + }, + "threat_detector_provider": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `DNS Threat Detection provider. The only supported value is 'INFOBLOX'.`, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `The timestamp when the resource was created. +A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. +Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"`, + }, + "effective_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "terraform_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `The combination of labels configured directly on the resource + and default labels configured on the provider.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `The timestamp when the resource was updated. +A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. +Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceNetworkSecurityDnsThreatDetectorCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + threatDetectorProviderProp, err := expandNetworkSecurityDnsThreatDetectorThreatDetectorProvider(d.Get("threat_detector_provider"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("threat_detector_provider"); !tpgresource.IsEmptyValue(reflect.ValueOf(threatDetectorProviderProp)) && (ok || !reflect.DeepEqual(v, threatDetectorProviderProp)) { + obj["provider"] = threatDetectorProviderProp + } + excludedNetworksProp, err := expandNetworkSecurityDnsThreatDetectorExcludedNetworks(d.Get("excluded_networks"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("excluded_networks"); !tpgresource.IsEmptyValue(reflect.ValueOf(excludedNetworksProp)) && (ok || !reflect.DeepEqual(v, excludedNetworksProp)) { + obj["excludedNetworks"] = excludedNetworksProp + } + effectiveLabelsProp, err := expandNetworkSecurityDnsThreatDetectorEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(effectiveLabelsProp)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + nameProp, err := expandNetworkSecurityDnsThreatDetectorName(d.Get("name"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("name"); !tpgresource.IsEmptyValue(reflect.ValueOf(nameProp)) && (ok || !reflect.DeepEqual(v, nameProp)) { + obj["name"] = nameProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkSecurityBasePath}}projects/{{project}}/locations/{{location}}/dnsThreatDetectors?dnsThreatDetectorId={{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new DnsThreatDetector: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for DnsThreatDetector: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating DnsThreatDetector: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/dnsThreatDetectors/{{name}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + log.Printf("[DEBUG] Finished creating DnsThreatDetector %q: %#v", d.Id(), res) + + return resourceNetworkSecurityDnsThreatDetectorRead(d, meta) +} + +func resourceNetworkSecurityDnsThreatDetectorRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkSecurityBasePath}}projects/{{project}}/locations/{{location}}/dnsThreatDetectors/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for DnsThreatDetector: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("NetworkSecurityDnsThreatDetector %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + + if err := d.Set("threat_detector_provider", flattenNetworkSecurityDnsThreatDetectorThreatDetectorProvider(res["provider"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + if err := d.Set("excluded_networks", flattenNetworkSecurityDnsThreatDetectorExcludedNetworks(res["excludedNetworks"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + if err := d.Set("create_time", flattenNetworkSecurityDnsThreatDetectorCreateTime(res["createTime"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + if err := d.Set("update_time", flattenNetworkSecurityDnsThreatDetectorUpdateTime(res["updateTime"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + if err := d.Set("labels", flattenNetworkSecurityDnsThreatDetectorLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + if err := d.Set("terraform_labels", flattenNetworkSecurityDnsThreatDetectorTerraformLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + if err := d.Set("effective_labels", flattenNetworkSecurityDnsThreatDetectorEffectiveLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + if err := d.Set("name", flattenNetworkSecurityDnsThreatDetectorName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading DnsThreatDetector: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("name"); !ok && v == "" { + err = identity.Set("name", d.Get("name").(string)) + if err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if v, ok := identity.GetOk("location"); !ok && v == "" { + err = identity.Set("location", d.Get("location").(string)) + if err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceNetworkSecurityDnsThreatDetectorUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if nameValue, ok := d.GetOk("name"); ok && nameValue.(string) != "" { + if err = identity.Set("name", nameValue.(string)); err != nil { + return fmt.Errorf("Error setting name: %s", err) + } + } + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for DnsThreatDetector: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + excludedNetworksProp, err := expandNetworkSecurityDnsThreatDetectorExcludedNetworks(d.Get("excluded_networks"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("excluded_networks"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, excludedNetworksProp)) { + obj["excludedNetworks"] = excludedNetworksProp + } + effectiveLabelsProp, err := expandNetworkSecurityDnsThreatDetectorEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkSecurityBasePath}}projects/{{project}}/locations/{{location}}/dnsThreatDetectors/{{name}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating DnsThreatDetector %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + if d.HasChange("excluded_networks") { + updateMask = append(updateMask, "excludedNetworks") + } + + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating DnsThreatDetector %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating DnsThreatDetector %q: %#v", d.Id(), res) + } + + } + + return resourceNetworkSecurityDnsThreatDetectorRead(d, meta) +} + +func resourceNetworkSecurityDnsThreatDetectorDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for DnsThreatDetector: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkSecurityBasePath}}projects/{{project}}/locations/{{location}}/dnsThreatDetectors/{{name}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting DnsThreatDetector %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "DnsThreatDetector") + } + + log.Printf("[DEBUG] Finished deleting DnsThreatDetector %q: %#v", d.Id(), res) + return nil +} + +func resourceNetworkSecurityDnsThreatDetectorImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/locations/(?P[^/]+)/dnsThreatDetectors/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/dnsThreatDetectors/{{name}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenNetworkSecurityDnsThreatDetectorThreatDetectorProvider(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkSecurityDnsThreatDetectorExcludedNetworks(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkSecurityDnsThreatDetectorCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkSecurityDnsThreatDetectorUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkSecurityDnsThreatDetectorLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkSecurityDnsThreatDetectorTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkSecurityDnsThreatDetectorEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkSecurityDnsThreatDetectorName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + return tpgresource.GetResourceNameFromSelfLink(v.(string)) +} + +func expandNetworkSecurityDnsThreatDetectorThreatDetectorProvider(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkSecurityDnsThreatDetectorExcludedNetworks(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkSecurityDnsThreatDetectorEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} + +func expandNetworkSecurityDnsThreatDetectorName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} diff --git a/google/services/networksecurity/resource_network_security_dns_threat_detector_generated_meta.yaml b/google/services/networksecurity/resource_network_security_dns_threat_detector_generated_meta.yaml new file mode 100644 index 00000000000..65654acff90 --- /dev/null +++ b/google/services/networksecurity/resource_network_security_dns_threat_detector_generated_meta.yaml @@ -0,0 +1,20 @@ +resource: google_network_security_dns_threat_detector +generation_type: mmv1 +source_file: products/networksecurity/DnsThreatDetector.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: DnsThreatDetector +fields: + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: excludedNetworks + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: provider + field: threat_detector_provider + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_dns_threat_detector_sweeper.go b/google/services/networksecurity/resource_network_security_dns_threat_detector_sweeper.go new file mode 100644 index 00000000000..1bc8bdeb7a8 --- /dev/null +++ b/google/services/networksecurity/resource_network_security_dns_threat_detector_sweeper.go @@ -0,0 +1,223 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networksecurity/DnsThreatDetector.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/sweeper_file.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networksecurity + +import ( + "context" + "fmt" + "log" + "strings" + "testing" + + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/sweeper" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func init() { + // Initialize base sweeper object + s := &sweeper.Sweeper{ + Name: "google_network_security_dns_threat_detector", + ListAndAction: listAndActionNetworkSecurityDnsThreatDetector, + DeleteFunction: testSweepNetworkSecurityDnsThreatDetector, + } + + // Register the sweeper + sweeper.AddTestSweepers(s) +} + +func testSweepNetworkSecurityDnsThreatDetector(_ string) error { + return listAndActionNetworkSecurityDnsThreatDetector(deleteResourceNetworkSecurityDnsThreatDetector) +} + +func listAndActionNetworkSecurityDnsThreatDetector(action sweeper.ResourceAction) error { + var lastError error + resourceName := "NetworkSecurityDnsThreatDetector" + log.Printf("[INFO][SWEEPER_LOG] Starting sweeper for %s", resourceName) + + // Prepare configurations to iterate over + var configs []*tpgresource.ResourceDataMock + t := &testing.T{} + billingId := envvar.GetTestBillingAccountFromEnv(t) + // Default single config + intermediateValues := []map[string]string{ + { + "region": "us-central1", + }, + } + + // Create configs from intermediate values + for _, values := range intermediateValues { + mockConfig := &tpgresource.ResourceDataMock{ + FieldsInSchema: map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "billing_account": billingId, + }, + } + + // Apply all provided values + for key, value := range values { + mockConfig.FieldsInSchema[key] = value + } + + // Set fallback values for common fields + region, hasRegion := mockConfig.FieldsInSchema["region"].(string) + if !hasRegion { + region = "us-central1" + mockConfig.FieldsInSchema["region"] = region + } + + if _, hasLocation := mockConfig.FieldsInSchema["location"]; !hasLocation { + mockConfig.FieldsInSchema["location"] = region + } + + if _, hasZone := mockConfig.FieldsInSchema["zone"]; !hasZone { + mockConfig.FieldsInSchema["zone"] = region + "-a" + } + + configs = append(configs, mockConfig) + } + + // Process all configurations (either from parent resources or direct substitutions) + for _, mockConfig := range configs { + // Get region from config + region := sweeper.GetFieldOrDefault(mockConfig, "region", "us-central1") + + // Create shared config for this region + config, err := sweeper.SharedConfigForRegion(region) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error getting shared config for region: %s", err) + lastError = err + continue + } + + err = config.LoadAndValidate(context.Background()) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error loading: %s", err) + lastError = err + continue + } + + // Prepare list URL + listTemplate := strings.Split("https://networksecurity.googleapis.com/v1/projects/{{project}}/locations/{{location}}/dnsThreatDetectors", "?")[0] + listUrl, err := tpgresource.ReplaceVars(mockConfig, config, listTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) + lastError = err + continue + } + + // Log additional info for parent-based resources + log.Printf("[INFO][SWEEPER_LOG] Listing %s resources at %s", resourceName, listUrl) + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: config.Project, + RawURL: listUrl, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in response from request %s: %s", listUrl, err) + lastError = err + continue + } + + // First try the expected resource key + resourceList, ok := res["dnsThreatDetectors"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'dnsThreatDetectors'") + } else { + // Next, try the common "items" pattern + resourceList, ok = res["items"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under standard 'items' key") + } else { + log.Printf("[INFO][SWEEPER_LOG] no resources found") + continue + } + } + rl := resourceList.([]interface{}) + + log.Printf("[INFO][SWEEPER_LOG] Found %d items in %s list response.", len(rl), resourceName) + // Keep count of items that aren't sweepable for logging. + nonPrefixCount := 0 + for _, ri := range rl { + obj, ok := ri.(map[string]interface{}) + if !ok { + log.Printf("[INFO][SWEEPER_LOG] Item was not a map: %T", ri) + continue + } + + if err := action(config, mockConfig, obj); err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in action: %s", err) + lastError = err + } else { + nonPrefixCount++ + } + } + } + + return lastError +} + +func deleteResourceNetworkSecurityDnsThreatDetector(config *transport_tpg.Config, d *tpgresource.ResourceDataMock, obj map[string]interface{}) error { + var deletionerror error + resourceName := "NetworkSecurityDnsThreatDetector" + var name string + if obj["name"] == nil { + log.Printf("[INFO][SWEEPER_LOG] %s resource name was nil", resourceName) + return fmt.Errorf("%s resource name was nil", resourceName) + } + + name = tpgresource.GetResourceNameFromSelfLink(obj["name"].(string)) + + // Skip resources that shouldn't be sweeped + if !sweeper.IsSweepableTestResource(name) { + return nil + } + + deleteTemplate := "https://networksecurity.googleapis.com/v1/projects/{{project}}/locations/{{location}}/dnsThreatDetectors/{{name}}" + + url, err := tpgresource.ReplaceVars(d, config, deleteTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) + deletionerror = err + } + url = url + name + + // Don't wait on operations as we may have a lot to delete + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: config.Project, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error deleting for url %s : %s", url, err) + deletionerror = err + } else { + log.Printf("[INFO][SWEEPER_LOG] Sent delete request for %s resource: %s", resourceName, name) + } + + return deletionerror +} diff --git a/google/services/networksecurity/resource_network_security_dns_threat_detector_test.go b/google/services/networksecurity/resource_network_security_dns_threat_detector_test.go index ffca7ecf623..2d596ecacea 100644 --- a/google/services/networksecurity/resource_network_security_dns_threat_detector_test.go +++ b/google/services/networksecurity/resource_network_security_dns_threat_detector_test.go @@ -15,3 +15,120 @@ // // ---------------------------------------------------------------------------- package networksecurity_test + +import ( + "fmt" + "strings" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func TestAccNetworkSecurityDnsThreatDetector_update(t *testing.T) { + t.Parallel() + + dnsThreatDetectorName := fmt.Sprintf("tf-test-dtd-%s", acctest.RandString(t, 10)) + vpcName := fmt.Sprintf("tf-test-dtd-vpc-%s", acctest.RandString(t, 10)) + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkSecurityDnsThreatDetectorDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkSecurityDnsThreatDetector_basic(dnsThreatDetectorName), + }, + { + ResourceName: "google_network_security_dns_threat_detector.foobar", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "terraform_labels"}, + }, + { + Config: testAccNetworkSecurityDnsThreatDetector_update(dnsThreatDetectorName, vpcName), + }, + { + ResourceName: "google_network_security_dns_threat_detector.foobar", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "terraform_labels"}, + }, + }, + }) +} + +func testAccNetworkSecurityDnsThreatDetector_basic(name string) string { + return fmt.Sprintf(` +resource "google_network_security_dns_threat_detector" "foobar" { + name = "%s" + location = "global" + threat_detector_provider = "INFOBLOX" + labels = { + foo = "bar" + } +} +`, name) +} + +func testAccNetworkSecurityDnsThreatDetector_update(name, vpcName string) string { + return fmt.Sprintf(` +resource "google_compute_network" "foobar" { + name = "%s" + auto_create_subnetworks = false +} + +resource "google_network_security_dns_threat_detector" "foobar" { + name = "%s" + location = "global" + threat_detector_provider = "INFOBLOX" + excluded_networks = [ google_compute_network.foobar.id ] + labels = { + foo = "bar" + } +} +`, vpcName, name) +} + +func testAccCheckNetworkSecurityDnsThreatDetectorDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_network_security_dns_threat_detector" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{NetworkSecurityBasePath}}projects/{{project}}/locations/{{location}}/dnsThreatDetectors/{{name}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("DnsThreatDetector still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/networksecurity/resource_network_security_firewall_endpoint_association_generated_meta.yaml b/google/services/networksecurity/resource_network_security_firewall_endpoint_association_generated_meta.yaml index 56dddf85afb..c503b6082cd 100644 --- a/google/services/networksecurity/resource_network_security_firewall_endpoint_association_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_firewall_endpoint_association_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_network_security_firewall_endpoint_association' -generation_type: 'mmv1' -source_file: 'products/networksecurity/FirewallEndpointAssociation.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallEndpointAssociation' +resource: google_network_security_firewall_endpoint_association +generation_type: mmv1 +source_file: products/networksecurity/FirewallEndpointAssociation.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallEndpointAssociation fields: - - api_field: 'createTime' - - api_field: 'disabled' - - field: 'effective_labels' - provider_only: true - - api_field: 'firewallEndpoint' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'network' - - field: 'parent' - provider_only: true - - api_field: 'reconciling' - - api_field: 'selfLink' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'tlsInspectionPolicy' - - api_field: 'updateTime' + - api_field: createTime + - api_field: disabled + - field: effective_labels + provider_only: true + - api_field: firewallEndpoint + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: network + - field: parent + provider_only: true + - api_field: reconciling + - api_field: selfLink + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: tlsInspectionPolicy + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_firewall_endpoint_generated_meta.yaml b/google/services/networksecurity/resource_network_security_firewall_endpoint_generated_meta.yaml index 7da122005de..78e6bb9b5f0 100644 --- a/google/services/networksecurity/resource_network_security_firewall_endpoint_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_firewall_endpoint_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_security_firewall_endpoint' -generation_type: 'mmv1' -source_file: 'products/networksecurity/FirewallEndpoint.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FirewallEndpoint' +resource: google_network_security_firewall_endpoint +generation_type: mmv1 +source_file: products/networksecurity/FirewallEndpoint.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: FirewallEndpoint fields: - - api_field: 'associatedNetworks' - - api_field: 'billingProjectId' - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'endpointSettings.jumboFramesEnabled' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'reconciling' - - api_field: 'selfLink' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: associatedNetworks + - api_field: billingProjectId + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: endpointSettings.jumboFramesEnabled + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: parent + provider_only: true + - api_field: reconciling + - api_field: selfLink + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_gateway_security_policy_generated_meta.yaml b/google/services/networksecurity/resource_network_security_gateway_security_policy_generated_meta.yaml index faa0ef84b6b..0798e774249 100644 --- a/google/services/networksecurity/resource_network_security_gateway_security_policy_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_gateway_security_policy_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_network_security_gateway_security_policy' -generation_type: 'mmv1' -source_file: 'products/networksecurity/GatewaySecurityPolicy.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GatewaySecurityPolicy' +resource: google_network_security_gateway_security_policy +generation_type: mmv1 +source_file: products/networksecurity/GatewaySecurityPolicy.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: GatewaySecurityPolicy fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'selfLink' - - api_field: 'tlsInspectionPolicy' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: selfLink + - api_field: tlsInspectionPolicy + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_gateway_security_policy_rule_generated_meta.yaml b/google/services/networksecurity/resource_network_security_gateway_security_policy_rule_generated_meta.yaml index 28992d84532..62ee55c2e19 100644 --- a/google/services/networksecurity/resource_network_security_gateway_security_policy_rule_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_gateway_security_policy_rule_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_network_security_gateway_security_policy_rule' -generation_type: 'mmv1' -source_file: 'products/networksecurity/GatewaySecurityPolicyRule.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GatewaySecurityPolicyRule' +resource: google_network_security_gateway_security_policy_rule +generation_type: mmv1 +source_file: products/networksecurity/GatewaySecurityPolicyRule.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: GatewaySecurityPolicyRule fields: - - api_field: 'applicationMatcher' - - api_field: 'basicProfile' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'enabled' - - field: 'gateway_security_policy' - provider_only: true - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'priority' - - api_field: 'selfLink' - - api_field: 'sessionMatcher' - - api_field: 'tlsInspectionEnabled' - - api_field: 'updateTime' + - api_field: applicationMatcher + - api_field: basicProfile + - api_field: createTime + - api_field: description + - api_field: enabled + - field: gateway_security_policy + provider_only: true + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: priority + - api_field: selfLink + - api_field: sessionMatcher + - api_field: tlsInspectionEnabled + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_intercept_deployment_generated_meta.yaml b/google/services/networksecurity/resource_network_security_intercept_deployment_generated_meta.yaml index 6ea04624fac..41491c8a3c9 100644 --- a/google/services/networksecurity/resource_network_security_intercept_deployment_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_intercept_deployment_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_network_security_intercept_deployment' -generation_type: 'mmv1' -source_file: 'products/networksecurity/InterceptDeployment.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterceptDeployment' +resource: google_network_security_intercept_deployment +generation_type: mmv1 +source_file: products/networksecurity/InterceptDeployment.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: InterceptDeployment fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'forwardingRule' - - api_field: 'interceptDeploymentGroup' - - field: 'intercept_deployment_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: forwardingRule + - api_field: interceptDeploymentGroup + - field: intercept_deployment_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_intercept_deployment_group_generated_meta.yaml b/google/services/networksecurity/resource_network_security_intercept_deployment_group_generated_meta.yaml index 030dd2e4c4b..ff7227068b3 100644 --- a/google/services/networksecurity/resource_network_security_intercept_deployment_group_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_intercept_deployment_group_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_security_intercept_deployment_group' -generation_type: 'mmv1' -source_file: 'products/networksecurity/InterceptDeploymentGroup.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterceptDeploymentGroup' +resource: google_network_security_intercept_deployment_group +generation_type: mmv1 +source_file: products/networksecurity/InterceptDeploymentGroup.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: InterceptDeploymentGroup fields: - - api_field: 'connectedEndpointGroups.name' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - field: 'intercept_deployment_group_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'locations.location' - - api_field: 'locations.state' - - api_field: 'name' - - api_field: 'network' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: connectedEndpointGroups.name + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - field: intercept_deployment_group_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: locations.location + - api_field: locations.state + - api_field: name + - api_field: network + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_intercept_endpoint_group_association_generated_meta.yaml b/google/services/networksecurity/resource_network_security_intercept_endpoint_group_association_generated_meta.yaml index c38ac2224d9..354a5423625 100644 --- a/google/services/networksecurity/resource_network_security_intercept_endpoint_group_association_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_intercept_endpoint_group_association_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_network_security_intercept_endpoint_group_association' -generation_type: 'mmv1' -source_file: 'products/networksecurity/InterceptEndpointGroupAssociation.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterceptEndpointGroupAssociation' +resource: google_network_security_intercept_endpoint_group_association +generation_type: mmv1 +source_file: products/networksecurity/InterceptEndpointGroupAssociation.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: InterceptEndpointGroupAssociation fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'interceptEndpointGroup' - - field: 'intercept_endpoint_group_association_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'locations.location' - - api_field: 'locations.state' - - api_field: 'locationsDetails.location' - - api_field: 'locationsDetails.state' - - api_field: 'name' - - api_field: 'network' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: interceptEndpointGroup + - field: intercept_endpoint_group_association_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: locations.location + - api_field: locations.state + - api_field: locationsDetails.location + - api_field: locationsDetails.state + - api_field: name + - api_field: network + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_meta.yaml b/google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_meta.yaml index 56f9ef1f562..27ba8196e04 100644 --- a/google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_intercept_endpoint_group_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_network_security_intercept_endpoint_group' -generation_type: 'mmv1' -source_file: 'products/networksecurity/InterceptEndpointGroup.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InterceptEndpointGroup' +resource: google_network_security_intercept_endpoint_group +generation_type: mmv1 +source_file: products/networksecurity/InterceptEndpointGroup.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: InterceptEndpointGroup fields: - - api_field: 'associations.name' - - api_field: 'associations.network' - - api_field: 'associations.state' - - api_field: 'connectedDeploymentGroup.locations.location' - - api_field: 'connectedDeploymentGroup.locations.state' - - api_field: 'connectedDeploymentGroup.name' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'interceptDeploymentGroup' - - field: 'intercept_endpoint_group_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: associations.name + - api_field: associations.network + - api_field: associations.state + - api_field: connectedDeploymentGroup.locations.location + - api_field: connectedDeploymentGroup.locations.state + - api_field: connectedDeploymentGroup.name + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: interceptDeploymentGroup + - field: intercept_endpoint_group_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_mirroring_deployment_generated_meta.yaml b/google/services/networksecurity/resource_network_security_mirroring_deployment_generated_meta.yaml index 05face3a914..ce0ca919fc3 100644 --- a/google/services/networksecurity/resource_network_security_mirroring_deployment_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_mirroring_deployment_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_network_security_mirroring_deployment' -generation_type: 'mmv1' -source_file: 'products/networksecurity/MirroringDeployment.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MirroringDeployment' +resource: google_network_security_mirroring_deployment +generation_type: mmv1 +source_file: products/networksecurity/MirroringDeployment.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: MirroringDeployment fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'forwardingRule' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mirroringDeploymentGroup' - - field: 'mirroring_deployment_id' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: forwardingRule + - api_field: labels + - field: location + provider_only: true + - api_field: mirroringDeploymentGroup + - field: mirroring_deployment_id + provider_only: true + - api_field: name + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_mirroring_deployment_group_generated_meta.yaml b/google/services/networksecurity/resource_network_security_mirroring_deployment_group_generated_meta.yaml index fe9b990a1b8..06f443244fa 100644 --- a/google/services/networksecurity/resource_network_security_mirroring_deployment_group_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_mirroring_deployment_group_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_security_mirroring_deployment_group' -generation_type: 'mmv1' -source_file: 'products/networksecurity/MirroringDeploymentGroup.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MirroringDeploymentGroup' +resource: google_network_security_mirroring_deployment_group +generation_type: mmv1 +source_file: products/networksecurity/MirroringDeploymentGroup.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: MirroringDeploymentGroup fields: - - api_field: 'connectedEndpointGroups.name' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'locations.location' - - api_field: 'locations.state' - - field: 'mirroring_deployment_group_id' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: connectedEndpointGroups.name + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: locations.location + - api_field: locations.state + - field: mirroring_deployment_group_id + provider_only: true + - api_field: name + - api_field: network + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_association_generated_meta.yaml b/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_association_generated_meta.yaml index 27d52073081..e0d19e30441 100644 --- a/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_association_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_association_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_network_security_mirroring_endpoint_group_association' -generation_type: 'mmv1' -source_file: 'products/networksecurity/MirroringEndpointGroupAssociation.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MirroringEndpointGroupAssociation' +resource: google_network_security_mirroring_endpoint_group_association +generation_type: mmv1 +source_file: products/networksecurity/MirroringEndpointGroupAssociation.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: MirroringEndpointGroupAssociation fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'locations.location' - - api_field: 'locations.state' - - api_field: 'locationsDetails.location' - - api_field: 'locationsDetails.state' - - api_field: 'mirroringEndpointGroup' - - field: 'mirroring_endpoint_group_association_id' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: locations.location + - api_field: locations.state + - api_field: locationsDetails.location + - api_field: locationsDetails.state + - api_field: mirroringEndpointGroup + - field: mirroring_endpoint_group_association_id + provider_only: true + - api_field: name + - api_field: network + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_generated_meta.yaml b/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_generated_meta.yaml index d23148c896f..73101b2fc1e 100644 --- a/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_mirroring_endpoint_group_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_network_security_mirroring_endpoint_group' -generation_type: 'mmv1' -source_file: 'products/networksecurity/MirroringEndpointGroup.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MirroringEndpointGroup' +resource: google_network_security_mirroring_endpoint_group +generation_type: mmv1 +source_file: products/networksecurity/MirroringEndpointGroup.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: MirroringEndpointGroup fields: - - api_field: 'associations.name' - - api_field: 'associations.network' - - api_field: 'associations.state' - - api_field: 'connectedDeploymentGroups.locations.location' - - api_field: 'connectedDeploymentGroups.locations.state' - - api_field: 'connectedDeploymentGroups.name' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mirroringDeploymentGroup' - - field: 'mirroring_endpoint_group_id' - provider_only: true - - api_field: 'name' - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: associations.name + - api_field: associations.network + - api_field: associations.state + - api_field: connectedDeploymentGroups.locations.location + - api_field: connectedDeploymentGroups.locations.state + - api_field: connectedDeploymentGroups.name + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: mirroringDeploymentGroup + - field: mirroring_endpoint_group_id + provider_only: true + - api_field: name + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_security_profile_generated_meta.yaml b/google/services/networksecurity/resource_network_security_security_profile_generated_meta.yaml index 460493caeda..5c209f0f677 100644 --- a/google/services/networksecurity/resource_network_security_security_profile_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_security_profile_generated_meta.yaml @@ -1,33 +1,33 @@ -resource: 'google_network_security_security_profile' -generation_type: 'mmv1' -source_file: 'products/networksecurity/SecurityProfile.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityProfile' +resource: google_network_security_security_profile +generation_type: mmv1 +source_file: products/networksecurity/SecurityProfile.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityProfile fields: - - api_field: 'createTime' - - api_field: 'customInterceptProfile.interceptEndpointGroup' - - api_field: 'customMirroringProfile.mirroringEndpointGroup' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true - - api_field: 'threatPreventionProfile.antivirusOverrides.action' - - api_field: 'threatPreventionProfile.antivirusOverrides.protocol' - - api_field: 'threatPreventionProfile.severityOverrides.action' - - api_field: 'threatPreventionProfile.severityOverrides.severity' - - api_field: 'threatPreventionProfile.threatOverrides.action' - - api_field: 'threatPreventionProfile.threatOverrides.threatId' - - api_field: 'threatPreventionProfile.threatOverrides.type' - - api_field: 'type' - - api_field: 'updateTime' + - api_field: createTime + - api_field: customInterceptProfile.interceptEndpointGroup + - api_field: customMirroringProfile.mirroringEndpointGroup + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: parent + provider_only: true + - api_field: selfLink + - field: terraform_labels + provider_only: true + - api_field: threatPreventionProfile.antivirusOverrides.action + - api_field: threatPreventionProfile.antivirusOverrides.protocol + - api_field: threatPreventionProfile.severityOverrides.action + - api_field: threatPreventionProfile.severityOverrides.severity + - api_field: threatPreventionProfile.threatOverrides.action + - api_field: threatPreventionProfile.threatOverrides.threatId + - api_field: threatPreventionProfile.threatOverrides.type + - api_field: type + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_security_profile_group_generated_meta.yaml b/google/services/networksecurity/resource_network_security_security_profile_group_generated_meta.yaml index 301e9fa5a85..226ffd221f6 100644 --- a/google/services/networksecurity/resource_network_security_security_profile_group_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_security_profile_group_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_network_security_security_profile_group' -generation_type: 'mmv1' -source_file: 'products/networksecurity/SecurityProfileGroup.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityProfileGroup' +resource: google_network_security_security_profile_group +generation_type: mmv1 +source_file: products/networksecurity/SecurityProfileGroup.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityProfileGroup fields: - - api_field: 'createTime' - - api_field: 'customInterceptProfile' - - api_field: 'customMirroringProfile' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'threatPreventionProfile' - - api_field: 'updateTime' + - api_field: createTime + - api_field: customInterceptProfile + - api_field: customMirroringProfile + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - field: parent + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: threatPreventionProfile + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_server_tls_policy_generated_meta.yaml b/google/services/networksecurity/resource_network_security_server_tls_policy_generated_meta.yaml index f30f7cd9f12..130b3c300c3 100644 --- a/google/services/networksecurity/resource_network_security_server_tls_policy_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_server_tls_policy_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_security_server_tls_policy' -generation_type: 'mmv1' -source_file: 'products/networksecurity/ServerTlsPolicy.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServerTlsPolicy' +resource: google_network_security_server_tls_policy +generation_type: mmv1 +source_file: products/networksecurity/ServerTlsPolicy.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: ServerTlsPolicy fields: - - api_field: 'allowOpen' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'mtlsPolicy.clientValidationCa.certificateProviderInstance.pluginInstance' - - api_field: 'mtlsPolicy.clientValidationCa.grpcEndpoint.targetUri' - - api_field: 'mtlsPolicy.clientValidationMode' - - api_field: 'mtlsPolicy.clientValidationTrustConfig' - - field: 'name' - provider_only: true - - api_field: 'serverCertificate.certificateProviderInstance.pluginInstance' - - api_field: 'serverCertificate.grpcEndpoint.targetUri' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: allowOpen + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: mtlsPolicy.clientValidationCa.certificateProviderInstance.pluginInstance + - api_field: mtlsPolicy.clientValidationCa.grpcEndpoint.targetUri + - api_field: mtlsPolicy.clientValidationMode + - api_field: mtlsPolicy.clientValidationTrustConfig + - field: name + provider_only: true + - api_field: serverCertificate.certificateProviderInstance.pluginInstance + - api_field: serverCertificate.grpcEndpoint.targetUri + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_tls_inspection_policy_generated_meta.yaml b/google/services/networksecurity/resource_network_security_tls_inspection_policy_generated_meta.yaml index 3d1f85eb3d1..2f4dbd25f15 100644 --- a/google/services/networksecurity/resource_network_security_tls_inspection_policy_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_tls_inspection_policy_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_network_security_tls_inspection_policy' -generation_type: 'mmv1' -source_file: 'products/networksecurity/TlsInspectionPolicy.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TlsInspectionPolicy' +resource: google_network_security_tls_inspection_policy +generation_type: mmv1 +source_file: products/networksecurity/TlsInspectionPolicy.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: TlsInspectionPolicy fields: - - api_field: 'caPool' - - api_field: 'createTime' - - api_field: 'customTlsFeatures' - - api_field: 'description' - - api_field: 'excludePublicCaSet' - - field: 'location' - provider_only: true - - api_field: 'minTlsVersion' - - field: 'name' - provider_only: true - - api_field: 'tlsFeatureProfile' - - api_field: 'trustConfig' - - api_field: 'updateTime' + - api_field: caPool + - api_field: createTime + - api_field: customTlsFeatures + - api_field: description + - api_field: excludePublicCaSet + - field: location + provider_only: true + - api_field: minTlsVersion + - field: name + provider_only: true + - api_field: tlsFeatureProfile + - api_field: trustConfig + - api_field: updateTime diff --git a/google/services/networksecurity/resource_network_security_url_lists_generated_meta.yaml b/google/services/networksecurity/resource_network_security_url_lists_generated_meta.yaml index 8d6eeb3977b..f4939ed1f1c 100644 --- a/google/services/networksecurity/resource_network_security_url_lists_generated_meta.yaml +++ b/google/services/networksecurity/resource_network_security_url_lists_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_network_security_url_lists' -generation_type: 'mmv1' -source_file: 'products/networksecurity/UrlLists.yaml' -api_service_name: 'networksecurity.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'UrlList' +resource: google_network_security_url_lists +generation_type: mmv1 +source_file: products/networksecurity/UrlLists.yaml +api_service_name: networksecurity.googleapis.com +api_version: v1 +api_resource_type_kind: UrlList fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'updateTime' - - api_field: 'values' + - api_field: createTime + - api_field: description + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: updateTime + - api_field: values diff --git a/google/services/networkservices/resource_network_services_authz_extension.go b/google/services/networkservices/resource_network_services_authz_extension.go index 2bf73442da0..f4083025a8e 100644 --- a/google/services/networkservices/resource_network_services_authz_extension.go +++ b/google/services/networkservices/resource_network_services_authz_extension.go @@ -208,8 +208,22 @@ Please refer to the field 'effective_labels' for all of the labels present on th Type: schema.TypeString, Computed: true, Optional: true, - ValidateFunc: verify.ValidateEnum([]string{"WIRE_FORMAT_UNSPECIFIED", "EXT_PROC_GRPC", ""}), - Description: `The format of communication supported by the callout extension. Will be set to EXT_PROC_GRPC by the backend if no value is set. Possible values: ["WIRE_FORMAT_UNSPECIFIED", "EXT_PROC_GRPC"]`, + ValidateFunc: verify.ValidateEnum([]string{"WIRE_FORMAT_UNSPECIFIED", "EXT_PROC_GRPC", "EXT_AUTHZ_GRPC", ""}), + Description: `Specifies the communication protocol used by the callout extension +to communicate with its backend service. +Supported values: +- WIRE_FORMAT_UNSPECIFIED: + No wire format is explicitly specified. The backend automatically + defaults this value to EXT_PROC_GRPC. +- EXT_PROC_GRPC: + Uses Envoy's External Processing (ext_proc) gRPC API over a single + gRPC stream. The backend service must support HTTP/2 or H2C. + All supported events for a client request are sent over the same + gRPC stream. This is the default wire format. +- EXT_AUTHZ_GRPC: + Uses Envoy's external authorization (ext_authz) gRPC API. + The backend service must support HTTP/2 or H2C. + This option is only supported for regional AuthzExtension resources. Possible values: ["WIRE_FORMAT_UNSPECIFIED", "EXT_PROC_GRPC", "EXT_AUTHZ_GRPC"]`, }, "create_time": { Type: schema.TypeString, diff --git a/google/services/networkservices/resource_network_services_authz_extension_generated_meta.yaml b/google/services/networkservices/resource_network_services_authz_extension_generated_meta.yaml index 8e0d415d3ce..c702b82c394 100644 --- a/google/services/networkservices/resource_network_services_authz_extension_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_authz_extension_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_services_authz_extension' -generation_type: 'mmv1' -source_file: 'products/networkservices/AuthzExtension.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AuthzExtension' +resource: google_network_services_authz_extension +generation_type: mmv1 +source_file: products/networkservices/AuthzExtension.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: AuthzExtension fields: - - api_field: 'authority' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'failOpen' - - api_field: 'forwardHeaders' - - api_field: 'labels' - - api_field: 'loadBalancingScheme' - - field: 'location' - provider_only: true - - api_field: 'metadata' - - api_field: 'name' - - api_field: 'service' - - field: 'terraform_labels' - provider_only: true - - api_field: 'timeout' - - api_field: 'updateTime' - - api_field: 'wireFormat' + - api_field: authority + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: failOpen + - api_field: forwardHeaders + - api_field: labels + - api_field: loadBalancingScheme + - field: location + provider_only: true + - api_field: metadata + - api_field: name + - api_field: service + - field: terraform_labels + provider_only: true + - api_field: timeout + - api_field: updateTime + - api_field: wireFormat diff --git a/google/services/networkservices/resource_network_services_edge_cache_keyset_generated_meta.yaml b/google/services/networkservices/resource_network_services_edge_cache_keyset_generated_meta.yaml index 73cc428db52..103973efe65 100644 --- a/google/services/networkservices/resource_network_services_edge_cache_keyset_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_edge_cache_keyset_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_network_services_edge_cache_keyset' -generation_type: 'mmv1' -source_file: 'products/networkservices/EdgeCacheKeyset.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EdgeCacheKeyset' +resource: google_network_services_edge_cache_keyset +generation_type: mmv1 +source_file: products/networkservices/EdgeCacheKeyset.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: EdgeCacheKeyset fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'publicKeys.id' - field: 'public_key.id' - - api_field: 'publicKeys.managed' - field: 'public_key.managed' - - api_field: 'publicKeys.value' - field: 'public_key.value' - - field: 'terraform_labels' - provider_only: true - - api_field: 'validationSharedKeys.secretVersion' + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: name + provider_only: true + - api_field: publicKeys.id + field: public_key.id + - api_field: publicKeys.managed + field: public_key.managed + - api_field: publicKeys.value + field: public_key.value + - field: terraform_labels + provider_only: true + - api_field: validationSharedKeys.secretVersion diff --git a/google/services/networkservices/resource_network_services_edge_cache_origin_generated_meta.yaml b/google/services/networkservices/resource_network_services_edge_cache_origin_generated_meta.yaml index d7d5ba6c558..a00a8d54c5f 100644 --- a/google/services/networkservices/resource_network_services_edge_cache_origin_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_edge_cache_origin_generated_meta.yaml @@ -1,34 +1,34 @@ -resource: 'google_network_services_edge_cache_origin' -generation_type: 'mmv1' -source_file: 'products/networkservices/EdgeCacheOrigin.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EdgeCacheOrigin' +resource: google_network_services_edge_cache_origin +generation_type: mmv1 +source_file: products/networkservices/EdgeCacheOrigin.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: EdgeCacheOrigin fields: - - api_field: 'awsV4Authentication.accessKeyId' - - api_field: 'awsV4Authentication.originRegion' - - api_field: 'awsV4Authentication.secretAccessKeyVersion' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'failoverOrigin' - - api_field: 'flexShielding.flexShieldingRegions' - - api_field: 'labels' - - api_field: 'maxAttempts' - - field: 'name' - provider_only: true - - api_field: 'originAddress' - - api_field: 'originOverrideAction.headerAction.requestHeadersToAdd.headerName' - - api_field: 'originOverrideAction.headerAction.requestHeadersToAdd.headerValue' - - api_field: 'originOverrideAction.headerAction.requestHeadersToAdd.replace' - - api_field: 'originOverrideAction.urlRewrite.hostRewrite' - - api_field: 'originRedirect.redirectConditions' - - api_field: 'port' - - api_field: 'protocol' - - api_field: 'retryConditions' - - field: 'terraform_labels' - provider_only: true - - api_field: 'timeout.connectTimeout' - - api_field: 'timeout.maxAttemptsTimeout' - - api_field: 'timeout.readTimeout' - - api_field: 'timeout.responseTimeout' + - api_field: awsV4Authentication.accessKeyId + - api_field: awsV4Authentication.originRegion + - api_field: awsV4Authentication.secretAccessKeyVersion + - api_field: description + - field: effective_labels + provider_only: true + - api_field: failoverOrigin + - api_field: flexShielding.flexShieldingRegions + - api_field: labels + - api_field: maxAttempts + - field: name + provider_only: true + - api_field: originAddress + - api_field: originOverrideAction.headerAction.requestHeadersToAdd.headerName + - api_field: originOverrideAction.headerAction.requestHeadersToAdd.headerValue + - api_field: originOverrideAction.headerAction.requestHeadersToAdd.replace + - api_field: originOverrideAction.urlRewrite.hostRewrite + - api_field: originRedirect.redirectConditions + - api_field: port + - api_field: protocol + - api_field: retryConditions + - field: terraform_labels + provider_only: true + - api_field: timeout.connectTimeout + - api_field: timeout.maxAttemptsTimeout + - api_field: timeout.readTimeout + - api_field: timeout.responseTimeout diff --git a/google/services/networkservices/resource_network_services_edge_cache_service_generated_meta.yaml b/google/services/networkservices/resource_network_services_edge_cache_service_generated_meta.yaml index 3049d49683c..0ea228cd885 100644 --- a/google/services/networkservices/resource_network_services_edge_cache_service_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_edge_cache_service_generated_meta.yaml @@ -1,165 +1,165 @@ -resource: 'google_network_services_edge_cache_service' -generation_type: 'mmv1' -source_file: 'products/networkservices/EdgeCacheService.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EdgeCacheService' +resource: google_network_services_edge_cache_service +generation_type: mmv1 +source_file: products/networkservices/EdgeCacheService.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: EdgeCacheService fields: - - api_field: 'description' - - api_field: 'disableHttp2' - - api_field: 'disableQuic' - - api_field: 'edgeSecurityPolicy' - - api_field: 'edgeSslCertificates' - - field: 'effective_labels' - provider_only: true - - api_field: 'ipv4Addresses' - - api_field: 'ipv6Addresses' - - api_field: 'labels' - - api_field: 'logConfig.enable' - - api_field: 'logConfig.sampleRate' - - field: 'name' - provider_only: true - - api_field: 'requireTls' - - api_field: 'routing.hostRules.description' - field: 'routing.host_rule.description' - - api_field: 'routing.hostRules.hosts' - field: 'routing.host_rule.hosts' - - api_field: 'routing.hostRules.pathMatcher' - field: 'routing.host_rule.path_matcher' - - api_field: 'routing.pathMatchers.description' - field: 'routing.path_matcher.description' - - api_field: 'routing.pathMatchers.name' - field: 'routing.path_matcher.name' - - api_field: 'routing.pathMatchers.routeRules.description' - field: 'routing.path_matcher.route_rule.description' - - api_field: 'routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerName' - field: 'routing.path_matcher.route_rule.header_action.request_header_to_add.header_name' - - api_field: 'routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerValue' - field: 'routing.path_matcher.route_rule.header_action.request_header_to_add.header_value' - - api_field: 'routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace' - field: 'routing.path_matcher.route_rule.header_action.request_header_to_add.replace' - - api_field: 'routing.pathMatchers.routeRules.headerAction.requestHeadersToRemove.headerName' - field: 'routing.path_matcher.route_rule.header_action.request_header_to_remove.header_name' - - api_field: 'routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerName' - field: 'routing.path_matcher.route_rule.header_action.response_header_to_add.header_name' - - api_field: 'routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerValue' - field: 'routing.path_matcher.route_rule.header_action.response_header_to_add.header_value' - - api_field: 'routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace' - field: 'routing.path_matcher.route_rule.header_action.response_header_to_add.replace' - - api_field: 'routing.pathMatchers.routeRules.headerAction.responseHeadersToRemove.headerName' - field: 'routing.path_matcher.route_rule.header_action.response_header_to_remove.header_name' - - api_field: 'routing.pathMatchers.routeRules.matchRules.fullPathMatch' - field: 'routing.path_matcher.route_rule.match_rule.full_path_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.headerMatches.exactMatch' - field: 'routing.path_matcher.route_rule.match_rule.header_match.exact_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.headerMatches.headerName' - field: 'routing.path_matcher.route_rule.match_rule.header_match.header_name' - - api_field: 'routing.pathMatchers.routeRules.matchRules.headerMatches.invertMatch' - field: 'routing.path_matcher.route_rule.match_rule.header_match.invert_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.headerMatches.prefixMatch' - field: 'routing.path_matcher.route_rule.match_rule.header_match.prefix_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.headerMatches.presentMatch' - field: 'routing.path_matcher.route_rule.match_rule.header_match.present_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.headerMatches.suffixMatch' - field: 'routing.path_matcher.route_rule.match_rule.header_match.suffix_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.ignoreCase' - field: 'routing.path_matcher.route_rule.match_rule.ignore_case' - - api_field: 'routing.pathMatchers.routeRules.matchRules.pathTemplateMatch' - field: 'routing.path_matcher.route_rule.match_rule.path_template_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.prefixMatch' - field: 'routing.path_matcher.route_rule.match_rule.prefix_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.queryParameterMatches.exactMatch' - field: 'routing.path_matcher.route_rule.match_rule.query_parameter_match.exact_match' - - api_field: 'routing.pathMatchers.routeRules.matchRules.queryParameterMatches.name' - field: 'routing.path_matcher.route_rule.match_rule.query_parameter_match.name' - - api_field: 'routing.pathMatchers.routeRules.matchRules.queryParameterMatches.presentMatch' - field: 'routing.path_matcher.route_rule.match_rule.query_parameter_match.present_match' - - api_field: 'routing.pathMatchers.routeRules.origin' - field: 'routing.path_matcher.route_rule.origin' - - api_field: 'routing.pathMatchers.routeRules.priority' - field: 'routing.path_matcher.route_rule.priority' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.actions' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.actions' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.copiedParameters' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.copied_parameters' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.keyset' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.keyset' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.tokenQueryParameter' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.token_query_parameter' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.tokenTtl' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.token_ttl' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.excludeHost' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.exclude_host' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.excludeQueryString' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.exclude_query_string' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.excludedQueryParameters' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.excluded_query_parameters' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includeProtocol' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.include_protocol' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includedCookieNames' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.included_cookie_names' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includedHeaderNames' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.included_header_names' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includedQueryParameters' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.included_query_parameters' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheMode' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.cache_mode' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.clientTtl' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.client_ttl' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.defaultTtl' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.default_ttl' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.maxTtl' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.max_ttl' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.negativeCaching' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.negative_caching' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.negativeCachingPolicy' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.negative_caching_policy' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedRequestKeyset' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.signed_request_keyset' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedRequestMaximumExpirationTtl' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.signed_request_maximum_expiration_ttl' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedRequestMode' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.signed_request_mode' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedTokenOptions.allowedSignatureAlgorithms' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.signed_token_options.allowed_signature_algorithms' - - api_field: 'routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedTokenOptions.tokenQueryParameter' - field: 'routing.path_matcher.route_rule.route_action.cdn_policy.signed_token_options.token_query_parameter' - - api_field: 'routing.pathMatchers.routeRules.routeAction.compressionMode' - field: 'routing.path_matcher.route_rule.route_action.compression_mode' - - api_field: 'routing.pathMatchers.routeRules.routeAction.corsPolicy.allowCredentials' - field: 'routing.path_matcher.route_rule.route_action.cors_policy.allow_credentials' - - api_field: 'routing.pathMatchers.routeRules.routeAction.corsPolicy.allowHeaders' - field: 'routing.path_matcher.route_rule.route_action.cors_policy.allow_headers' - - api_field: 'routing.pathMatchers.routeRules.routeAction.corsPolicy.allowMethods' - field: 'routing.path_matcher.route_rule.route_action.cors_policy.allow_methods' - - api_field: 'routing.pathMatchers.routeRules.routeAction.corsPolicy.allowOrigins' - field: 'routing.path_matcher.route_rule.route_action.cors_policy.allow_origins' - - api_field: 'routing.pathMatchers.routeRules.routeAction.corsPolicy.disabled' - field: 'routing.path_matcher.route_rule.route_action.cors_policy.disabled' - - api_field: 'routing.pathMatchers.routeRules.routeAction.corsPolicy.exposeHeaders' - field: 'routing.path_matcher.route_rule.route_action.cors_policy.expose_headers' - - api_field: 'routing.pathMatchers.routeRules.routeAction.corsPolicy.maxAge' - field: 'routing.path_matcher.route_rule.route_action.cors_policy.max_age' - - api_field: 'routing.pathMatchers.routeRules.routeAction.urlRewrite.hostRewrite' - field: 'routing.path_matcher.route_rule.route_action.url_rewrite.host_rewrite' - - api_field: 'routing.pathMatchers.routeRules.routeAction.urlRewrite.pathPrefixRewrite' - field: 'routing.path_matcher.route_rule.route_action.url_rewrite.path_prefix_rewrite' - - api_field: 'routing.pathMatchers.routeRules.routeAction.urlRewrite.pathTemplateRewrite' - field: 'routing.path_matcher.route_rule.route_action.url_rewrite.path_template_rewrite' - - api_field: 'routing.pathMatchers.routeRules.routeMethods.allowedMethods' - field: 'routing.path_matcher.route_rule.route_methods.allowed_methods' - - api_field: 'routing.pathMatchers.routeRules.urlRedirect.hostRedirect' - field: 'routing.path_matcher.route_rule.url_redirect.host_redirect' - - api_field: 'routing.pathMatchers.routeRules.urlRedirect.httpsRedirect' - field: 'routing.path_matcher.route_rule.url_redirect.https_redirect' - - api_field: 'routing.pathMatchers.routeRules.urlRedirect.pathRedirect' - field: 'routing.path_matcher.route_rule.url_redirect.path_redirect' - - api_field: 'routing.pathMatchers.routeRules.urlRedirect.prefixRedirect' - field: 'routing.path_matcher.route_rule.url_redirect.prefix_redirect' - - api_field: 'routing.pathMatchers.routeRules.urlRedirect.redirectResponseCode' - field: 'routing.path_matcher.route_rule.url_redirect.redirect_response_code' - - api_field: 'routing.pathMatchers.routeRules.urlRedirect.stripQuery' - field: 'routing.path_matcher.route_rule.url_redirect.strip_query' - - api_field: 'sslPolicy' - - field: 'terraform_labels' - provider_only: true + - api_field: description + - api_field: disableHttp2 + - api_field: disableQuic + - api_field: edgeSecurityPolicy + - api_field: edgeSslCertificates + - field: effective_labels + provider_only: true + - api_field: ipv4Addresses + - api_field: ipv6Addresses + - api_field: labels + - api_field: logConfig.enable + - api_field: logConfig.sampleRate + - field: name + provider_only: true + - api_field: requireTls + - api_field: routing.hostRules.description + field: routing.host_rule.description + - api_field: routing.hostRules.hosts + field: routing.host_rule.hosts + - api_field: routing.hostRules.pathMatcher + field: routing.host_rule.path_matcher + - api_field: routing.pathMatchers.description + field: routing.path_matcher.description + - api_field: routing.pathMatchers.name + field: routing.path_matcher.name + - api_field: routing.pathMatchers.routeRules.description + field: routing.path_matcher.route_rule.description + - api_field: routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerName + field: routing.path_matcher.route_rule.header_action.request_header_to_add.header_name + - api_field: routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.headerValue + field: routing.path_matcher.route_rule.header_action.request_header_to_add.header_value + - api_field: routing.pathMatchers.routeRules.headerAction.requestHeadersToAdd.replace + field: routing.path_matcher.route_rule.header_action.request_header_to_add.replace + - api_field: routing.pathMatchers.routeRules.headerAction.requestHeadersToRemove.headerName + field: routing.path_matcher.route_rule.header_action.request_header_to_remove.header_name + - api_field: routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerName + field: routing.path_matcher.route_rule.header_action.response_header_to_add.header_name + - api_field: routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.headerValue + field: routing.path_matcher.route_rule.header_action.response_header_to_add.header_value + - api_field: routing.pathMatchers.routeRules.headerAction.responseHeadersToAdd.replace + field: routing.path_matcher.route_rule.header_action.response_header_to_add.replace + - api_field: routing.pathMatchers.routeRules.headerAction.responseHeadersToRemove.headerName + field: routing.path_matcher.route_rule.header_action.response_header_to_remove.header_name + - api_field: routing.pathMatchers.routeRules.matchRules.fullPathMatch + field: routing.path_matcher.route_rule.match_rule.full_path_match + - api_field: routing.pathMatchers.routeRules.matchRules.headerMatches.exactMatch + field: routing.path_matcher.route_rule.match_rule.header_match.exact_match + - api_field: routing.pathMatchers.routeRules.matchRules.headerMatches.headerName + field: routing.path_matcher.route_rule.match_rule.header_match.header_name + - api_field: routing.pathMatchers.routeRules.matchRules.headerMatches.invertMatch + field: routing.path_matcher.route_rule.match_rule.header_match.invert_match + - api_field: routing.pathMatchers.routeRules.matchRules.headerMatches.prefixMatch + field: routing.path_matcher.route_rule.match_rule.header_match.prefix_match + - api_field: routing.pathMatchers.routeRules.matchRules.headerMatches.presentMatch + field: routing.path_matcher.route_rule.match_rule.header_match.present_match + - api_field: routing.pathMatchers.routeRules.matchRules.headerMatches.suffixMatch + field: routing.path_matcher.route_rule.match_rule.header_match.suffix_match + - api_field: routing.pathMatchers.routeRules.matchRules.ignoreCase + field: routing.path_matcher.route_rule.match_rule.ignore_case + - api_field: routing.pathMatchers.routeRules.matchRules.pathTemplateMatch + field: routing.path_matcher.route_rule.match_rule.path_template_match + - api_field: routing.pathMatchers.routeRules.matchRules.prefixMatch + field: routing.path_matcher.route_rule.match_rule.prefix_match + - api_field: routing.pathMatchers.routeRules.matchRules.queryParameterMatches.exactMatch + field: routing.path_matcher.route_rule.match_rule.query_parameter_match.exact_match + - api_field: routing.pathMatchers.routeRules.matchRules.queryParameterMatches.name + field: routing.path_matcher.route_rule.match_rule.query_parameter_match.name + - api_field: routing.pathMatchers.routeRules.matchRules.queryParameterMatches.presentMatch + field: routing.path_matcher.route_rule.match_rule.query_parameter_match.present_match + - api_field: routing.pathMatchers.routeRules.origin + field: routing.path_matcher.route_rule.origin + - api_field: routing.pathMatchers.routeRules.priority + field: routing.path_matcher.route_rule.priority + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.actions + field: routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.actions + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.copiedParameters + field: routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.copied_parameters + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.keyset + field: routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.keyset + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.tokenQueryParameter + field: routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.token_query_parameter + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.addSignatures.tokenTtl + field: routing.path_matcher.route_rule.route_action.cdn_policy.add_signatures.token_ttl + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.excludeHost + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.exclude_host + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.excludeQueryString + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.exclude_query_string + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.excludedQueryParameters + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.excluded_query_parameters + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includeProtocol + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.include_protocol + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includedCookieNames + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.included_cookie_names + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includedHeaderNames + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.included_header_names + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheKeyPolicy.includedQueryParameters + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_key_policy.included_query_parameters + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.cacheMode + field: routing.path_matcher.route_rule.route_action.cdn_policy.cache_mode + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.clientTtl + field: routing.path_matcher.route_rule.route_action.cdn_policy.client_ttl + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.defaultTtl + field: routing.path_matcher.route_rule.route_action.cdn_policy.default_ttl + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.maxTtl + field: routing.path_matcher.route_rule.route_action.cdn_policy.max_ttl + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.negativeCaching + field: routing.path_matcher.route_rule.route_action.cdn_policy.negative_caching + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.negativeCachingPolicy + field: routing.path_matcher.route_rule.route_action.cdn_policy.negative_caching_policy + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedRequestKeyset + field: routing.path_matcher.route_rule.route_action.cdn_policy.signed_request_keyset + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedRequestMaximumExpirationTtl + field: routing.path_matcher.route_rule.route_action.cdn_policy.signed_request_maximum_expiration_ttl + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedRequestMode + field: routing.path_matcher.route_rule.route_action.cdn_policy.signed_request_mode + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedTokenOptions.allowedSignatureAlgorithms + field: routing.path_matcher.route_rule.route_action.cdn_policy.signed_token_options.allowed_signature_algorithms + - api_field: routing.pathMatchers.routeRules.routeAction.cdnPolicy.signedTokenOptions.tokenQueryParameter + field: routing.path_matcher.route_rule.route_action.cdn_policy.signed_token_options.token_query_parameter + - api_field: routing.pathMatchers.routeRules.routeAction.compressionMode + field: routing.path_matcher.route_rule.route_action.compression_mode + - api_field: routing.pathMatchers.routeRules.routeAction.corsPolicy.allowCredentials + field: routing.path_matcher.route_rule.route_action.cors_policy.allow_credentials + - api_field: routing.pathMatchers.routeRules.routeAction.corsPolicy.allowHeaders + field: routing.path_matcher.route_rule.route_action.cors_policy.allow_headers + - api_field: routing.pathMatchers.routeRules.routeAction.corsPolicy.allowMethods + field: routing.path_matcher.route_rule.route_action.cors_policy.allow_methods + - api_field: routing.pathMatchers.routeRules.routeAction.corsPolicy.allowOrigins + field: routing.path_matcher.route_rule.route_action.cors_policy.allow_origins + - api_field: routing.pathMatchers.routeRules.routeAction.corsPolicy.disabled + field: routing.path_matcher.route_rule.route_action.cors_policy.disabled + - api_field: routing.pathMatchers.routeRules.routeAction.corsPolicy.exposeHeaders + field: routing.path_matcher.route_rule.route_action.cors_policy.expose_headers + - api_field: routing.pathMatchers.routeRules.routeAction.corsPolicy.maxAge + field: routing.path_matcher.route_rule.route_action.cors_policy.max_age + - api_field: routing.pathMatchers.routeRules.routeAction.urlRewrite.hostRewrite + field: routing.path_matcher.route_rule.route_action.url_rewrite.host_rewrite + - api_field: routing.pathMatchers.routeRules.routeAction.urlRewrite.pathPrefixRewrite + field: routing.path_matcher.route_rule.route_action.url_rewrite.path_prefix_rewrite + - api_field: routing.pathMatchers.routeRules.routeAction.urlRewrite.pathTemplateRewrite + field: routing.path_matcher.route_rule.route_action.url_rewrite.path_template_rewrite + - api_field: routing.pathMatchers.routeRules.routeMethods.allowedMethods + field: routing.path_matcher.route_rule.route_methods.allowed_methods + - api_field: routing.pathMatchers.routeRules.urlRedirect.hostRedirect + field: routing.path_matcher.route_rule.url_redirect.host_redirect + - api_field: routing.pathMatchers.routeRules.urlRedirect.httpsRedirect + field: routing.path_matcher.route_rule.url_redirect.https_redirect + - api_field: routing.pathMatchers.routeRules.urlRedirect.pathRedirect + field: routing.path_matcher.route_rule.url_redirect.path_redirect + - api_field: routing.pathMatchers.routeRules.urlRedirect.prefixRedirect + field: routing.path_matcher.route_rule.url_redirect.prefix_redirect + - api_field: routing.pathMatchers.routeRules.urlRedirect.redirectResponseCode + field: routing.path_matcher.route_rule.url_redirect.redirect_response_code + - api_field: routing.pathMatchers.routeRules.urlRedirect.stripQuery + field: routing.path_matcher.route_rule.url_redirect.strip_query + - api_field: sslPolicy + - field: terraform_labels + provider_only: true diff --git a/google/services/networkservices/resource_network_services_endpoint_policy_generated_meta.yaml b/google/services/networkservices/resource_network_services_endpoint_policy_generated_meta.yaml index a2a41a2b988..24148c7ab01 100644 --- a/google/services/networkservices/resource_network_services_endpoint_policy_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_endpoint_policy_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_network_services_endpoint_policy' -generation_type: 'mmv1' -source_file: 'products/networkservices/EndpointPolicy.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EndpointPolicy' +resource: google_network_services_endpoint_policy +generation_type: mmv1 +source_file: products/networkservices/EndpointPolicy.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: EndpointPolicy fields: - - api_field: 'authorizationPolicy' - - api_field: 'clientTlsPolicy' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'endpointMatcher.metadataLabelMatcher.metadataLabelMatchCriteria' - - api_field: 'endpointMatcher.metadataLabelMatcher.metadataLabels.labelName' - - api_field: 'endpointMatcher.metadataLabelMatcher.metadataLabels.labelValue' - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'serverTlsPolicy' - - field: 'terraform_labels' - provider_only: true - - api_field: 'trafficPortSelector.ports' - - api_field: 'type' - - api_field: 'updateTime' + - api_field: authorizationPolicy + - api_field: clientTlsPolicy + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: endpointMatcher.metadataLabelMatcher.metadataLabelMatchCriteria + - api_field: endpointMatcher.metadataLabelMatcher.metadataLabels.labelName + - api_field: endpointMatcher.metadataLabelMatcher.metadataLabels.labelValue + - api_field: labels + - field: name + provider_only: true + - api_field: serverTlsPolicy + - field: terraform_labels + provider_only: true + - api_field: trafficPortSelector.ports + - api_field: type + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_gateway_generated_meta.yaml b/google/services/networkservices/resource_network_services_gateway_generated_meta.yaml index a995175c04e..feab9c95400 100644 --- a/google/services/networkservices/resource_network_services_gateway_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_gateway_generated_meta.yaml @@ -1,34 +1,34 @@ -resource: 'google_network_services_gateway' -generation_type: 'mmv1' -source_file: 'products/networkservices/Gateway.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Gateway' +resource: google_network_services_gateway +generation_type: mmv1 +source_file: products/networkservices/Gateway.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: Gateway fields: - - api_field: 'addresses' - - api_field: 'certificateUrls' - - api_field: 'createTime' - - field: 'delete_swg_autogen_router_on_destroy' - provider_only: true - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'envoyHeaders' - - api_field: 'gatewaySecurityPolicy' - - api_field: 'ipVersion' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'ports' - - api_field: 'routingMode' - - api_field: 'scope' - - api_field: 'selfLink' - - api_field: 'serverTlsPolicy' - - api_field: 'subnetwork' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - api_field: addresses + - api_field: certificateUrls + - api_field: createTime + - field: delete_swg_autogen_router_on_destroy + provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: envoyHeaders + - api_field: gatewaySecurityPolicy + - api_field: ipVersion + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: network + - api_field: ports + - api_field: routingMode + - api_field: scope + - api_field: selfLink + - api_field: serverTlsPolicy + - api_field: subnetwork + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_grpc_route_generated_meta.yaml b/google/services/networkservices/resource_network_services_grpc_route_generated_meta.yaml index 406d80a1fe3..fa70039018c 100644 --- a/google/services/networkservices/resource_network_services_grpc_route_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_grpc_route_generated_meta.yaml @@ -1,38 +1,38 @@ -resource: 'google_network_services_grpc_route' -generation_type: 'mmv1' -source_file: 'products/networkservices/GrpcRoute.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'GrpcRoute' +resource: google_network_services_grpc_route +generation_type: mmv1 +source_file: products/networkservices/GrpcRoute.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: GrpcRoute fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'gateways' - - api_field: 'hostnames' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'meshes' - - field: 'name' - provider_only: true - - api_field: 'rules.action.destinations.serviceName' - - api_field: 'rules.action.destinations.weight' - - api_field: 'rules.action.faultInjectionPolicy.abort.httpStatus' - - api_field: 'rules.action.faultInjectionPolicy.abort.percentage' - - api_field: 'rules.action.faultInjectionPolicy.delay.fixedDelay' - - api_field: 'rules.action.faultInjectionPolicy.delay.percentage' - - api_field: 'rules.action.retryPolicy.numRetries' - - api_field: 'rules.action.retryPolicy.retryConditions' - - api_field: 'rules.action.timeout' - - api_field: 'rules.matches.headers.key' - - api_field: 'rules.matches.headers.type' - - api_field: 'rules.matches.headers.value' - - api_field: 'rules.matches.method.caseSensitive' - - api_field: 'rules.matches.method.grpcMethod' - - api_field: 'rules.matches.method.grpcService' - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: gateways + - api_field: hostnames + - api_field: labels + - field: location + provider_only: true + - api_field: meshes + - field: name + provider_only: true + - api_field: rules.action.destinations.serviceName + - api_field: rules.action.destinations.weight + - api_field: rules.action.faultInjectionPolicy.abort.httpStatus + - api_field: rules.action.faultInjectionPolicy.abort.percentage + - api_field: rules.action.faultInjectionPolicy.delay.fixedDelay + - api_field: rules.action.faultInjectionPolicy.delay.percentage + - api_field: rules.action.retryPolicy.numRetries + - api_field: rules.action.retryPolicy.retryConditions + - api_field: rules.action.timeout + - api_field: rules.matches.headers.key + - api_field: rules.matches.headers.type + - api_field: rules.matches.headers.value + - api_field: rules.matches.method.caseSensitive + - api_field: rules.matches.method.grpcMethod + - api_field: rules.matches.method.grpcService + - api_field: selfLink + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_http_route_generated_meta.yaml b/google/services/networkservices/resource_network_services_http_route_generated_meta.yaml index 4aa2cc2179c..f36e5550a41 100644 --- a/google/services/networkservices/resource_network_services_http_route_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_http_route_generated_meta.yaml @@ -1,73 +1,73 @@ -resource: 'google_network_services_http_route' -generation_type: 'mmv1' -source_file: 'products/networkservices/HttpRoute.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HttpRoute' +resource: google_network_services_http_route +generation_type: mmv1 +source_file: products/networkservices/HttpRoute.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: HttpRoute fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'gateways' - - api_field: 'hostnames' - - api_field: 'labels' - - api_field: 'meshes' - - field: 'name' - provider_only: true - - api_field: 'rules.action.corsPolicy.allowCredentials' - - api_field: 'rules.action.corsPolicy.allowHeaders' - - api_field: 'rules.action.corsPolicy.allowMethods' - - api_field: 'rules.action.corsPolicy.allowOriginRegexes' - - api_field: 'rules.action.corsPolicy.allowOrigins' - - api_field: 'rules.action.corsPolicy.disabled' - - api_field: 'rules.action.corsPolicy.exposeHeaders' - - api_field: 'rules.action.corsPolicy.maxAge' - - api_field: 'rules.action.destinations.serviceName' - - api_field: 'rules.action.destinations.weight' - - api_field: 'rules.action.faultInjectionPolicy.abort.httpStatus' - - api_field: 'rules.action.faultInjectionPolicy.abort.percentage' - - api_field: 'rules.action.faultInjectionPolicy.delay.fixedDelay' - - api_field: 'rules.action.faultInjectionPolicy.delay.percentage' - - api_field: 'rules.action.redirect.hostRedirect' - - api_field: 'rules.action.redirect.httpsRedirect' - - api_field: 'rules.action.redirect.pathRedirect' - - api_field: 'rules.action.redirect.portRedirect' - - api_field: 'rules.action.redirect.prefixRewrite' - - api_field: 'rules.action.redirect.responseCode' - - api_field: 'rules.action.redirect.stripQuery' - - api_field: 'rules.action.requestHeaderModifier.add' - - api_field: 'rules.action.requestHeaderModifier.remove' - - api_field: 'rules.action.requestHeaderModifier.set' - - api_field: 'rules.action.requestMirrorPolicy.destination.serviceName' - - api_field: 'rules.action.requestMirrorPolicy.destination.weight' - - api_field: 'rules.action.responseHeaderModifier.add' - - api_field: 'rules.action.responseHeaderModifier.remove' - - api_field: 'rules.action.responseHeaderModifier.set' - - api_field: 'rules.action.retryPolicy.numRetries' - - api_field: 'rules.action.retryPolicy.perTryTimeout' - - api_field: 'rules.action.retryPolicy.retryConditions' - - api_field: 'rules.action.timeout' - - api_field: 'rules.action.urlRewrite.hostRewrite' - - api_field: 'rules.action.urlRewrite.pathPrefixRewrite' - - api_field: 'rules.matches.fullPathMatch' - - api_field: 'rules.matches.headers.exactMatch' - - api_field: 'rules.matches.headers.header' - - api_field: 'rules.matches.headers.invertMatch' - - api_field: 'rules.matches.headers.prefixMatch' - - api_field: 'rules.matches.headers.presentMatch' - - api_field: 'rules.matches.headers.rangeMatch.end' - - api_field: 'rules.matches.headers.rangeMatch.start' - - api_field: 'rules.matches.headers.regexMatch' - - api_field: 'rules.matches.headers.suffixMatch' - - api_field: 'rules.matches.ignoreCase' - - api_field: 'rules.matches.prefixMatch' - - api_field: 'rules.matches.queryParameters.exactMatch' - - api_field: 'rules.matches.queryParameters.presentMatch' - - api_field: 'rules.matches.queryParameters.queryParameter' - - api_field: 'rules.matches.queryParameters.regexMatch' - - api_field: 'rules.matches.regexMatch' - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: gateways + - api_field: hostnames + - api_field: labels + - api_field: meshes + - field: name + provider_only: true + - api_field: rules.action.corsPolicy.allowCredentials + - api_field: rules.action.corsPolicy.allowHeaders + - api_field: rules.action.corsPolicy.allowMethods + - api_field: rules.action.corsPolicy.allowOriginRegexes + - api_field: rules.action.corsPolicy.allowOrigins + - api_field: rules.action.corsPolicy.disabled + - api_field: rules.action.corsPolicy.exposeHeaders + - api_field: rules.action.corsPolicy.maxAge + - api_field: rules.action.destinations.serviceName + - api_field: rules.action.destinations.weight + - api_field: rules.action.faultInjectionPolicy.abort.httpStatus + - api_field: rules.action.faultInjectionPolicy.abort.percentage + - api_field: rules.action.faultInjectionPolicy.delay.fixedDelay + - api_field: rules.action.faultInjectionPolicy.delay.percentage + - api_field: rules.action.redirect.hostRedirect + - api_field: rules.action.redirect.httpsRedirect + - api_field: rules.action.redirect.pathRedirect + - api_field: rules.action.redirect.portRedirect + - api_field: rules.action.redirect.prefixRewrite + - api_field: rules.action.redirect.responseCode + - api_field: rules.action.redirect.stripQuery + - api_field: rules.action.requestHeaderModifier.add + - api_field: rules.action.requestHeaderModifier.remove + - api_field: rules.action.requestHeaderModifier.set + - api_field: rules.action.requestMirrorPolicy.destination.serviceName + - api_field: rules.action.requestMirrorPolicy.destination.weight + - api_field: rules.action.responseHeaderModifier.add + - api_field: rules.action.responseHeaderModifier.remove + - api_field: rules.action.responseHeaderModifier.set + - api_field: rules.action.retryPolicy.numRetries + - api_field: rules.action.retryPolicy.perTryTimeout + - api_field: rules.action.retryPolicy.retryConditions + - api_field: rules.action.timeout + - api_field: rules.action.urlRewrite.hostRewrite + - api_field: rules.action.urlRewrite.pathPrefixRewrite + - api_field: rules.matches.fullPathMatch + - api_field: rules.matches.headers.exactMatch + - api_field: rules.matches.headers.header + - api_field: rules.matches.headers.invertMatch + - api_field: rules.matches.headers.prefixMatch + - api_field: rules.matches.headers.presentMatch + - api_field: rules.matches.headers.rangeMatch.end + - api_field: rules.matches.headers.rangeMatch.start + - api_field: rules.matches.headers.regexMatch + - api_field: rules.matches.headers.suffixMatch + - api_field: rules.matches.ignoreCase + - api_field: rules.matches.prefixMatch + - api_field: rules.matches.queryParameters.exactMatch + - api_field: rules.matches.queryParameters.presentMatch + - api_field: rules.matches.queryParameters.queryParameter + - api_field: rules.matches.queryParameters.regexMatch + - api_field: rules.matches.regexMatch + - api_field: selfLink + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_lb_edge_extension_generated_meta.yaml b/google/services/networkservices/resource_network_services_lb_edge_extension_generated_meta.yaml index 98a449e6339..aff986d2248 100644 --- a/google/services/networkservices/resource_network_services_lb_edge_extension_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_lb_edge_extension_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_services_lb_edge_extension' -generation_type: 'mmv1' -source_file: 'products/networkservices/LbEdgeExtension.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'LbEdgeExtension' +resource: google_network_services_lb_edge_extension +generation_type: mmv1 +source_file: products/networkservices/LbEdgeExtension.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: LbEdgeExtension fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'extensionChains.extensions.failOpen' - - api_field: 'extensionChains.extensions.forwardHeaders' - - api_field: 'extensionChains.extensions.name' - - api_field: 'extensionChains.extensions.service' - - api_field: 'extensionChains.extensions.supportedEvents' - - api_field: 'extensionChains.matchCondition.celExpression' - - api_field: 'extensionChains.name' - - api_field: 'forwardingRules' - - api_field: 'labels' - - api_field: 'loadBalancingScheme' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: extensionChains.extensions.failOpen + - api_field: extensionChains.extensions.forwardHeaders + - api_field: extensionChains.extensions.name + - api_field: extensionChains.extensions.service + - api_field: extensionChains.extensions.supportedEvents + - api_field: extensionChains.matchCondition.celExpression + - api_field: extensionChains.name + - api_field: forwardingRules + - api_field: labels + - api_field: loadBalancingScheme + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true diff --git a/google/services/networkservices/resource_network_services_lb_route_extension.go b/google/services/networkservices/resource_network_services_lb_route_extension.go index 9e0e58db62d..8949949348d 100644 --- a/google/services/networkservices/resource_network_services_lb_route_extension.go +++ b/google/services/networkservices/resource_network_services_lb_route_extension.go @@ -54,6 +54,23 @@ import ( "google.golang.org/api/googleapi" ) +func ValidateSupportedEvent(i interface{}, k string) (warnings []string, errors []error) { + str, ok := i.(string) + if !ok { + errors = append(errors, fmt.Errorf("expected type of %s to be string", k)) + return + } + validEvents := map[string]bool{ + "REQUEST_HEADERS": true, + "REQUEST_BODY": true, + "REQUEST_TRAILERS": true, + } + if !validEvents[str] { + errors = append(errors, fmt.Errorf("value %s in %s is invalid, must be one of: REQUEST_HEADERS, REQUEST_BODY, REQUEST_TRAILERS", str, k)) + } + return +} + var ( _ = bytes.Clone _ = context.WithCancel @@ -134,7 +151,8 @@ func ResourceNetworkServicesLbRouteExtension() *schema.Resource { Description: `A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. -Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.`, +Any subsequent extension chains do not execute. Limited to 5 extension chains per resource. +Further information can be found at https://cloud.google.com/service-extensions/docs/reference/rest/v1/ExtensionChain`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "extensions": { @@ -142,7 +160,8 @@ Any subsequent extension chains do not execute. Limited to 5 extension chains pe Required: true, Description: `A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for -LbTrafficExtension resource. LbRouteExtension chains are limited to 1 extension per extension chain.`, +LbTrafficExtension resource. LbRouteExtension chains are limited to 1 extension per extension chain. +Further documentation can be found at https://cloud.google.com/service-extensions/docs/reference/rest/v1/ExtensionChain#Extension`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { @@ -186,6 +205,48 @@ If omitted, all headers are sent. Each element is a string indicating the header Type: schema.TypeString, }, }, + "metadata": { + Type: schema.TypeMap, + Optional: true, + Description: `The metadata provided here is included as part of the 'metadata_context' (of type 'google.protobuf.Struct') +in the 'ProcessingRequest' message sent to the extension server. +The metadata is available under the namespace 'com.google.lb_route_extension...'. +The following variables are supported in the metadata: '{forwarding_rule_id}' - substituted with the forwarding rule's fully qualified resource name. +This field must not be set for plugin extensions. Setting it results in a validation error.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "observability_mode": { + Type: schema.TypeBool, + Optional: true, + Description: `When set to 'TRUE', enables 'observability_mode' on the 'ext_proc' filter. +This makes 'ext_proc' calls asynchronous. Envoy doesn't check for the response from 'ext_proc' calls. +For more information about the filter, see: https://www.envoyproxy.io/docs/envoy/v1.32.3/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto +This field is helpful when you want to try out the extension in async log-only mode. +Supported by regional 'LbTrafficExtension' and 'LbRouteExtension' resources. +Only 'STREAMED' (default) body processing mode is supported.`, + }, + "request_body_send_mode": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: verify.ValidateEnum([]string{"BODY_SEND_MODE_UNSPECIFIED", "BODY_SEND_MODE_STREAMED", "BODY_SEND_MODE_FULL_DUPLEX_STREAMED", ""}), + Description: `Configures the send mode for request body processing. +The field can only be set if 'supported_events' includes 'REQUEST_BODY'. +If 'supported_events' includes 'REQUEST_BODY', but 'request_body_send_mode' is unset, the default value 'STREAMED' is used. +When this field is set to 'FULL_DUPLEX_STREAMED', 'supported_events' must include both 'REQUEST_BODY' and 'REQUEST_TRAILERS'. +This field can be set only when the 'service' field of the extension points to a 'BackendService'. +Only 'FULL_DUPLEX_STREAMED' mode is supported for 'LbRouteExtension' resources. Possible values: ["BODY_SEND_MODE_UNSPECIFIED", "BODY_SEND_MODE_STREAMED", "BODY_SEND_MODE_FULL_DUPLEX_STREAMED"]`, + }, + "supported_events": { + Type: schema.TypeSet, + Optional: true, + Description: `A set of events during request or response processing for which this extension is called. +This field is optional for the LbRouteExtension resource. If unspecified, 'REQUEST_HEADERS' event is assumed as supported. +Possible values: 'REQUEST_HEADERS', 'REQUEST_BODY', 'REQUEST_TRAILERS'.`, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Set: schema.HashString, + }, "timeout": { Type: schema.TypeString, Optional: true, @@ -780,12 +841,16 @@ func flattenNetworkServicesLbRouteExtensionExtensionChainsExtensions(v interface continue } transformed = append(transformed, map[string]interface{}{ - "name": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsName(original["name"], d, config), - "authority": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsAuthority(original["authority"], d, config), - "service": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsService(original["service"], d, config), - "timeout": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsTimeout(original["timeout"], d, config), - "fail_open": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsFailOpen(original["failOpen"], d, config), - "forward_headers": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsForwardHeaders(original["forwardHeaders"], d, config), + "name": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsName(original["name"], d, config), + "authority": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsAuthority(original["authority"], d, config), + "service": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsService(original["service"], d, config), + "timeout": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsTimeout(original["timeout"], d, config), + "fail_open": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsFailOpen(original["failOpen"], d, config), + "forward_headers": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsForwardHeaders(original["forwardHeaders"], d, config), + "supported_events": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsSupportedEvents(original["supportedEvents"], d, config), + "metadata": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsMetadata(original["metadata"], d, config), + "request_body_send_mode": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsRequestBodySendMode(original["requestBodySendMode"], d, config), + "observability_mode": flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsObservabilityMode(original["observabilityMode"], d, config), }) } return transformed @@ -814,6 +879,25 @@ func flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsForwardHeade return v } +func flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsSupportedEvents(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + return schema.NewSet(schema.HashString, v.([]interface{})) +} + +func flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsMetadata(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsRequestBodySendMode(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesLbRouteExtensionExtensionChainsExtensionsObservabilityMode(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenNetworkServicesLbRouteExtensionLoadBalancingScheme(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { return v } @@ -969,6 +1053,34 @@ func expandNetworkServicesLbRouteExtensionExtensionChainsExtensions(v interface{ transformed["forwardHeaders"] = transformedForwardHeaders } + transformedSupportedEvents, err := expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsSupportedEvents(original["supported_events"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedSupportedEvents); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["supportedEvents"] = transformedSupportedEvents + } + + transformedMetadata, err := expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsMetadata(original["metadata"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedMetadata); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["metadata"] = transformedMetadata + } + + transformedRequestBodySendMode, err := expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsRequestBodySendMode(original["request_body_send_mode"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedRequestBodySendMode); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["requestBodySendMode"] = transformedRequestBodySendMode + } + + transformedObservabilityMode, err := expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsObservabilityMode(original["observability_mode"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedObservabilityMode); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["observabilityMode"] = transformedObservabilityMode + } + req = append(req, transformed) } return req, nil @@ -998,6 +1110,30 @@ func expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsForwardHeader return v, nil } +func expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsSupportedEvents(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + v = v.(*schema.Set).List() + return v, nil +} + +func expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsMetadata(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} + +func expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsRequestBodySendMode(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesLbRouteExtensionExtensionChainsExtensionsObservabilityMode(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandNetworkServicesLbRouteExtensionLoadBalancingScheme(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/google/services/networkservices/resource_network_services_lb_route_extension_generated_meta.yaml b/google/services/networkservices/resource_network_services_lb_route_extension_generated_meta.yaml index 97da3bfbd6a..e521ad34868 100644 --- a/google/services/networkservices/resource_network_services_lb_route_extension_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_lb_route_extension_generated_meta.yaml @@ -1,27 +1,31 @@ -resource: 'google_network_services_lb_route_extension' -generation_type: 'mmv1' -source_file: 'products/networkservices/LbRouteExtension.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'LbRouteExtension' +resource: google_network_services_lb_route_extension +generation_type: mmv1 +source_file: products/networkservices/LbRouteExtension.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: LbRouteExtension fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'extensionChains.extensions.authority' - - api_field: 'extensionChains.extensions.failOpen' - - api_field: 'extensionChains.extensions.forwardHeaders' - - api_field: 'extensionChains.extensions.name' - - api_field: 'extensionChains.extensions.service' - - api_field: 'extensionChains.extensions.timeout' - - api_field: 'extensionChains.matchCondition.celExpression' - - api_field: 'extensionChains.name' - - api_field: 'forwardingRules' - - api_field: 'labels' - - api_field: 'loadBalancingScheme' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: extensionChains.extensions.authority + - api_field: extensionChains.extensions.failOpen + - api_field: extensionChains.extensions.forwardHeaders + - api_field: extensionChains.extensions.metadata + - api_field: extensionChains.extensions.name + - api_field: extensionChains.extensions.observabilityMode + - api_field: extensionChains.extensions.requestBodySendMode + - api_field: extensionChains.extensions.service + - api_field: extensionChains.extensions.supportedEvents + - api_field: extensionChains.extensions.timeout + - api_field: extensionChains.matchCondition.celExpression + - api_field: extensionChains.name + - api_field: forwardingRules + - api_field: labels + - api_field: loadBalancingScheme + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true diff --git a/google/services/networkservices/resource_network_services_lb_route_extension_generated_test.go b/google/services/networkservices/resource_network_services_lb_route_extension_generated_test.go index efb1545d191..b65e189ecc6 100644 --- a/google/services/networkservices/resource_network_services_lb_route_extension_generated_test.go +++ b/google/services/networkservices/resource_network_services_lb_route_extension_generated_test.go @@ -295,6 +295,397 @@ resource "google_network_services_lb_route_extension" "default" { fail_open = false forward_headers = ["custom-header"] + + supported_events = ["REQUEST_HEADERS", "REQUEST_BODY", "REQUEST_TRAILERS"] + request_body_send_mode = "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" + metadata = { + "key" = "value" + } + } + } + + labels = { + foo = "bar" + } +} + +# test instance +resource "google_compute_instance" "vm_test" { + name = "tf-test-l7-ilb-test-vm%{random_suffix}" + zone = "us-west1-b" + machine_type = "e2-small" + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + } + + boot_disk { + initialize_params { + image = "debian-cloud/debian-11" + } + } +} + +# Route Extension Backend Instance +resource "google_compute_instance" "callouts_instance" { + name = "tf-test-l7-ilb-callouts-ins%{random_suffix}" + zone = "us-west1-a" + machine_type = "e2-small" + + labels = { + "container-vm" = "cos-stable-109-17800-147-54" + } + + tags = ["allow-ssh","load-balanced-backend"] + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + + access_config { + # add external ip to fetch packages + } + } + + boot_disk { + auto_delete = true + + initialize_params { + type = "pd-standard" + size = 10 + image = "https://www.googleapis.com/compute/v1/projects/cos-cloud/global/images/cos-stable-109-17800-147-54" + } + } + + # Initialize an Envoy's Ext Proc gRPC API based on a docker container + metadata = { + startup-script = <<-EOF1 + #! /bin/bash + apt-get update + apt-get install apache2 -y + a2ensite default-ssl + a2enmod ssl + echo "Page served from second backend service" | tee /var/www/html/index.html + systemctl restart apache2' + EOF1 + } + + lifecycle { + create_before_destroy = true + } + + deletion_protection = false + + depends_on = [ + google_compute_instance.vm_test + ] +} + +// callouts instance group +resource "google_compute_instance_group" "callouts_instance_group" { + name = "tf-test-l7-ilb-callouts-ins-group%{random_suffix}" + description = "Terraform test instance group" + zone = "us-west1-a" + + instances = [ + google_compute_instance.callouts_instance.id, + ] + + named_port { + name = "http" + port = "80" + } + + named_port { + name = "grpc" + port = "443" + } +} + +# callout health check +resource "google_compute_region_health_check" "callouts_health_check" { + name = "tf-test-l7-ilb-callouts-hc%{random_suffix}" + region = "us-west1" + + http_health_check { + port = 80 + } + + depends_on = [ + google_compute_region_health_check.default + ] +} + +# callout backend service +resource "google_compute_region_backend_service" "callouts_backend" { + name = "tf-test-l7-ilb-callouts-backend%{random_suffix}" + region = "us-west1" + protocol = "HTTP2" + load_balancing_scheme = "INTERNAL_MANAGED" + timeout_sec = 10 + port_name = "grpc" + health_checks = [google_compute_region_health_check.callouts_health_check.id] + + backend { + group = google_compute_instance_group.callouts_instance_group.id + balancing_mode = "UTILIZATION" + capacity_scaler = 1.0 + } + + depends_on = [ + google_compute_region_backend_service.default + ] +} +`, context) +} + +func TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionObservabilityExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkServicesLbRouteExtensionDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionObservabilityExample(context), + }, + { + ResourceName: "google_network_services_lb_route_extension.default", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "name", "port_range", "target", "terraform_labels"}, + }, + { + ResourceName: "google_network_services_lb_route_extension.default", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionObservabilityExample(context map[string]interface{}) string { + return acctest.Nprintf(` +# Internal HTTP load balancer with a managed instance group backend +# VPC network +resource "google_compute_network" "ilb_network" { + name = "tf-test-l7-ilb-network%{random_suffix}" + auto_create_subnetworks = false +} + +# proxy-only subnet +resource "google_compute_subnetwork" "proxy_subnet" { + name = "tf-test-l7-ilb-proxy-subnet%{random_suffix}" + ip_cidr_range = "10.0.0.0/24" + region = "us-west1" + purpose = "REGIONAL_MANAGED_PROXY" + role = "ACTIVE" + network = google_compute_network.ilb_network.id +} + +# backend subnet +resource "google_compute_subnetwork" "ilb_subnet" { + name = "tf-test-l7-ilb-subnet%{random_suffix}" + ip_cidr_range = "10.0.1.0/24" + region = "us-west1" + network = google_compute_network.ilb_network.id + + depends_on = [ + google_compute_subnetwork.proxy_subnet + ] +} + +# forwarding rule +resource "google_compute_forwarding_rule" "default" { + name = "tf-test-l7-ilb-forwarding-rule%{random_suffix}" + region = "us-west1" + ip_protocol = "TCP" + load_balancing_scheme = "INTERNAL_MANAGED" + port_range = "80" + target = google_compute_region_target_http_proxy.default.id + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + network_tier = "PREMIUM" + + depends_on = [ + google_compute_subnetwork.proxy_subnet + ] +} + +# HTTP target proxy +resource "google_compute_region_target_http_proxy" "default" { + name = "tf-test-l7-ilb-target-http-proxy%{random_suffix}" + region = "us-west1" + url_map = google_compute_region_url_map.default.id +} + +# URL map +resource "google_compute_region_url_map" "default" { + name = "tf-test-l7-ilb-regional-url-map%{random_suffix}" + region = "us-west1" + default_service = google_compute_region_backend_service.default.id + + host_rule { + hosts = ["service-extensions.com"] + path_matcher = "callouts" + } + + path_matcher { + name = "callouts" + default_service = google_compute_region_backend_service.callouts_backend.id + } +} + +# backend service +resource "google_compute_region_backend_service" "default" { + name = "tf-test-l7-ilb-backend-subnet%{random_suffix}" + region = "us-west1" + protocol = "HTTP" + load_balancing_scheme = "INTERNAL_MANAGED" + timeout_sec = 10 + health_checks = [google_compute_region_health_check.default.id] + + backend { + group = google_compute_region_instance_group_manager.mig.instance_group + balancing_mode = "UTILIZATION" + capacity_scaler = 1.0 + } +} + +# instance template +resource "google_compute_instance_template" "instance_template" { + name = "tf-test-l7-ilb-mig-template%{random_suffix}" + machine_type = "e2-small" + tags = ["http-server"] + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + + access_config { + # add external ip to fetch packages + } + } + + disk { + source_image = "debian-cloud/debian-12" + auto_delete = true + boot = true + } + + # install nginx and serve a simple web page + metadata = { + startup-script = <<-EOF1 + #! /bin/bash + set -euo pipefail + + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y nginx-light jq + + NAME=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/hostname") + IP=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip") + METADATA=$(curl -f -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=True" | jq 'del(.["startup-script"])') + + cat < /var/www/html/index.html +
+      Name: $NAME
+      IP: $IP
+      Metadata: $METADATA
+      
+ EOF + EOF1 + } + + lifecycle { + create_before_destroy = true + } +} + +# health check +resource "google_compute_region_health_check" "default" { + name = "tf-test-l7-ilb-hc%{random_suffix}" + region = "us-west1" + + http_health_check { + port_specification = "USE_SERVING_PORT" + } +} + +# MIG +resource "google_compute_region_instance_group_manager" "mig" { + name = "tf-test-l7-ilb-mig1%{random_suffix}" + region = "us-west1" + + base_instance_name = "vm" + target_size = 2 + + version { + instance_template = google_compute_instance_template.instance_template.id + name = "primary" + } +} + +# allow all access from IAP and health check ranges +resource "google_compute_firewall" "fw_iap" { + name = "tf-test-l7-ilb-fw-allow-iap-hc%{random_suffix}" + direction = "INGRESS" + network = google_compute_network.ilb_network.id + source_ranges = ["130.211.0.0/22", "35.191.0.0/16", "35.235.240.0/20"] + + allow { + protocol = "tcp" + } +} + +# allow http from proxy subnet to backends +resource "google_compute_firewall" "fw_ilb_to_backends" { + name = "tf-test-l7-ilb-fw-allow-ilb-to-backends%{random_suffix}" + direction = "INGRESS" + network = google_compute_network.ilb_network.id + source_ranges = ["10.0.0.0/24"] + target_tags = ["http-server"] + + allow { + protocol = "tcp" + ports = ["80", "443", "8080"] + } + + depends_on = [ + google_compute_firewall.fw_iap + ] +} + +resource "google_network_services_lb_route_extension" "default" { + name = "tf-test-l7-ilb-route-ext%{random_suffix}" + description = "my route extension" + location = "us-west1" + load_balancing_scheme = "INTERNAL_MANAGED" + forwarding_rules = [google_compute_forwarding_rule.default.self_link] + + extension_chains { + name = "chain1" + + match_condition { + cel_expression = "request.path.startsWith('/extensions')" + } + + extensions { + name = "ext11" + authority = "ext11.com" + service = google_compute_region_backend_service.callouts_backend.self_link + timeout = "0.1s" + fail_open = false + + supported_events = ["REQUEST_HEADERS"] + observability_mode = true } } diff --git a/google/services/networkservices/resource_network_services_lb_route_extension_test.go b/google/services/networkservices/resource_network_services_lb_route_extension_test.go index 2c5587321c6..f10dcefa5cc 100644 --- a/google/services/networkservices/resource_network_services_lb_route_extension_test.go +++ b/google/services/networkservices/resource_network_services_lb_route_extension_test.go @@ -18,6 +18,7 @@ package networkservices_test import ( "fmt" + "regexp" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -1142,3 +1143,354 @@ resource "google_network_services_wasm_plugin" "wasm_plugin" { } `, context)) } + +func TestAccNetworkServicesLbRouteExtension_validation(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkServicesLbRouteExtension_validation_invalid(context), + ExpectError: regexp.MustCompile("the valid values are: REQUEST_HEADERS, REQUEST_BODY, REQUEST_TRAILERS"), + }, + }, + }) +} + +func testAccNetworkServicesLbRouteExtension_validation_invalid(context map[string]interface{}) string { + return acctest.Nprintf(` +# Internal HTTP load balancer with a managed instance group backend +# VPC network +resource "google_compute_network" "ilb_network" { + name = "tf-test-l7-ilb-network%{random_suffix}" + auto_create_subnetworks = false +} + +# proxy-only subnet +resource "google_compute_subnetwork" "proxy_subnet" { + name = "tf-test-l7-ilb-proxy-subnet%{random_suffix}" + ip_cidr_range = "10.0.0.0/24" + region = "us-west1" + purpose = "REGIONAL_MANAGED_PROXY" + role = "ACTIVE" + network = google_compute_network.ilb_network.id +} + +# backend subnet +resource "google_compute_subnetwork" "ilb_subnet" { + name = "tf-test-l7-ilb-subnet%{random_suffix}" + ip_cidr_range = "10.0.1.0/24" + region = "us-west1" + network = google_compute_network.ilb_network.id + + depends_on = [ + google_compute_subnetwork.proxy_subnet + ] +} + +# forwarding rule +resource "google_compute_forwarding_rule" "default" { + name = "tf-test-l7-ilb-forwarding-rule%{random_suffix}" + region = "us-west1" + ip_protocol = "TCP" + load_balancing_scheme = "INTERNAL_MANAGED" + port_range = "80" + target = google_compute_region_target_http_proxy.default.id + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + network_tier = "PREMIUM" + + depends_on = [ + google_compute_subnetwork.proxy_subnet + ] +} + +# HTTP target proxy +resource "google_compute_region_target_http_proxy" "default" { + name = "tf-test-l7-ilb-target-http-proxy%{random_suffix}" + region = "us-west1" + url_map = google_compute_region_url_map.default.id +} + +# URL map +resource "google_compute_region_url_map" "default" { + name = "tf-test-l7-ilb-regional-url-map%{random_suffix}" + region = "us-west1" + default_service = google_compute_region_backend_service.default.id + + host_rule { + hosts = ["service-extensions.com"] + path_matcher = "callouts" + } + + path_matcher { + name = "callouts" + default_service = google_compute_region_backend_service.callouts_backend.id + } +} + +# backend service +resource "google_compute_region_backend_service" "default" { + name = "tf-test-l7-ilb-backend-subnet%{random_suffix}" + region = "us-west1" + protocol = "HTTP" + load_balancing_scheme = "INTERNAL_MANAGED" + timeout_sec = 10 + health_checks = [google_compute_region_health_check.default.id] + + backend { + group = google_compute_region_instance_group_manager.mig.instance_group + balancing_mode = "UTILIZATION" + capacity_scaler = 1.0 + } +} + +# instance template +resource "google_compute_instance_template" "instance_template" { + name = "tf-test-l7-ilb-mig-template%{random_suffix}" + machine_type = "e2-small" + tags = ["http-server"] + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + + access_config { + # add external ip to fetch packages + } + } + + disk { + source_image = "debian-cloud/debian-12" + auto_delete = true + boot = true + } + + # install nginx and serve a simple web page + metadata = { + startup-script = <<-EOF1 + #! /bin/bash + set -euo pipefail + + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y nginx-light jq + + NAME=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/hostname") + IP=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip") + METADATA=$(curl -f -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=True" | jq 'del(.["startup-script"])') + + cat < /var/www/html/index.html +
+      Name: $NAME
+      IP: $IP
+      Metadata: $METADATA
+      
+ EOF + EOF1 + } + + lifecycle { + create_before_destroy = true + } +} + +# health check +resource "google_compute_region_health_check" "default" { + name = "tf-test-l7-ilb-hc%{random_suffix}" + region = "us-west1" + + http_health_check { + port_specification = "USE_SERVING_PORT" + } +} + +# MIG +resource "google_compute_region_instance_group_manager" "mig" { + name = "tf-test-l7-ilb-mig1%{random_suffix}" + region = "us-west1" + + base_instance_name = "vm" + target_size = 2 + + version { + instance_template = google_compute_instance_template.instance_template.id + name = "primary" + } +} + +# allow all access from IAP and health check ranges +resource "google_compute_firewall" "fw_iap" { + name = "tf-test-l7-ilb-fw-allow-iap-hc%{random_suffix}" + direction = "INGRESS" + network = google_compute_network.ilb_network.id + source_ranges = ["130.211.0.0/22", "35.191.0.0/16", "35.235.240.0/20"] + + allow { + protocol = "tcp" + } +} + +# allow http from proxy subnet to backends +resource "google_compute_firewall" "fw_ilb_to_backends" { + name = "tf-test-l7-ilb-fw-allow-ilb-to-backends%{random_suffix}" + direction = "INGRESS" + network = google_compute_network.ilb_network.id + source_ranges = ["10.0.0.0/24"] + target_tags = ["http-server"] + + allow { + protocol = "tcp" + ports = ["80", "443", "8080"] + } + + depends_on = [ + google_compute_firewall.fw_iap + ] +} + +resource "google_network_services_lb_route_extension" "default" { + name = "tf-test-l7-ilb-route-ext%{random_suffix}" + description = "my route extension" + location = "us-west1" + load_balancing_scheme = "INTERNAL_MANAGED" + forwarding_rules = [google_compute_forwarding_rule.default.self_link] + + extension_chains { + name = "chain1" + + match_condition { + cel_expression = "request.path.startsWith('/extensions')" + } + + extensions { + name = "ext11" + authority = "ext11.com" + service = google_compute_region_backend_service.callouts_backend.self_link + timeout = "0.1s" + fail_open = false + + forward_headers = ["custom-header"] + supported_events = ["EVENT_TYPE_UNSPECIFIED"] + } + } + + labels = { + foo = "bar" + } +} + +# Route Extension Backend Instance +resource "google_compute_instance" "callouts_instance" { + name = "tf-test-l7-ilb-callouts-ins%{random_suffix}" + zone = "us-west1-a" + machine_type = "e2-small" + + labels = { + "container-vm" = "cos-stable-109-17800-147-54" + } + + tags = ["allow-ssh","load-balanced-backend"] + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + + access_config { + # add external ip to fetch packages + } + } + + boot_disk { + auto_delete = true + + initialize_params { + type = "pd-standard" + size = 10 + image = "https://www.googleapis.com/compute/v1/projects/cos-cloud/global/images/cos-stable-109-17800-147-54" + } + } + + # Initialize an Envoy's Ext Proc gRPC API based on a docker container + metadata = { + startup-script = <<-EOF1 + #! /bin/bash + apt-get update + apt-get install apache2 -y + a2ensite default-ssl + a2enmod ssl + echo "Page served from second backend service" | tee /var/www/html/index.html + systemctl restart apache2' + EOF1 + } + + lifecycle { + create_before_destroy = true + } + + deletion_protection = false +} + +// callouts instance group +resource "google_compute_instance_group" "callouts_instance_group" { + name = "tf-test-l7-ilb-callouts-ins-group%{random_suffix}" + description = "Terraform test instance group" + zone = "us-west1-a" + + instances = [ + google_compute_instance.callouts_instance.id, + ] + + named_port { + name = "http" + port = "80" + } + + named_port { + name = "grpc" + port = "443" + } +} + +# callout health check +resource "google_compute_region_health_check" "callouts_health_check" { + name = "tf-test-l7-ilb-callouts-hc%{random_suffix}" + region = "us-west1" + + http_health_check { + port = 80 + } + + depends_on = [ + google_compute_region_health_check.default + ] +} + +# callout backend service +resource "google_compute_region_backend_service" "callouts_backend" { + name = "tf-test-l7-ilb-callouts-backend%{random_suffix}" + region = "us-west1" + protocol = "HTTP2" + load_balancing_scheme = "INTERNAL_MANAGED" + timeout_sec = 10 + port_name = "grpc" + health_checks = [google_compute_region_health_check.callouts_health_check.id] + + backend { + group = google_compute_instance_group.callouts_instance_group.id + balancing_mode = "UTILIZATION" + capacity_scaler = 1.0 + } + + depends_on = [ + google_compute_region_backend_service.default + ] +} +`, context) +} diff --git a/google/services/networkservices/resource_network_services_lb_traffic_extension_generated_meta.yaml b/google/services/networkservices/resource_network_services_lb_traffic_extension_generated_meta.yaml index 87fb3b9f75b..aac98af0674 100644 --- a/google/services/networkservices/resource_network_services_lb_traffic_extension_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_lb_traffic_extension_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_network_services_lb_traffic_extension' -generation_type: 'mmv1' -source_file: 'products/networkservices/LbTrafficExtension.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'LbTrafficExtension' +resource: google_network_services_lb_traffic_extension +generation_type: mmv1 +source_file: products/networkservices/LbTrafficExtension.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: LbTrafficExtension fields: - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'extensionChains.extensions.authority' - - api_field: 'extensionChains.extensions.failOpen' - - api_field: 'extensionChains.extensions.forwardHeaders' - - api_field: 'extensionChains.extensions.metadata' - - api_field: 'extensionChains.extensions.name' - - api_field: 'extensionChains.extensions.service' - - api_field: 'extensionChains.extensions.supportedEvents' - - api_field: 'extensionChains.extensions.timeout' - - api_field: 'extensionChains.matchCondition.celExpression' - - api_field: 'extensionChains.name' - - api_field: 'forwardingRules' - - api_field: 'labels' - - api_field: 'loadBalancingScheme' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: extensionChains.extensions.authority + - api_field: extensionChains.extensions.failOpen + - api_field: extensionChains.extensions.forwardHeaders + - api_field: extensionChains.extensions.metadata + - api_field: extensionChains.extensions.name + - api_field: extensionChains.extensions.service + - api_field: extensionChains.extensions.supportedEvents + - api_field: extensionChains.extensions.timeout + - api_field: extensionChains.matchCondition.celExpression + - api_field: extensionChains.name + - api_field: forwardingRules + - api_field: labels + - api_field: loadBalancingScheme + - field: location + provider_only: true + - field: name + provider_only: true + - field: terraform_labels + provider_only: true diff --git a/google/services/networkservices/resource_network_services_mesh_generated_meta.yaml b/google/services/networkservices/resource_network_services_mesh_generated_meta.yaml index 6793dc4bf61..84dd4d40a2f 100644 --- a/google/services/networkservices/resource_network_services_mesh_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_mesh_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_network_services_mesh' -generation_type: 'mmv1' -source_file: 'products/networkservices/Mesh.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Mesh' +resource: google_network_services_mesh +generation_type: mmv1 +source_file: products/networkservices/Mesh.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: Mesh fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'interceptionPort' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: interceptionPort + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: selfLink + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_consumer_association.go b/google/services/networkservices/resource_network_services_multicast_consumer_association.go index 4e463bcc996..39898c0b700 100644 --- a/google/services/networkservices/resource_network_services_multicast_consumer_association.go +++ b/google/services/networkservices/resource_network_services_multicast_consumer_association.go @@ -148,7 +148,7 @@ exceed 48 characters.`, Required: true, ForceNew: true, Description: `The resource name of the multicast domain activation that is in the -same zone as this multicast producer association. +same zone as this multicast consumer association. Use the following format: // 'projects/*/locations/*/multicastDomainActivations/*'.`, }, diff --git a/google/services/networkservices/resource_network_services_multicast_consumer_association_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_consumer_association_generated_meta.yaml index d924a22c27c..6ab8b55b954 100644 --- a/google/services/networkservices/resource_network_services_multicast_consumer_association_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_multicast_consumer_association_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_services_multicast_consumer_association' -generation_type: 'mmv1' -source_file: 'products/networkservices/MulticastConsumerAssociation.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MulticastConsumerAssociation' +resource: google_network_services_multicast_consumer_association +generation_type: mmv1 +source_file: products/networkservices/MulticastConsumerAssociation.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastConsumerAssociation autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'multicast_consumer_association_id' - provider_only: true - - api_field: 'multicastDomainActivation' - - api_field: 'name' - - api_field: 'network' - - api_field: 'placementPolicy' - - api_field: 'state.state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: multicast_consumer_association_id + provider_only: true + - api_field: multicastDomainActivation + - api_field: name + - api_field: network + - api_field: placementPolicy + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_consumer_association_test.go b/google/services/networkservices/resource_network_services_multicast_consumer_association_test.go index 366e000ae5d..f5d860fe507 100644 --- a/google/services/networkservices/resource_network_services_multicast_consumer_association_test.go +++ b/google/services/networkservices/resource_network_services_multicast_consumer_association_test.go @@ -2,35 +2,18 @@ // SPDX-License-Identifier: MPL-2.0 // ---------------------------------------------------------------------------- // -// *** AUTO GENERATED CODE *** Type: Handwritten *** +// *** AUTO GENERATED CODE *** Type: Handwritten *** // // ---------------------------------------------------------------------------- // -// This code is generated by Magic Modules using the following: +// This code is generated by Magic Modules using the following: // -// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_consumer_association_test.go +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_consumer_association_test.go // -// DO NOT EDIT this file directly. Any changes made to this file will be -// overwritten during the next generation cycle. +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. // // ---------------------------------------------------------------------------- -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** Type: MMv1 *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - package networkservices_test import ( diff --git a/google/services/networkservices/resource_network_services_multicast_domain.go b/google/services/networkservices/resource_network_services_multicast_domain.go index e43a2011b34..77266cfcba3 100644 --- a/google/services/networkservices/resource_network_services_multicast_domain.go +++ b/google/services/networkservices/resource_network_services_multicast_domain.go @@ -183,7 +183,6 @@ exceed 48 characters.`, "description": { Type: schema.TypeString, Optional: true, - ForceNew: true, Description: `An optional text description of the multicast domain.`, }, "labels": { @@ -206,12 +205,11 @@ Use the following format: "create_time": { Type: schema.TypeString, Computed: true, - Description: `[Output only] The timestamp when the multicast domain was created.`, + Description: `The timestamp when the multicast domain was created.`, }, "effective_labels": { Type: schema.TypeMap, Computed: true, - ForceNew: true, Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, Elem: &schema.Schema{Type: schema.TypeString}, }, @@ -222,6 +220,28 @@ Use the following format: Use the following format: 'projects/*/locations/global/multicastDomains/*'`, }, + "state": { + Type: schema.TypeList, + Computed: true, + Description: `The multicast resource's state.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "state": { + Type: schema.TypeString, + Computed: true, + Description: `The state of the multicast resource. +Possible values: +CREATING +ACTIVE +DELETING +DELETE_FAILED +UPDATING +UPDATE_FAILED +INACTIVE`, + }, + }, + }, + }, "terraform_labels": { Type: schema.TypeMap, Computed: true, @@ -232,7 +252,7 @@ Use the following format: "unique_id": { Type: schema.TypeString, Computed: true, - Description: `[Output only] The Google-generated UUID for the resource. This value is + Description: `The Google-generated UUID for the resource. This value is unique across all multicast domain resources. If a domain is deleted and another with the same name is created, the new domain is assigned a different unique_id.`, @@ -240,7 +260,7 @@ different unique_id.`, "update_time": { Type: schema.TypeString, Computed: true, - Description: `[Output only] The timestamp when the multicast domain was most recently + Description: `The timestamp when the multicast domain was most recently updated.`, }, "project": { @@ -436,6 +456,9 @@ func resourceNetworkServicesMulticastDomainRead(d *schema.ResourceData, meta int if err := d.Set("unique_id", flattenNetworkServicesMulticastDomainUniqueId(res["uniqueId"], d, config)); err != nil { return fmt.Errorf("Error reading MulticastDomain: %s", err) } + if err := d.Set("state", flattenNetworkServicesMulticastDomainState(res["state"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastDomain: %s", err) + } if err := d.Set("update_time", flattenNetworkServicesMulticastDomainUpdateTime(res["updateTime"], d, config)); err != nil { return fmt.Errorf("Error reading MulticastDomain: %s", err) } @@ -474,7 +497,111 @@ func resourceNetworkServicesMulticastDomainRead(d *schema.ResourceData, meta int } func resourceNetworkServicesMulticastDomainUpdate(d *schema.ResourceData, meta interface{}) error { - // Only the root field "labels" and "terraform_labels" are mutable + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if multicastDomainIdValue, ok := d.GetOk("multicast_domain_id"); ok && multicastDomainIdValue.(string) != "" { + if err = identity.Set("multicast_domain_id", multicastDomainIdValue.(string)); err != nil { + return fmt.Errorf("Error setting multicast_domain_id: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastDomain: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + descriptionProp, err := expandNetworkServicesMulticastDomainDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + effectiveLabelsProp, err := expandNetworkServicesMulticastDomainEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastDomains/{{multicast_domain_id}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating MulticastDomain %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + if d.HasChange("description") { + updateMask = append(updateMask, "description") + } + + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating MulticastDomain %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating MulticastDomain %q: %#v", d.Id(), res) + } + + err = NetworkServicesOperationWaitTime( + config, res, project, "Updating MulticastDomain", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + } + return resourceNetworkServicesMulticastDomainRead(d, meta) } @@ -616,6 +743,23 @@ func flattenNetworkServicesMulticastDomainUniqueId(v interface{}, d *schema.Reso return v } +func flattenNetworkServicesMulticastDomainState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["state"] = + flattenNetworkServicesMulticastDomainStateState(original["state"], d, config) + return []interface{}{transformed} +} +func flattenNetworkServicesMulticastDomainStateState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenNetworkServicesMulticastDomainUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { return v } diff --git a/google/services/networkservices/resource_network_services_multicast_domain_activation_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_domain_activation_generated_meta.yaml index 507cb30d411..52e49d9b3ba 100644 --- a/google/services/networkservices/resource_network_services_multicast_domain_activation_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_multicast_domain_activation_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_network_services_multicast_domain_activation' -generation_type: 'mmv1' -source_file: 'products/networkservices/MulticastDomainActivation.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MulticastDomainActivation' +resource: google_network_services_multicast_domain_activation +generation_type: mmv1 +source_file: products/networkservices/MulticastDomainActivation.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastDomainActivation autogen_status: true fields: - - api_field: 'adminNetwork' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'multicastDomain' - - field: 'multicast_domain_activation_id' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'trafficSpec.aggrEgressPps' - - api_field: 'trafficSpec.aggrIngressPps' - - api_field: 'trafficSpec.avgPacketSize' - - api_field: 'trafficSpec.maxPerGroupIngressPps' - - api_field: 'trafficSpec.maxPerGroupSubscribers' - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: adminNetwork + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: multicastDomain + - field: multicast_domain_activation_id + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true + - api_field: trafficSpec.aggrEgressPps + - api_field: trafficSpec.aggrIngressPps + - api_field: trafficSpec.avgPacketSize + - api_field: trafficSpec.maxPerGroupIngressPps + - api_field: trafficSpec.maxPerGroupSubscribers + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_domain_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_domain_generated_meta.yaml index 32eca89b9ce..ab94b5e6424 100644 --- a/google/services/networkservices/resource_network_services_multicast_domain_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_multicast_domain_generated_meta.yaml @@ -1,28 +1,29 @@ -resource: 'google_network_services_multicast_domain' -generation_type: 'mmv1' -source_file: 'products/networkservices/MulticastDomain.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MulticastDomain' +resource: google_network_services_multicast_domain +generation_type: mmv1 +source_file: products/networkservices/MulticastDomain.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastDomain autogen_status: true fields: - - api_field: 'adminNetwork' - - api_field: 'connection.connectionType' - field: 'connection_config.connection_type' - - api_field: 'connection.nccHub' - field: 'connection_config.ncc_hub' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'multicastDomainGroup' - - field: 'multicast_domain_id' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: adminNetwork + - api_field: connection.connectionType + field: connection_config.connection_type + - api_field: connection.nccHub + field: connection_config.ncc_hub + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: multicastDomainGroup + - field: multicast_domain_id + provider_only: true + - api_field: name + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_domain_group.go b/google/services/networkservices/resource_network_services_multicast_domain_group.go index 5b88406df9a..6386ba0f32a 100644 --- a/google/services/networkservices/resource_network_services_multicast_domain_group.go +++ b/google/services/networkservices/resource_network_services_multicast_domain_group.go @@ -160,7 +160,7 @@ Please refer to the field 'effective_labels' for all of the labels present on th "create_time": { Type: schema.TypeString, Computed: true, - Description: `[Output only] The timestamp when the multicast domain group was created.`, + Description: `The timestamp when the multicast domain group was created.`, }, "effective_labels": { Type: schema.TypeMap, @@ -171,7 +171,7 @@ Please refer to the field 'effective_labels' for all of the labels present on th "multicast_domains": { Type: schema.TypeList, Computed: true, - Description: `[Output only] Multicast domains associated with the group. + Description: `Multicast domains associated with the group. There can be at most 2 multicast domains in a group.`, Elem: &schema.Schema{ Type: schema.TypeString, @@ -192,7 +192,7 @@ Use the following format: Schema: map[string]*schema.Schema{ "state": { Type: schema.TypeString, - Optional: true, + Computed: true, Description: `The state of the multicast resource. Possible values: CREATING @@ -216,7 +216,7 @@ INACTIVE`, "unique_id": { Type: schema.TypeString, Computed: true, - Description: `[Output only] The Google-generated UUID for the resource. This value is + Description: `The Google-generated UUID for the resource. This value is unique across all multicast domain group resources. If a domain is deleted and another with the same name is created, the new domain is assigned a different unique_id.`, @@ -224,7 +224,7 @@ different unique_id.`, "update_time": { Type: schema.TypeString, Computed: true, - Description: `[Output only] The timestamp when the multicast domain group was most + Description: `The timestamp when the multicast domain group was most recently updated.`, }, "project": { diff --git a/google/services/networkservices/resource_network_services_multicast_domain_group_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_domain_group_generated_meta.yaml index 6a64e5b1a58..09acdcbd8c5 100644 --- a/google/services/networkservices/resource_network_services_multicast_domain_group_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_multicast_domain_group_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_network_services_multicast_domain_group' -generation_type: 'mmv1' -source_file: 'products/networkservices/MulticastDomainGroup.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MulticastDomainGroup' +resource: google_network_services_multicast_domain_group +generation_type: mmv1 +source_file: products/networkservices/MulticastDomainGroup.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastDomainGroup autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'multicast_domain_group_id' - provider_only: true - - api_field: 'multicastDomains' - - api_field: 'name' - - api_field: 'state.state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: multicast_domain_group_id + provider_only: true + - api_field: multicastDomains + - api_field: name + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_domain_group_test.go b/google/services/networkservices/resource_network_services_multicast_domain_group_test.go index 1a02505a34a..824a55a7977 100644 --- a/google/services/networkservices/resource_network_services_multicast_domain_group_test.go +++ b/google/services/networkservices/resource_network_services_multicast_domain_group_test.go @@ -2,35 +2,18 @@ // SPDX-License-Identifier: MPL-2.0 // ---------------------------------------------------------------------------- // -// *** AUTO GENERATED CODE *** Type: Handwritten *** +// *** AUTO GENERATED CODE *** Type: Handwritten *** // // ---------------------------------------------------------------------------- // -// This code is generated by Magic Modules using the following: +// This code is generated by Magic Modules using the following: // -// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_domain_group_test.go +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_domain_group_test.go // -// DO NOT EDIT this file directly. Any changes made to this file will be -// overwritten during the next generation cycle. +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. // // ---------------------------------------------------------------------------- -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** Type: MMv1 *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - package networkservices_test import ( diff --git a/google/services/networkservices/resource_network_services_multicast_domain_test.go b/google/services/networkservices/resource_network_services_multicast_domain_test.go new file mode 100644 index 00000000000..31e59d19680 --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_domain_test.go @@ -0,0 +1,103 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_domain_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package networkservices_test + +import ( + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-provider-google/google/acctest" + "testing" +) + +func TestAccNetworkServicesMulticastDomain_networkServicesMulticastDomainUpdateExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkServicesMulticastDomainDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkServicesMulticastDomain_networkServicesMulticastDomainUpdateExample_full(context), + }, + { + ResourceName: "google_network_services_multicast_domain.md_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_domain_id", "terraform_labels"}, + }, + { + Config: testAccNetworkServicesMulticastDomain_networkServicesMulticastDomainUpdateExample_diff(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_services_multicast_domain.md_test", plancheck.ResourceActionUpdate), + }, + }, + }, + { + ResourceName: "google_network_services_multicast_domain.md_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_domain_id", "terraform_labels"}, + }, + }, + }) +} + +func testAccNetworkServicesMulticastDomain_networkServicesMulticastDomainUpdateExample_full(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-md-network%{random_suffix}" + auto_create_subnetworks = false +} +resource "google_network_services_multicast_domain" md_test { + multicast_domain_id = "tf-test-test-md-domain%{random_suffix}" + location = "global" + admin_network = google_compute_network.network.id + connection_config { + connection_type="SAME_VPC" + } + depends_on = [google_compute_network.network] +} +`, context) +} + +func testAccNetworkServicesMulticastDomain_networkServicesMulticastDomainUpdateExample_diff(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-md-network%{random_suffix}" + auto_create_subnetworks = false +} +resource "google_network_services_multicast_domain" md_test { + multicast_domain_id = "tf-test-test-md-domain%{random_suffix}" + location = "global" + description = "A sample domain" + labels = { + label-one = "value-one" + } + admin_network = google_compute_network.network.id + connection_config { + connection_type="SAME_VPC" + } + depends_on = [google_compute_network.network] +} +`, context) +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_consumer_activation.go b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation.go new file mode 100644 index 00000000000..ce805599a5d --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation.go @@ -0,0 +1,826 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkservices/MulticastGroupConsumerActivation.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networkservices + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceNetworkServicesMulticastGroupConsumerActivation() *schema.Resource { + return &schema.Resource{ + Create: resourceNetworkServicesMulticastGroupConsumerActivationCreate, + Read: resourceNetworkServicesMulticastGroupConsumerActivationRead, + Update: resourceNetworkServicesMulticastGroupConsumerActivationUpdate, + Delete: resourceNetworkServicesMulticastGroupConsumerActivationDelete, + + Importer: &schema.ResourceImporter{ + State: resourceNetworkServicesMulticastGroupConsumerActivationImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.SetLabelsDiff, + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "multicast_group_consumer_activation_id": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `Resource ID segment making up resource 'name'. It identifies the resource within its parent collection as described in https://google.aip.dev/122.`, + }, + "multicast_consumer_association": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource name of the multicast consumer association that is in the +same zone as this multicast group consumer activation. +Use the following format: +'projects/*/locations/*/multicastConsumerAssociations/*'.`, + }, + "multicast_group_consumer_activation_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `A unique name for the multicast group consumer activation. +The name is restricted to letters, numbers, and hyphen, with the first +character a letter, and the last a letter or a number. The name must not +exceed 48 characters.`, + }, + "multicast_group_range_activation": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource name of the multicast group range activation created by the +admin in the same zone as this multicast group consumer activation. Use the +following format: +// 'projects/*/locations/*/multicastGroupRangeActivations/*'.`, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Description: `An optional text description of the multicast group consumer activation.`, + }, + "labels": { + Type: schema.TypeMap, + Optional: true, + Description: `Labels as key-value pairs + +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field 'effective_labels' for all of the labels present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "log_config": { + Type: schema.TypeList, + Optional: true, + Description: `The logging configuration.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Optional: true, + Description: `Whether to enable logging or not.`, + }, + }, + }, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `The timestamp when the multicast group consumer activation +was created.`, + }, + "effective_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: `Identifier. The resource name of the multicast group consumer activation. +Use the following format: +'projects/*/locations/*/multicastGroupConsumerActivations/*'.`, + }, + "state": { + Type: schema.TypeList, + Computed: true, + Description: `The multicast resource's state.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "state": { + Type: schema.TypeString, + Computed: true, + Description: `The state of the multicast resource. +Possible values: +CREATING +ACTIVE +DELETING +DELETE_FAILED +UPDATING +UPDATE_FAILED +INACTIVE`, + }, + }, + }, + }, + "terraform_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `The combination of labels configured directly on the resource + and default labels configured on the provider.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "unique_id": { + Type: schema.TypeString, + Computed: true, + Description: `The Google-generated UUID for the resource. This value is +unique across all multicast group consumer activation resources. If a group +consumer activation is deleted and another with the same name is created, +the new group consumer activation is assigned a different unique_id.`, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `The timestamp when the multicast group consumer activation +was most recently updated.`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceNetworkServicesMulticastGroupConsumerActivationCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + descriptionProp, err := expandNetworkServicesMulticastGroupConsumerActivationDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + logConfigProp, err := expandNetworkServicesMulticastGroupConsumerActivationLogConfig(d.Get("log_config"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("log_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(logConfigProp)) && (ok || !reflect.DeepEqual(v, logConfigProp)) { + obj["logConfig"] = logConfigProp + } + multicastConsumerAssociationProp, err := expandNetworkServicesMulticastGroupConsumerActivationMulticastConsumerAssociation(d.Get("multicast_consumer_association"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("multicast_consumer_association"); !tpgresource.IsEmptyValue(reflect.ValueOf(multicastConsumerAssociationProp)) && (ok || !reflect.DeepEqual(v, multicastConsumerAssociationProp)) { + obj["multicastConsumerAssociation"] = multicastConsumerAssociationProp + } + multicastGroupRangeActivationProp, err := expandNetworkServicesMulticastGroupConsumerActivationMulticastGroupRangeActivation(d.Get("multicast_group_range_activation"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("multicast_group_range_activation"); !tpgresource.IsEmptyValue(reflect.ValueOf(multicastGroupRangeActivationProp)) && (ok || !reflect.DeepEqual(v, multicastGroupRangeActivationProp)) { + obj["multicastGroupRangeActivation"] = multicastGroupRangeActivationProp + } + effectiveLabelsProp, err := expandNetworkServicesMulticastGroupConsumerActivationEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(effectiveLabelsProp)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations?multicastGroupConsumerActivationId={{multicast_group_consumer_activation_id}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new MulticastGroupConsumerActivation: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupConsumerActivation: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating MulticastGroupConsumerActivation: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if multicastGroupConsumerActivationIdValue, ok := d.GetOk("multicast_group_consumer_activation_id"); ok && multicastGroupConsumerActivationIdValue.(string) != "" { + if err = identity.Set("multicast_group_consumer_activation_id", multicastGroupConsumerActivationIdValue.(string)); err != nil { + return fmt.Errorf("Error setting multicast_group_consumer_activation_id: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + err = NetworkServicesOperationWaitTime( + config, res, project, "Creating MulticastGroupConsumerActivation", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create MulticastGroupConsumerActivation: %s", err) + } + + log.Printf("[DEBUG] Finished creating MulticastGroupConsumerActivation %q: %#v", d.Id(), res) + + return resourceNetworkServicesMulticastGroupConsumerActivationRead(d, meta) +} + +func resourceNetworkServicesMulticastGroupConsumerActivationRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupConsumerActivation: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("NetworkServicesMulticastGroupConsumerActivation %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + + if err := d.Set("create_time", flattenNetworkServicesMulticastGroupConsumerActivationCreateTime(res["createTime"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("description", flattenNetworkServicesMulticastGroupConsumerActivationDescription(res["description"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("labels", flattenNetworkServicesMulticastGroupConsumerActivationLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("log_config", flattenNetworkServicesMulticastGroupConsumerActivationLogConfig(res["logConfig"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("multicast_consumer_association", flattenNetworkServicesMulticastGroupConsumerActivationMulticastConsumerAssociation(res["multicastConsumerAssociation"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("multicast_group_range_activation", flattenNetworkServicesMulticastGroupConsumerActivationMulticastGroupRangeActivation(res["multicastGroupRangeActivation"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("name", flattenNetworkServicesMulticastGroupConsumerActivationName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("state", flattenNetworkServicesMulticastGroupConsumerActivationState(res["state"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("unique_id", flattenNetworkServicesMulticastGroupConsumerActivationUniqueId(res["uniqueId"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("update_time", flattenNetworkServicesMulticastGroupConsumerActivationUpdateTime(res["updateTime"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("terraform_labels", flattenNetworkServicesMulticastGroupConsumerActivationTerraformLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + if err := d.Set("effective_labels", flattenNetworkServicesMulticastGroupConsumerActivationEffectiveLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupConsumerActivation: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("location"); !ok && v == "" { + err = identity.Set("location", d.Get("location").(string)) + if err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if v, ok := identity.GetOk("multicast_group_consumer_activation_id"); !ok && v == "" { + err = identity.Set("multicast_group_consumer_activation_id", d.Get("multicast_group_consumer_activation_id").(string)) + if err != nil { + return fmt.Errorf("Error setting multicast_group_consumer_activation_id: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceNetworkServicesMulticastGroupConsumerActivationUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if multicastGroupConsumerActivationIdValue, ok := d.GetOk("multicast_group_consumer_activation_id"); ok && multicastGroupConsumerActivationIdValue.(string) != "" { + if err = identity.Set("multicast_group_consumer_activation_id", multicastGroupConsumerActivationIdValue.(string)); err != nil { + return fmt.Errorf("Error setting multicast_group_consumer_activation_id: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupConsumerActivation: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + descriptionProp, err := expandNetworkServicesMulticastGroupConsumerActivationDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + logConfigProp, err := expandNetworkServicesMulticastGroupConsumerActivationLogConfig(d.Get("log_config"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("log_config"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, logConfigProp)) { + obj["logConfig"] = logConfigProp + } + effectiveLabelsProp, err := expandNetworkServicesMulticastGroupConsumerActivationEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating MulticastGroupConsumerActivation %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + if d.HasChange("description") { + updateMask = append(updateMask, "description") + } + + if d.HasChange("log_config") { + updateMask = append(updateMask, "logConfig") + } + + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating MulticastGroupConsumerActivation %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating MulticastGroupConsumerActivation %q: %#v", d.Id(), res) + } + + err = NetworkServicesOperationWaitTime( + config, res, project, "Updating MulticastGroupConsumerActivation", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + } + + return resourceNetworkServicesMulticastGroupConsumerActivationRead(d, meta) +} + +func resourceNetworkServicesMulticastGroupConsumerActivationDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupConsumerActivation: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting MulticastGroupConsumerActivation %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "MulticastGroupConsumerActivation") + } + + err = NetworkServicesOperationWaitTime( + config, res, project, "Deleting MulticastGroupConsumerActivation", userAgent, + d.Timeout(schema.TimeoutDelete)) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Finished deleting MulticastGroupConsumerActivation %q: %#v", d.Id(), res) + return nil +} + +func resourceNetworkServicesMulticastGroupConsumerActivationImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/locations/(?P[^/]+)/multicastGroupConsumerActivations/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenNetworkServicesMulticastGroupConsumerActivationCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationDescription(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkServicesMulticastGroupConsumerActivationLogConfig(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["enabled"] = + flattenNetworkServicesMulticastGroupConsumerActivationLogConfigEnabled(original["enabled"], d, config) + return []interface{}{transformed} +} +func flattenNetworkServicesMulticastGroupConsumerActivationLogConfigEnabled(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationMulticastConsumerAssociation(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationMulticastGroupRangeActivation(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["state"] = + flattenNetworkServicesMulticastGroupConsumerActivationStateState(original["state"], d, config) + return []interface{}{transformed} +} +func flattenNetworkServicesMulticastGroupConsumerActivationStateState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationUniqueId(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupConsumerActivationTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkServicesMulticastGroupConsumerActivationEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandNetworkServicesMulticastGroupConsumerActivationDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesMulticastGroupConsumerActivationLogConfig(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedEnabled, err := expandNetworkServicesMulticastGroupConsumerActivationLogConfigEnabled(original["enabled"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedEnabled); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["enabled"] = transformedEnabled + } + + return transformed, nil +} + +func expandNetworkServicesMulticastGroupConsumerActivationLogConfigEnabled(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesMulticastGroupConsumerActivationMulticastConsumerAssociation(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesMulticastGroupConsumerActivationMulticastGroupRangeActivation(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesMulticastGroupConsumerActivationEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_generated_meta.yaml new file mode 100644 index 00000000000..19061384e8d --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_generated_meta.yaml @@ -0,0 +1,26 @@ +resource: google_network_services_multicast_group_consumer_activation +generation_type: mmv1 +source_file: products/networkservices/MulticastGroupConsumerActivation.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastGroupConsumerActivation +autogen_status: true +fields: + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: logConfig.enabled + - api_field: multicastConsumerAssociation + - field: multicast_group_consumer_activation_id + provider_only: true + - api_field: multicastGroupRangeActivation + - api_field: name + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_generated_test.go b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_generated_test.go new file mode 100644 index 00000000000..f43cc2de256 --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_generated_test.go @@ -0,0 +1,182 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package networkservices_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationBasicExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkServicesMulticastGroupConsumerActivationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationBasicExample(context), + }, + { + ResourceName: "google_network_services_multicast_group_consumer_activation.mgca_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_group_consumer_activation_id", "terraform_labels"}, + }, + { + ResourceName: "google_network_services_multicast_group_consumer_activation.mgca_test", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationBasicExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-network-mgca%{random_suffix}" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "tf-test-test-domain-mgca%{random_suffix}" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "tf-test-test-domain-activation-mgca%{random_suffix}" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_consumer_association" "consumer_association" { + multicast_consumer_association_id = "tf-test-test-consumer-association-mgca%{random_suffix}" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "tf-test-test-internal-range-mgca%{random_suffix}" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "tf-test-test-group-range-mgca%{random_suffix}" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "tf-test-test-mgra-mgca%{random_suffix}" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_consumer_activation" mgca_test { + multicast_group_consumer_activation_id = "tf-test-test-mgca-mgca%{random_suffix}" + location = "us-central1-b" + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_consumer_association = google_network_services_multicast_consumer_association.consumer_association.id +} +`, context) +} + +func testAccCheckNetworkServicesMulticastGroupConsumerActivationDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_network_services_multicast_group_consumer_activation" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("NetworkServicesMulticastGroupConsumerActivation still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_sweeper.go b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_sweeper.go new file mode 100644 index 00000000000..3474ea51ae1 --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_sweeper.go @@ -0,0 +1,226 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkservices/MulticastGroupConsumerActivation.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/sweeper_file.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networkservices + +import ( + "context" + "fmt" + "log" + "strings" + "testing" + + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/sweeper" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func init() { + // Initialize base sweeper object + s := &sweeper.Sweeper{ + Name: "google_network_services_multicast_group_consumer_activation", + ListAndAction: listAndActionNetworkServicesMulticastGroupConsumerActivation, + DeleteFunction: testSweepNetworkServicesMulticastGroupConsumerActivation, + } + + // Register the sweeper + sweeper.AddTestSweepers(s) +} + +func testSweepNetworkServicesMulticastGroupConsumerActivation(_ string) error { + return listAndActionNetworkServicesMulticastGroupConsumerActivation(deleteResourceNetworkServicesMulticastGroupConsumerActivation) +} + +func listAndActionNetworkServicesMulticastGroupConsumerActivation(action sweeper.ResourceAction) error { + var lastError error + resourceName := "NetworkServicesMulticastGroupConsumerActivation" + log.Printf("[INFO][SWEEPER_LOG] Starting sweeper for %s", resourceName) + + // Prepare configurations to iterate over + var configs []*tpgresource.ResourceDataMock + t := &testing.T{} + billingId := envvar.GetTestBillingAccountFromEnv(t) + // Default single config + intermediateValues := []map[string]string{ + { + "region": "us-central1", + }, + } + + // Create configs from intermediate values + for _, values := range intermediateValues { + mockConfig := &tpgresource.ResourceDataMock{ + FieldsInSchema: map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "billing_account": billingId, + }, + } + + // Apply all provided values + for key, value := range values { + mockConfig.FieldsInSchema[key] = value + } + + // Set fallback values for common fields + region, hasRegion := mockConfig.FieldsInSchema["region"].(string) + if !hasRegion { + region = "us-central1" + mockConfig.FieldsInSchema["region"] = region + } + + if _, hasLocation := mockConfig.FieldsInSchema["location"]; !hasLocation { + mockConfig.FieldsInSchema["location"] = region + } + + if _, hasZone := mockConfig.FieldsInSchema["zone"]; !hasZone { + mockConfig.FieldsInSchema["zone"] = region + "-a" + } + + configs = append(configs, mockConfig) + } + + // Process all configurations (either from parent resources or direct substitutions) + for _, mockConfig := range configs { + // Get region from config + region := sweeper.GetFieldOrDefault(mockConfig, "region", "us-central1") + + // Create shared config for this region + config, err := sweeper.SharedConfigForRegion(region) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error getting shared config for region: %s", err) + lastError = err + continue + } + + err = config.LoadAndValidate(context.Background()) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error loading: %s", err) + lastError = err + continue + } + + // Prepare list URL + listTemplate := strings.Split("https://networkservices.googleapis.com/v1/projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations", "?")[0] + listUrl, err := tpgresource.ReplaceVars(mockConfig, config, listTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) + lastError = err + continue + } + + // Log additional info for parent-based resources + log.Printf("[INFO][SWEEPER_LOG] Listing %s resources at %s", resourceName, listUrl) + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: config.Project, + RawURL: listUrl, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in response from request %s: %s", listUrl, err) + lastError = err + continue + } + + // First try the expected resource key + resourceList, ok := res["multicastGroupConsumerActivations"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'multicastGroupConsumerActivations'") + } else { + // Next, try the common "items" pattern + resourceList, ok = res["items"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under standard 'items' key") + } else { + log.Printf("[INFO][SWEEPER_LOG] no resources found") + continue + } + } + rl := resourceList.([]interface{}) + + log.Printf("[INFO][SWEEPER_LOG] Found %d items in %s list response.", len(rl), resourceName) + // Keep count of items that aren't sweepable for logging. + nonPrefixCount := 0 + for _, ri := range rl { + obj, ok := ri.(map[string]interface{}) + if !ok { + log.Printf("[INFO][SWEEPER_LOG] Item was not a map: %T", ri) + continue + } + + if err := action(config, mockConfig, obj); err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in action: %s", err) + lastError = err + } else { + nonPrefixCount++ + } + } + } + + return lastError +} + +func deleteResourceNetworkServicesMulticastGroupConsumerActivation(config *transport_tpg.Config, d *tpgresource.ResourceDataMock, obj map[string]interface{}) error { + var deletionerror error + resourceName := "NetworkServicesMulticastGroupConsumerActivation" + var name string + // Id detected in the delete URL, attempt to use id. + if obj["id"] != nil { + name = tpgresource.GetResourceNameFromSelfLink(obj["id"].(string)) + } else if obj["name"] != nil { + name = tpgresource.GetResourceNameFromSelfLink(obj["name"].(string)) + } else { + log.Printf("[INFO][SWEEPER_LOG] %s resource name and id were nil", resourceName) + return fmt.Errorf("%s resource name was nil", resourceName) + } + + // Skip resources that shouldn't be sweeped + if !sweeper.IsSweepableTestResource(name) { + return nil + } + + deleteTemplate := "https://networkservices.googleapis.com/v1/projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}" + + url, err := tpgresource.ReplaceVars(d, config, deleteTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) + deletionerror = err + } + url = url + name + + // Don't wait on operations as we may have a lot to delete + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: config.Project, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error deleting for url %s : %s", url, err) + deletionerror = err + } else { + log.Printf("[INFO][SWEEPER_LOG] Sent delete request for %s resource: %s", resourceName, name) + } + + return deletionerror +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_test.go b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_test.go new file mode 100644 index 00000000000..a3512c79b35 --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_consumer_activation_test.go @@ -0,0 +1,192 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_group_consumer_activation_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package networkservices_test + +import ( + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-provider-google/google/acctest" + "testing" +) + +func TestAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationUpdateExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkServicesMulticastGroupConsumerActivationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationUpdateExample_full(context), + }, + { + ResourceName: "google_network_services_multicast_group_consumer_activation.mgca_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_group_consumer_activation_id", "terraform_labels"}, + }, + { + Config: testAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationUpdateExample_diff(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_services_multicast_group_consumer_activation.mgca_test", plancheck.ResourceActionUpdate), + }, + }, + }, + { + ResourceName: "google_network_services_multicast_group_consumer_activation.mgca_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_group_consumer_activation_id", "terraform_labels"}, + }, + }, + }) +} + +func testAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationUpdateExample_full(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-network-mgca%{random_suffix}" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "tf-test-test-domain-mgca%{random_suffix}" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "tf-test-test-domain-activation-mgca%{random_suffix}" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_consumer_association" "consumer_association" { + multicast_consumer_association_id = "tf-test-test-consumer-association-mgca%{random_suffix}" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "tf-test-test-internal-range-mgca%{random_suffix}" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "tf-test-test-group-range-mgca%{random_suffix}" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "tf-test-test-mgra-mgca%{random_suffix}" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_consumer_activation" mgca_test { + multicast_group_consumer_activation_id = "tf-test-test-mgca-mgca%{random_suffix}" + location = "us-central1-b" + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_consumer_association = google_network_services_multicast_consumer_association.consumer_association.id + log_config { + enabled = true + } +} +`, context) +} + +func testAccNetworkServicesMulticastGroupConsumerActivation_networkServicesMulticastGroupConsumerActivationUpdateExample_diff(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-network-mgca%{random_suffix}" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "tf-test-test-domain-mgca%{random_suffix}" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "tf-test-test-domain-activation-mgca%{random_suffix}" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_consumer_association" "consumer_association" { + multicast_consumer_association_id = "tf-test-test-consumer-association-mgca%{random_suffix}" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "tf-test-test-internal-range-mgca%{random_suffix}" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "tf-test-test-group-range-mgca%{random_suffix}" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "tf-test-test-mgra-mgca%{random_suffix}" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_consumer_activation" mgca_test { + multicast_group_consumer_activation_id = "tf-test-test-mgca-mgca%{random_suffix}" + location = "us-central1-b" + description = "my description" + labels = { + "test-label" = "test-value" + } + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_consumer_association = google_network_services_multicast_consumer_association.consumer_association.id +} +`, context) +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_producer_activation.go b/google/services/networkservices/resource_network_services_multicast_group_producer_activation.go new file mode 100644 index 00000000000..38d13e066ad --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_producer_activation.go @@ -0,0 +1,748 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkservices/MulticastGroupProducerActivation.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networkservices + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "log" + "net/http" + "reflect" + "regexp" + "slices" + "sort" + "strconv" + "strings" + "time" + + "github.com/hashicorp/errwrap" + "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/id" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/structure" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + "github.com/hashicorp/terraform-provider-google/google/verify" + + "google.golang.org/api/googleapi" +) + +var ( + _ = bytes.Clone + _ = context.WithCancel + _ = base64.NewDecoder + _ = json.Marshal + _ = fmt.Sprintf + _ = log.Print + _ = http.Get + _ = reflect.ValueOf + _ = regexp.Match + _ = slices.Min([]int{1}) + _ = sort.IntSlice{} + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = errwrap.Wrap + _ = cty.BoolVal + _ = diag.Diagnostic{} + _ = customdiff.All + _ = id.UniqueId + _ = logging.LogLevel + _ = retry.Retry + _ = schema.Noop + _ = validation.All + _ = structure.ExpandJsonFromString + _ = terraform.State{} + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = verify.ValidateEnum + _ = googleapi.Error{} +) + +func ResourceNetworkServicesMulticastGroupProducerActivation() *schema.Resource { + return &schema.Resource{ + Create: resourceNetworkServicesMulticastGroupProducerActivationCreate, + Read: resourceNetworkServicesMulticastGroupProducerActivationRead, + Update: resourceNetworkServicesMulticastGroupProducerActivationUpdate, + Delete: resourceNetworkServicesMulticastGroupProducerActivationDelete, + + Importer: &schema.ResourceImporter{ + State: resourceNetworkServicesMulticastGroupProducerActivationImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + Update: schema.DefaultTimeout(20 * time.Minute), + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + + CustomizeDiff: customdiff.All( + tpgresource.SetLabelsDiff, + tpgresource.DefaultProviderProject, + ), + + Identity: &schema.ResourceIdentity{ + Version: 1, + SchemaFunc: func() map[string]*schema.Schema { + return map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "multicast_group_producer_activation_id": { + Type: schema.TypeString, + RequiredForImport: true, + }, + "project": { + Type: schema.TypeString, + OptionalForImport: true, + }, + } + }, + }, + Schema: map[string]*schema.Schema{ + "location": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `Resource ID segment making up resource 'name'. It identifies the resource within its parent collection as described in https://google.aip.dev/122.`, + }, + "multicast_group_producer_activation_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `A unique name for the multicast group producer activation. +The name is restricted to letters, numbers, and hyphen, with the first +character a letter, and the last a letter or a number. The name must not +exceed 48 characters.`, + }, + "multicast_group_range_activation": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource name of the multicast group range activationcreated by the +admin in the same zone as this multicast group producer activation. Use the +following format: +// 'projects/*/locations/*/multicastGroupRangeActivations/*'.`, + }, + "multicast_producer_association": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + Description: `The resource name of the multicast producer association that is in the +same zone as this multicast group producer activation. +Use the following format: +'projects/*/locations/*/multicastProducerAssociations/*'.`, + }, + "description": { + Type: schema.TypeString, + Optional: true, + Description: `An optional text description of the multicast group producer activation.`, + }, + "labels": { + Type: schema.TypeMap, + Optional: true, + Description: `Labels as key-value pairs + +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field 'effective_labels' for all of the labels present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "create_time": { + Type: schema.TypeString, + Computed: true, + Description: `The timestamp when the multicast group producer activation was created.`, + }, + "effective_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "name": { + Type: schema.TypeString, + Computed: true, + Description: `Identifier. The resource name of the multicast group producer activation. +Use the following format: +'projects/*/locations/*/multicastGroupProducerActivations/*'.`, + }, + "state": { + Type: schema.TypeList, + Computed: true, + Description: `The multicast resource's state.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "state": { + Type: schema.TypeString, + Computed: true, + Description: `The state of the multicast resource. +Possible values: +CREATING +ACTIVE +DELETING +DELETE_FAILED +UPDATING +UPDATE_FAILED +INACTIVE`, + }, + }, + }, + }, + "terraform_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `The combination of labels configured directly on the resource + and default labels configured on the provider.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "unique_id": { + Type: schema.TypeString, + Computed: true, + Description: `The Google-generated UUID for the resource. This value is +unique across all multicast group producer activation resources. If a group +producer activation is deleted and another with the same name is created, +the new group producer activation is assigned a different unique_id.`, + }, + "update_time": { + Type: schema.TypeString, + Computed: true, + Description: `The timestamp when the multicast group producer activation +was most recently updated.`, + }, + "project": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + }, + UseJSONNumber: true, + } +} + +func resourceNetworkServicesMulticastGroupProducerActivationCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + obj := make(map[string]interface{}) + descriptionProp, err := expandNetworkServicesMulticastGroupProducerActivationDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(descriptionProp)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + multicastGroupRangeActivationProp, err := expandNetworkServicesMulticastGroupProducerActivationMulticastGroupRangeActivation(d.Get("multicast_group_range_activation"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("multicast_group_range_activation"); !tpgresource.IsEmptyValue(reflect.ValueOf(multicastGroupRangeActivationProp)) && (ok || !reflect.DeepEqual(v, multicastGroupRangeActivationProp)) { + obj["multicastGroupRangeActivation"] = multicastGroupRangeActivationProp + } + multicastProducerAssociationProp, err := expandNetworkServicesMulticastGroupProducerActivationMulticastProducerAssociation(d.Get("multicast_producer_association"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("multicast_producer_association"); !tpgresource.IsEmptyValue(reflect.ValueOf(multicastProducerAssociationProp)) && (ok || !reflect.DeepEqual(v, multicastProducerAssociationProp)) { + obj["multicastProducerAssociation"] = multicastProducerAssociationProp + } + effectiveLabelsProp, err := expandNetworkServicesMulticastGroupProducerActivationEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(effectiveLabelsProp)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations?multicastGroupProducerActivationId={{multicast_group_producer_activation_id}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Creating new MulticastGroupProducerActivation: %#v", obj) + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupProducerActivation: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "POST", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutCreate), + Headers: headers, + }) + if err != nil { + return fmt.Errorf("Error creating MulticastGroupProducerActivation: %s", err) + } + + // Store the ID now + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}") + if err != nil { + return fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if multicastGroupProducerActivationIdValue, ok := d.GetOk("multicast_group_producer_activation_id"); ok && multicastGroupProducerActivationIdValue.(string) != "" { + if err = identity.Set("multicast_group_producer_activation_id", multicastGroupProducerActivationIdValue.(string)); err != nil { + return fmt.Errorf("Error setting multicast_group_producer_activation_id: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Create) identity not set: %s", err) + } + + err = NetworkServicesOperationWaitTime( + config, res, project, "Creating MulticastGroupProducerActivation", userAgent, + d.Timeout(schema.TimeoutCreate)) + + if err != nil { + // The resource didn't actually create + d.SetId("") + return fmt.Errorf("Error waiting to create MulticastGroupProducerActivation: %s", err) + } + + log.Printf("[DEBUG] Finished creating MulticastGroupProducerActivation %q: %#v", d.Id(), res) + + return resourceNetworkServicesMulticastGroupProducerActivationRead(d, meta) +} + +func resourceNetworkServicesMulticastGroupProducerActivationRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}") + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupProducerActivation: %s", err) + } + billingProject = project + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, fmt.Sprintf("NetworkServicesMulticastGroupProducerActivation %q", d.Id())) + } + + if err := d.Set("project", project); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + + if err := d.Set("create_time", flattenNetworkServicesMulticastGroupProducerActivationCreateTime(res["createTime"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("description", flattenNetworkServicesMulticastGroupProducerActivationDescription(res["description"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("labels", flattenNetworkServicesMulticastGroupProducerActivationLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("multicast_group_range_activation", flattenNetworkServicesMulticastGroupProducerActivationMulticastGroupRangeActivation(res["multicastGroupRangeActivation"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("multicast_producer_association", flattenNetworkServicesMulticastGroupProducerActivationMulticastProducerAssociation(res["multicastProducerAssociation"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("name", flattenNetworkServicesMulticastGroupProducerActivationName(res["name"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("state", flattenNetworkServicesMulticastGroupProducerActivationState(res["state"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("unique_id", flattenNetworkServicesMulticastGroupProducerActivationUniqueId(res["uniqueId"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("update_time", flattenNetworkServicesMulticastGroupProducerActivationUpdateTime(res["updateTime"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("terraform_labels", flattenNetworkServicesMulticastGroupProducerActivationTerraformLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + if err := d.Set("effective_labels", flattenNetworkServicesMulticastGroupProducerActivationEffectiveLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading MulticastGroupProducerActivation: %s", err) + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if v, ok := identity.GetOk("location"); !ok && v == "" { + err = identity.Set("location", d.Get("location").(string)) + if err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if v, ok := identity.GetOk("multicast_group_producer_activation_id"); !ok && v == "" { + err = identity.Set("multicast_group_producer_activation_id", d.Get("multicast_group_producer_activation_id").(string)) + if err != nil { + return fmt.Errorf("Error setting multicast_group_producer_activation_id: %s", err) + } + } + if v, ok := identity.GetOk("project"); !ok && v == "" { + err = identity.Set("project", d.Get("project").(string)) + if err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Read) identity not set: %s", err) + } + + return nil +} + +func resourceNetworkServicesMulticastGroupProducerActivationUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + identity, err := d.Identity() + if err == nil && identity != nil { + if locationValue, ok := d.GetOk("location"); ok && locationValue.(string) != "" { + if err = identity.Set("location", locationValue.(string)); err != nil { + return fmt.Errorf("Error setting location: %s", err) + } + } + if multicastGroupProducerActivationIdValue, ok := d.GetOk("multicast_group_producer_activation_id"); ok && multicastGroupProducerActivationIdValue.(string) != "" { + if err = identity.Set("multicast_group_producer_activation_id", multicastGroupProducerActivationIdValue.(string)); err != nil { + return fmt.Errorf("Error setting multicast_group_producer_activation_id: %s", err) + } + } + if projectValue, ok := d.GetOk("project"); ok && projectValue.(string) != "" { + if err = identity.Set("project", projectValue.(string)); err != nil { + return fmt.Errorf("Error setting project: %s", err) + } + } + } else { + log.Printf("[DEBUG] (Update) identity not set: %s", err) + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupProducerActivation: %s", err) + } + billingProject = project + + obj := make(map[string]interface{}) + descriptionProp, err := expandNetworkServicesMulticastGroupProducerActivationDescription(d.Get("description"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("description"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, descriptionProp)) { + obj["description"] = descriptionProp + } + effectiveLabelsProp, err := expandNetworkServicesMulticastGroupProducerActivationEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}") + if err != nil { + return err + } + + log.Printf("[DEBUG] Updating MulticastGroupProducerActivation %q: %#v", d.Id(), obj) + headers := make(http.Header) + updateMask := []string{} + + if d.HasChange("description") { + updateMask = append(updateMask, "description") + } + + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } + // updateMask is a URL parameter but not present in the schema, so ReplaceVars + // won't set it + url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) + if err != nil { + return err + } + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + // if updateMask is empty we are not updating anything so skip the post + if len(updateMask) > 0 { + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "PATCH", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutUpdate), + Headers: headers, + }) + + if err != nil { + return fmt.Errorf("Error updating MulticastGroupProducerActivation %q: %s", d.Id(), err) + } else { + log.Printf("[DEBUG] Finished updating MulticastGroupProducerActivation %q: %#v", d.Id(), res) + } + + err = NetworkServicesOperationWaitTime( + config, res, project, "Updating MulticastGroupProducerActivation", userAgent, + d.Timeout(schema.TimeoutUpdate)) + + if err != nil { + return err + } + } + + return resourceNetworkServicesMulticastGroupProducerActivationRead(d, meta) +} + +func resourceNetworkServicesMulticastGroupProducerActivationDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*transport_tpg.Config) + userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent) + if err != nil { + return err + } + + billingProject := "" + + project, err := tpgresource.GetProject(d, config) + if err != nil { + return fmt.Errorf("Error fetching project for MulticastGroupProducerActivation: %s", err) + } + billingProject = project + + url, err := tpgresource.ReplaceVars(d, config, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}") + if err != nil { + return err + } + + var obj map[string]interface{} + + // err == nil indicates that the billing_project value was found + if bp, err := tpgresource.GetBillingProject(d, config); err == nil { + billingProject = bp + } + + headers := make(http.Header) + + log.Printf("[DEBUG] Deleting MulticastGroupProducerActivation %q", d.Id()) + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: billingProject, + RawURL: url, + UserAgent: userAgent, + Body: obj, + Timeout: d.Timeout(schema.TimeoutDelete), + Headers: headers, + }) + if err != nil { + return transport_tpg.HandleNotFoundError(err, d, "MulticastGroupProducerActivation") + } + + err = NetworkServicesOperationWaitTime( + config, res, project, "Deleting MulticastGroupProducerActivation", userAgent, + d.Timeout(schema.TimeoutDelete)) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Finished deleting MulticastGroupProducerActivation %q: %#v", d.Id(), res) + return nil +} + +func resourceNetworkServicesMulticastGroupProducerActivationImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + config := meta.(*transport_tpg.Config) + if err := tpgresource.ParseImportId([]string{ + "^projects/(?P[^/]+)/locations/(?P[^/]+)/multicastGroupProducerActivations/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)$", + "^(?P[^/]+)/(?P[^/]+)$", + }, d, config); err != nil { + return nil, err + } + + // Replace import id for the resource id + id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}") + if err != nil { + return nil, fmt.Errorf("Error constructing id: %s", err) + } + d.SetId(id) + + return []*schema.ResourceData{d}, nil +} + +func flattenNetworkServicesMulticastGroupProducerActivationCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationDescription(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkServicesMulticastGroupProducerActivationMulticastGroupRangeActivation(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationMulticastProducerAssociation(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["state"] = + flattenNetworkServicesMulticastGroupProducerActivationStateState(original["state"], d, config) + return []interface{}{transformed} +} +func flattenNetworkServicesMulticastGroupProducerActivationStateState(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationUniqueId(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationUpdateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func flattenNetworkServicesMulticastGroupProducerActivationTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenNetworkServicesMulticastGroupProducerActivationEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + +func expandNetworkServicesMulticastGroupProducerActivationDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesMulticastGroupProducerActivationMulticastGroupRangeActivation(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesMulticastGroupProducerActivationMulticastProducerAssociation(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandNetworkServicesMulticastGroupProducerActivationEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_producer_activation_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_generated_meta.yaml new file mode 100644 index 00000000000..784bda20dfe --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_generated_meta.yaml @@ -0,0 +1,25 @@ +resource: google_network_services_multicast_group_producer_activation +generation_type: mmv1 +source_file: products/networkservices/MulticastGroupProducerActivation.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastGroupProducerActivation +autogen_status: true +fields: + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - field: multicast_group_producer_activation_id + provider_only: true + - api_field: multicastGroupRangeActivation + - api_field: multicastProducerAssociation + - api_field: name + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_group_producer_activation_generated_test.go b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_generated_test.go new file mode 100644 index 00000000000..4fc5d9f5afc --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_generated_test.go @@ -0,0 +1,182 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + +package networkservices_test + +import ( + "fmt" + "log" + "strconv" + "strings" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" + + "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" + + "google.golang.org/api/googleapi" +) + +var ( + _ = fmt.Sprintf + _ = log.Print + _ = strconv.Atoi + _ = strings.Trim + _ = time.Now + _ = resource.TestMain + _ = terraform.NewState + _ = envvar.TestEnvVar + _ = tpgresource.SetLabels + _ = transport_tpg.Config{} + _ = googleapi.Error{} +) + +func TestAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationBasicExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkServicesMulticastGroupProducerActivationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationBasicExample(context), + }, + { + ResourceName: "google_network_services_multicast_group_producer_activation.mgpa_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_group_producer_activation_id", "terraform_labels"}, + }, + { + ResourceName: "google_network_services_multicast_group_producer_activation.mgpa_test", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationBasicExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-network-mgpa%{random_suffix}" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "tf-test-test-domain-mgpa%{random_suffix}" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "tf-test-test-domain-activation-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_producer_association" "producer_association" { + multicast_producer_association_id = "tf-test-test-producer-association-mgpa%{random_suffix}" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "tf-test-test-internal-range-mgpa%{random_suffix}" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "tf-test-test-group-range-mgpa%{random_suffix}" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "tf-test-test-mgra-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_producer_activation" mgpa_test { + multicast_group_producer_activation_id = "tf-test-test-mgpa-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_producer_association = google_network_services_multicast_producer_association.producer_association.id +} +`, context) +} + +func testAccCheckNetworkServicesMulticastGroupProducerActivationDestroyProducer(t *testing.T) func(s *terraform.State) error { + return func(s *terraform.State) error { + for name, rs := range s.RootModule().Resources { + if rs.Type != "google_network_services_multicast_group_producer_activation" { + continue + } + if strings.HasPrefix(name, "data.") { + continue + } + + config := acctest.GoogleProviderConfig(t) + + url, err := tpgresource.ReplaceVarsForTest(config, rs, "{{NetworkServicesBasePath}}projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}") + if err != nil { + return err + } + + billingProject := "" + + if config.BillingProject != "" { + billingProject = config.BillingProject + } + + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: billingProject, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err == nil { + return fmt.Errorf("NetworkServicesMulticastGroupProducerActivation still exists at %s", url) + } + } + + return nil + } +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_producer_activation_sweeper.go b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_sweeper.go new file mode 100644 index 00000000000..aa11ab92a1d --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_sweeper.go @@ -0,0 +1,226 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Configuration: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkservices/MulticastGroupProducerActivation.yaml +// Template: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/sweeper_file.go.tmpl +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- + +package networkservices + +import ( + "context" + "fmt" + "log" + "strings" + "testing" + + "github.com/hashicorp/terraform-provider-google/google/envvar" + "github.com/hashicorp/terraform-provider-google/google/sweeper" + "github.com/hashicorp/terraform-provider-google/google/tpgresource" + transport_tpg "github.com/hashicorp/terraform-provider-google/google/transport" +) + +func init() { + // Initialize base sweeper object + s := &sweeper.Sweeper{ + Name: "google_network_services_multicast_group_producer_activation", + ListAndAction: listAndActionNetworkServicesMulticastGroupProducerActivation, + DeleteFunction: testSweepNetworkServicesMulticastGroupProducerActivation, + } + + // Register the sweeper + sweeper.AddTestSweepers(s) +} + +func testSweepNetworkServicesMulticastGroupProducerActivation(_ string) error { + return listAndActionNetworkServicesMulticastGroupProducerActivation(deleteResourceNetworkServicesMulticastGroupProducerActivation) +} + +func listAndActionNetworkServicesMulticastGroupProducerActivation(action sweeper.ResourceAction) error { + var lastError error + resourceName := "NetworkServicesMulticastGroupProducerActivation" + log.Printf("[INFO][SWEEPER_LOG] Starting sweeper for %s", resourceName) + + // Prepare configurations to iterate over + var configs []*tpgresource.ResourceDataMock + t := &testing.T{} + billingId := envvar.GetTestBillingAccountFromEnv(t) + // Default single config + intermediateValues := []map[string]string{ + { + "region": "us-central1", + }, + } + + // Create configs from intermediate values + for _, values := range intermediateValues { + mockConfig := &tpgresource.ResourceDataMock{ + FieldsInSchema: map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "billing_account": billingId, + }, + } + + // Apply all provided values + for key, value := range values { + mockConfig.FieldsInSchema[key] = value + } + + // Set fallback values for common fields + region, hasRegion := mockConfig.FieldsInSchema["region"].(string) + if !hasRegion { + region = "us-central1" + mockConfig.FieldsInSchema["region"] = region + } + + if _, hasLocation := mockConfig.FieldsInSchema["location"]; !hasLocation { + mockConfig.FieldsInSchema["location"] = region + } + + if _, hasZone := mockConfig.FieldsInSchema["zone"]; !hasZone { + mockConfig.FieldsInSchema["zone"] = region + "-a" + } + + configs = append(configs, mockConfig) + } + + // Process all configurations (either from parent resources or direct substitutions) + for _, mockConfig := range configs { + // Get region from config + region := sweeper.GetFieldOrDefault(mockConfig, "region", "us-central1") + + // Create shared config for this region + config, err := sweeper.SharedConfigForRegion(region) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error getting shared config for region: %s", err) + lastError = err + continue + } + + err = config.LoadAndValidate(context.Background()) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error loading: %s", err) + lastError = err + continue + } + + // Prepare list URL + listTemplate := strings.Split("https://networkservices.googleapis.com/v1/projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations", "?")[0] + listUrl, err := tpgresource.ReplaceVars(mockConfig, config, listTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing sweeper list url: %s", err) + lastError = err + continue + } + + // Log additional info for parent-based resources + log.Printf("[INFO][SWEEPER_LOG] Listing %s resources at %s", resourceName, listUrl) + + res, err := transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "GET", + Project: config.Project, + RawURL: listUrl, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in response from request %s: %s", listUrl, err) + lastError = err + continue + } + + // First try the expected resource key + resourceList, ok := res["multicastGroupProducerActivations"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under expected key 'multicastGroupProducerActivations'") + } else { + // Next, try the common "items" pattern + resourceList, ok = res["items"] + if ok { + log.Printf("[INFO][SWEEPER_LOG] Found resources under standard 'items' key") + } else { + log.Printf("[INFO][SWEEPER_LOG] no resources found") + continue + } + } + rl := resourceList.([]interface{}) + + log.Printf("[INFO][SWEEPER_LOG] Found %d items in %s list response.", len(rl), resourceName) + // Keep count of items that aren't sweepable for logging. + nonPrefixCount := 0 + for _, ri := range rl { + obj, ok := ri.(map[string]interface{}) + if !ok { + log.Printf("[INFO][SWEEPER_LOG] Item was not a map: %T", ri) + continue + } + + if err := action(config, mockConfig, obj); err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error in action: %s", err) + lastError = err + } else { + nonPrefixCount++ + } + } + } + + return lastError +} + +func deleteResourceNetworkServicesMulticastGroupProducerActivation(config *transport_tpg.Config, d *tpgresource.ResourceDataMock, obj map[string]interface{}) error { + var deletionerror error + resourceName := "NetworkServicesMulticastGroupProducerActivation" + var name string + // Id detected in the delete URL, attempt to use id. + if obj["id"] != nil { + name = tpgresource.GetResourceNameFromSelfLink(obj["id"].(string)) + } else if obj["name"] != nil { + name = tpgresource.GetResourceNameFromSelfLink(obj["name"].(string)) + } else { + log.Printf("[INFO][SWEEPER_LOG] %s resource name and id were nil", resourceName) + return fmt.Errorf("%s resource name was nil", resourceName) + } + + // Skip resources that shouldn't be sweeped + if !sweeper.IsSweepableTestResource(name) { + return nil + } + + deleteTemplate := "https://networkservices.googleapis.com/v1/projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}" + + url, err := tpgresource.ReplaceVars(d, config, deleteTemplate) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] error preparing delete url: %s", err) + deletionerror = err + } + url = url + name + + // Don't wait on operations as we may have a lot to delete + _, err = transport_tpg.SendRequest(transport_tpg.SendRequestOptions{ + Config: config, + Method: "DELETE", + Project: config.Project, + RawURL: url, + UserAgent: config.UserAgent, + }) + if err != nil { + log.Printf("[INFO][SWEEPER_LOG] Error deleting for url %s : %s", url, err) + deletionerror = err + } else { + log.Printf("[INFO][SWEEPER_LOG] Sent delete request for %s resource: %s", resourceName, name) + } + + return deletionerror +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_producer_activation_test.go b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_test.go new file mode 100644 index 00000000000..d4976f354fd --- /dev/null +++ b/google/services/networkservices/resource_network_services_multicast_group_producer_activation_test.go @@ -0,0 +1,189 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: Handwritten *** +// +// ---------------------------------------------------------------------------- +// +// This code is generated by Magic Modules using the following: +// +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_group_producer_activation_test.go +// +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. +// +// ---------------------------------------------------------------------------- +package networkservices_test + +import ( + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/hashicorp/terraform-provider-google/google/acctest" + "testing" +) + +func TestAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationUpdateExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckNetworkServicesMulticastGroupProducerActivationDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationUpdateExample_full(context), + }, + { + ResourceName: "google_network_services_multicast_group_producer_activation.mgpa_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_group_producer_activation_id", "terraform_labels"}, + }, + { + Config: testAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationUpdateExample_diff(context), + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction("google_network_services_multicast_group_producer_activation.mgpa_test", plancheck.ResourceActionUpdate), + }, + }, + }, + { + ResourceName: "google_network_services_multicast_group_producer_activation.mgpa_test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "location", "multicast_group_producer_activation_id", "terraform_labels"}, + }, + }, + }) +} + +func testAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationUpdateExample_full(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-network-mgpa%{random_suffix}" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "tf-test-test-domain-mgpa%{random_suffix}" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "tf-test-test-domain-activation-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_producer_association" "producer_association" { + multicast_producer_association_id = "tf-test-test-producer-association-mgpa%{random_suffix}" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "tf-test-test-internal-range-mgpa%{random_suffix}" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "tf-test-test-group-range-mgpa%{random_suffix}" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "tf-test-test-mgra-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_producer_activation" mgpa_test { + multicast_group_producer_activation_id = "tf-test-test-mgpa-mgpa%{random_suffix}" + location = "us-central1-b" + description = "my description" + labels = { + "test-label" = "test-value" + } + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_producer_association = google_network_services_multicast_producer_association.producer_association.id +} +`, context) +} + +func testAccNetworkServicesMulticastGroupProducerActivation_networkServicesMulticastGroupProducerActivationUpdateExample_diff(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_compute_network" "network" { + name = "tf-test-test-network-mgpa%{random_suffix}" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "tf-test-test-domain-mgpa%{random_suffix}" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "tf-test-test-domain-activation-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_producer_association" "producer_association" { + multicast_producer_association_id = "tf-test-test-producer-association-mgpa%{random_suffix}" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "tf-test-test-internal-range-mgpa%{random_suffix}" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "tf-test-test-group-range-mgpa%{random_suffix}" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "tf-test-test-mgra-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_producer_activation" mgpa_test { + multicast_group_producer_activation_id = "tf-test-test-mgpa-mgpa%{random_suffix}" + location = "us-central1-b" + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_producer_association = google_network_services_multicast_producer_association.producer_association.id +} +`, context) +} diff --git a/google/services/networkservices/resource_network_services_multicast_group_range_activation_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_group_range_activation_generated_meta.yaml index 5e1b55cb8c7..24bcc690014 100644 --- a/google/services/networkservices/resource_network_services_multicast_group_range_activation_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_multicast_group_range_activation_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_network_services_multicast_group_range_activation' -generation_type: 'mmv1' -source_file: 'products/networkservices/MulticastGroupRangeActivation.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MulticastGroupRangeActivation' +resource: google_network_services_multicast_group_range_activation +generation_type: mmv1 +source_file: products/networkservices/MulticastGroupRangeActivation.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastGroupRangeActivation autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'ipCidrRange' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'logConfig.enabled' - - api_field: 'multicastDomainActivation' - - api_field: 'multicastGroupConsumerActivations' - - api_field: 'multicastGroupRange' - - field: 'multicast_group_range_activation_id' - provider_only: true - - api_field: 'name' - - api_field: 'state.state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: ipCidrRange + - api_field: labels + - field: location + provider_only: true + - api_field: logConfig.enabled + - api_field: multicastDomainActivation + - api_field: multicastGroupConsumerActivations + - api_field: multicastGroupRange + - field: multicast_group_range_activation_id + provider_only: true + - api_field: name + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_group_range_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_group_range_generated_meta.yaml index 778bbb25a28..7d42ddd1706 100644 --- a/google/services/networkservices/resource_network_services_multicast_group_range_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_multicast_group_range_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_network_services_multicast_group_range' -generation_type: 'mmv1' -source_file: 'products/networkservices/MulticastGroupRange.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MulticastGroupRange' +resource: google_network_services_multicast_group_range +generation_type: mmv1 +source_file: products/networkservices/MulticastGroupRange.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastGroupRange autogen_status: true fields: - - api_field: 'consumerAcceptList' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'distributionScope' - - field: 'effective_labels' - provider_only: true - - api_field: 'ipCidrRange' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'logConfig.enabled' - - api_field: 'multicastDomain' - - field: 'multicast_group_range_id' - provider_only: true - - api_field: 'name' - - api_field: 'requireExplicitAccept' - - api_field: 'reservedInternalRange' - - api_field: 'state.state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: consumerAcceptList + - api_field: createTime + - api_field: description + - api_field: distributionScope + - field: effective_labels + provider_only: true + - api_field: ipCidrRange + - api_field: labels + - field: location + provider_only: true + - api_field: logConfig.enabled + - api_field: multicastDomain + - field: multicast_group_range_id + provider_only: true + - api_field: name + - api_field: requireExplicitAccept + - api_field: reservedInternalRange + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_multicast_group_range_test.go b/google/services/networkservices/resource_network_services_multicast_group_range_test.go index 3da14241247..02f8815b00d 100644 --- a/google/services/networkservices/resource_network_services_multicast_group_range_test.go +++ b/google/services/networkservices/resource_network_services_multicast_group_range_test.go @@ -2,35 +2,18 @@ // SPDX-License-Identifier: MPL-2.0 // ---------------------------------------------------------------------------- // -// *** AUTO GENERATED CODE *** Type: Handwritten *** +// *** AUTO GENERATED CODE *** Type: Handwritten *** // // ---------------------------------------------------------------------------- // -// This code is generated by Magic Modules using the following: +// This code is generated by Magic Modules using the following: // -// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_group_range_test.go +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_multicast_group_range_test.go // -// DO NOT EDIT this file directly. Any changes made to this file will be -// overwritten during the next generation cycle. +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. // // ---------------------------------------------------------------------------- -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// ---------------------------------------------------------------------------- -// -// *** AUTO GENERATED CODE *** Type: MMv1 *** -// -// ---------------------------------------------------------------------------- -// -// This file is automatically generated by Magic Modules and manual -// changes will be clobbered when the file is regenerated. -// -// Please read more about how to change this file in -// .github/CONTRIBUTING.md. -// -// ---------------------------------------------------------------------------- - package networkservices_test import ( diff --git a/google/services/networkservices/resource_network_services_multicast_producer_association_generated_meta.yaml b/google/services/networkservices/resource_network_services_multicast_producer_association_generated_meta.yaml index 74decf4fb9e..e09473e96a4 100644 --- a/google/services/networkservices/resource_network_services_multicast_producer_association_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_multicast_producer_association_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_network_services_multicast_producer_association' -generation_type: 'mmv1' -source_file: 'products/networkservices/MulticastProducerAssociation.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MulticastProducerAssociation' +resource: google_network_services_multicast_producer_association +generation_type: mmv1 +source_file: products/networkservices/MulticastProducerAssociation.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: MulticastProducerAssociation autogen_status: true fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'multicastDomainActivation' - - field: 'multicast_producer_association_id' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'state.state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'uniqueId' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: multicastDomainActivation + - field: multicast_producer_association_id + provider_only: true + - api_field: name + - api_field: network + - api_field: state.state + - field: terraform_labels + provider_only: true + - api_field: uniqueId + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_service_binding_generated_meta.yaml b/google/services/networkservices/resource_network_services_service_binding_generated_meta.yaml index ea851c770d9..53e58070fab 100644 --- a/google/services/networkservices/resource_network_services_service_binding_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_service_binding_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_network_services_service_binding' -generation_type: 'mmv1' -source_file: 'products/networkservices/ServiceBinding.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ServiceBinding' +resource: google_network_services_service_binding +generation_type: mmv1 +source_file: products/networkservices/ServiceBinding.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: ServiceBinding fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'service' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: name + provider_only: true + - api_field: service + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_tcp_route_generated_meta.yaml b/google/services/networkservices/resource_network_services_tcp_route_generated_meta.yaml index a86c3b571ce..d68bbae72ba 100644 --- a/google/services/networkservices/resource_network_services_tcp_route_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_tcp_route_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_network_services_tcp_route' -generation_type: 'mmv1' -source_file: 'products/networkservices/TcpRoute.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TcpRoute' +resource: google_network_services_tcp_route +generation_type: mmv1 +source_file: products/networkservices/TcpRoute.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: TcpRoute fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'gateways' - - api_field: 'labels' - - api_field: 'meshes' - - field: 'name' - provider_only: true - - api_field: 'rules.action.destinations.serviceName' - - api_field: 'rules.action.destinations.weight' - - api_field: 'rules.action.idleTimeout' - - api_field: 'rules.action.originalDestination' - - api_field: 'rules.matches.address' - - api_field: 'rules.matches.port' - - api_field: 'selfLink' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: gateways + - api_field: labels + - api_field: meshes + - field: name + provider_only: true + - api_field: rules.action.destinations.serviceName + - api_field: rules.action.destinations.weight + - api_field: rules.action.idleTimeout + - api_field: rules.action.originalDestination + - api_field: rules.matches.address + - api_field: rules.matches.port + - api_field: selfLink + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_tls_route_generated_meta.yaml b/google/services/networkservices/resource_network_services_tls_route_generated_meta.yaml index d7d8a25b427..5a01838ba65 100644 --- a/google/services/networkservices/resource_network_services_tls_route_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_tls_route_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_network_services_tls_route' -generation_type: 'mmv1' -source_file: 'products/networkservices/TlsRoute.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'TlsRoute' +resource: google_network_services_tls_route +generation_type: mmv1 +source_file: products/networkservices/TlsRoute.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: TlsRoute fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'gateways' - - api_field: 'meshes' - - field: 'name' - provider_only: true - - api_field: 'rules.action.destinations.serviceName' - - api_field: 'rules.action.destinations.weight' - - api_field: 'rules.matches.alpn' - - api_field: 'rules.matches.sniHost' - - api_field: 'selfLink' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: gateways + - api_field: meshes + - field: name + provider_only: true + - api_field: rules.action.destinations.serviceName + - api_field: rules.action.destinations.weight + - api_field: rules.matches.alpn + - api_field: rules.matches.sniHost + - api_field: selfLink + - api_field: updateTime diff --git a/google/services/networkservices/resource_network_services_wasm_plugin_generated_meta.yaml b/google/services/networkservices/resource_network_services_wasm_plugin_generated_meta.yaml index 1c62d5048d8..8d78014ade7 100644 --- a/google/services/networkservices/resource_network_services_wasm_plugin_generated_meta.yaml +++ b/google/services/networkservices/resource_network_services_wasm_plugin_generated_meta.yaml @@ -1,33 +1,44 @@ -resource: 'google_network_services_wasm_plugin' -generation_type: 'mmv1' -source_file: 'products/networkservices/WasmPlugin.yaml' -api_service_name: 'networkservices.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WasmPlugin' +resource: google_network_services_wasm_plugin +generation_type: mmv1 +source_file: products/networkservices/WasmPlugin.yaml +api_service_name: networkservices.googleapis.com +api_version: v1 +api_resource_type_kind: WasmPlugin fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'logConfig.enable' - - api_field: 'logConfig.minLogLevel' - - api_field: 'logConfig.sampleRate' - - api_field: 'mainVersionId' - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'usedBy.name' - - api_field: 'versions.value.createTime' - - api_field: 'versions.value.description' - - api_field: 'versions.value.imageDigest' - - api_field: 'versions.value.imageUri' - - api_field: 'versions.value.labels' - - api_field: 'versions.value.pluginConfigData' - - api_field: 'versions.value.pluginConfigDigest' - - api_field: 'versions.value.pluginConfigUri' - - api_field: 'versions.value.updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: logConfig.enable + - api_field: logConfig.minLogLevel + - api_field: logConfig.sampleRate + - api_field: mainVersionId + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: usedBy.name + - api_field: versions.key + field: versions.version_name + - api_field: versions.value.createTime + field: versions.create_time + - api_field: versions.value.description + field: versions.description + - api_field: versions.value.imageDigest + field: versions.image_digest + - api_field: versions.value.imageUri + field: versions.image_uri + - api_field: versions.value.labels + field: versions.labels + - api_field: versions.value.pluginConfigData + field: versions.plugin_config_data + - api_field: versions.value.pluginConfigDigest + field: versions.plugin_config_digest + - api_field: versions.value.pluginConfigUri + field: versions.plugin_config_uri + - api_field: versions.value.updateTime + field: versions.update_time diff --git a/google/services/notebooks/iam_notebooks_instance_generated_test.go b/google/services/notebooks/iam_notebooks_instance_generated_test.go index e89c8f97d55..d46dddcdce2 100644 --- a/google/services/notebooks/iam_notebooks_instance_generated_test.go +++ b/google/services/notebooks/iam_notebooks_instance_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccNotebooksInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-notebooks-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksInstanceIAMBindingStateID("google_notebooks_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccNotebooksInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-notebooks-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksInstanceIAMBindingStateID("google_notebooks_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccNotebooksInstanceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-notebooks-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksInstanceIAMMemberStateID("google_notebooks_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccNotebooksInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-notebooks-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksInstanceIAMPolicyStateID("google_notebooks_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccNotebooksInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-notebooks-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksInstanceIAMPolicyStateID("google_notebooks_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -260,3 +261,57 @@ resource "google_notebooks_instance_iam_binding" "foo" { } `, context) } + +func generateNotebooksInstanceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + instance_name := tpgresource.GetResourceNameFromSelfLink(rawState["instance_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, instance_name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateNotebooksInstanceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + instance_name := tpgresource.GetResourceNameFromSelfLink(rawState["instance_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, instance_name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateNotebooksInstanceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + instance_name := tpgresource.GetResourceNameFromSelfLink(rawState["instance_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, instance_name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/notebooks/iam_notebooks_runtime_generated_test.go b/google/services/notebooks/iam_notebooks_runtime_generated_test.go index d0b7d4687da..48d76299727 100644 --- a/google/services/notebooks/iam_notebooks_runtime_generated_test.go +++ b/google/services/notebooks/iam_notebooks_runtime_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccNotebooksRuntimeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_runtime_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/runtimes/%s roles/viewer", envvar.GetTestProjectFromEnv(), "us-central1", fmt.Sprintf("tf-test-notebooks-runtime%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksRuntimeIAMBindingStateID("google_notebooks_runtime_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccNotebooksRuntimeIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_runtime_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/runtimes/%s roles/viewer", envvar.GetTestProjectFromEnv(), "us-central1", fmt.Sprintf("tf-test-notebooks-runtime%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksRuntimeIAMBindingStateID("google_notebooks_runtime_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccNotebooksRuntimeIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_runtime_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/runtimes/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "us-central1", fmt.Sprintf("tf-test-notebooks-runtime%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksRuntimeIAMMemberStateID("google_notebooks_runtime_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccNotebooksRuntimeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_runtime_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/runtimes/%s", envvar.GetTestProjectFromEnv(), "us-central1", fmt.Sprintf("tf-test-notebooks-runtime%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksRuntimeIAMPolicyStateID("google_notebooks_runtime_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccNotebooksRuntimeIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_notebooks_runtime_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/runtimes/%s", envvar.GetTestProjectFromEnv(), "us-central1", fmt.Sprintf("tf-test-notebooks-runtime%s", context["random_suffix"])), + ImportStateIdFunc: generateNotebooksRuntimeIAMPolicyStateID("google_notebooks_runtime_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -310,3 +311,57 @@ resource "google_notebooks_runtime_iam_binding" "foo" { } `, context) } + +func generateNotebooksRuntimeIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + runtime_name := tpgresource.GetResourceNameFromSelfLink(rawState["runtime_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/runtimes/%s", project, location, runtime_name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateNotebooksRuntimeIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + runtime_name := tpgresource.GetResourceNameFromSelfLink(rawState["runtime_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/runtimes/%s", project, location, runtime_name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateNotebooksRuntimeIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + runtime_name := tpgresource.GetResourceNameFromSelfLink(rawState["runtime_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/runtimes/%s", project, location, runtime_name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/notebooks/resource_notebooks_environment_generated_meta.yaml b/google/services/notebooks/resource_notebooks_environment_generated_meta.yaml index d506fb10a79..627dd854b6e 100644 --- a/google/services/notebooks/resource_notebooks_environment_generated_meta.yaml +++ b/google/services/notebooks/resource_notebooks_environment_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_notebooks_environment' -generation_type: 'mmv1' -source_file: 'products/notebooks/Environment.yaml' -api_service_name: 'notebooks.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Environment' +resource: google_notebooks_environment +generation_type: mmv1 +source_file: products/notebooks/Environment.yaml +api_service_name: notebooks.googleapis.com +api_version: v1 +api_resource_type_kind: Environment fields: - - api_field: 'containerImage.repository' - - api_field: 'containerImage.tag' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'postStartupScript' - - api_field: 'vmImage.imageFamily' - - api_field: 'vmImage.imageName' - - api_field: 'vmImage.project' + - api_field: containerImage.repository + - api_field: containerImage.tag + - api_field: createTime + - api_field: description + - api_field: displayName + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: postStartupScript + - api_field: vmImage.imageFamily + - api_field: vmImage.imageName + - api_field: vmImage.project diff --git a/google/services/notebooks/resource_notebooks_instance_generated_meta.yaml b/google/services/notebooks/resource_notebooks_instance_generated_meta.yaml index c15ba104d67..86100ec9b06 100644 --- a/google/services/notebooks/resource_notebooks_instance_generated_meta.yaml +++ b/google/services/notebooks/resource_notebooks_instance_generated_meta.yaml @@ -1,56 +1,56 @@ -resource: 'google_notebooks_instance' -generation_type: 'mmv1' -source_file: 'products/notebooks/Instance.yaml' -api_service_name: 'notebooks.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_notebooks_instance +generation_type: mmv1 +source_file: products/notebooks/Instance.yaml +api_service_name: notebooks.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'acceleratorConfig.coreCount' - - api_field: 'acceleratorConfig.type' - - api_field: 'bootDiskSizeGb' - - api_field: 'bootDiskType' - - api_field: 'containerImage.repository' - - api_field: 'containerImage.tag' - - api_field: 'createTime' - - api_field: 'customGpuDriverPath' - - api_field: 'dataDiskSizeGb' - - api_field: 'dataDiskType' - - field: 'desired_state' - provider_only: true - - api_field: 'diskEncryption' - - field: 'effective_labels' - provider_only: true - - api_field: 'installGpuDriver' - - api_field: 'instanceOwners' - - api_field: 'kmsKey' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'machineType' - - api_field: 'metadata' - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'nicType' - - api_field: 'noProxyAccess' - - api_field: 'noPublicIp' - - api_field: 'noRemoveDataDisk' - - api_field: 'postStartupScript' - - api_field: 'proxyUri' - - api_field: 'reservationAffinity.consumeReservationType' - - api_field: 'reservationAffinity.key' - - api_field: 'reservationAffinity.values' - - api_field: 'serviceAccount' - - api_field: 'serviceAccountScopes' - - api_field: 'shieldedInstanceConfig.enableIntegrityMonitoring' - - api_field: 'shieldedInstanceConfig.enableSecureBoot' - - api_field: 'shieldedInstanceConfig.enableVtpm' - - api_field: 'state' - - api_field: 'subnet' - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'vmImage.imageFamily' - - api_field: 'vmImage.imageName' - - api_field: 'vmImage.project' + - api_field: acceleratorConfig.coreCount + - api_field: acceleratorConfig.type + - api_field: bootDiskSizeGb + - api_field: bootDiskType + - api_field: containerImage.repository + - api_field: containerImage.tag + - api_field: createTime + - api_field: customGpuDriverPath + - api_field: dataDiskSizeGb + - api_field: dataDiskType + - field: desired_state + provider_only: true + - api_field: diskEncryption + - field: effective_labels + provider_only: true + - api_field: installGpuDriver + - api_field: instanceOwners + - api_field: kmsKey + - api_field: labels + - field: location + provider_only: true + - api_field: machineType + - api_field: metadata + - field: name + provider_only: true + - api_field: network + - api_field: nicType + - api_field: noProxyAccess + - api_field: noPublicIp + - api_field: noRemoveDataDisk + - api_field: postStartupScript + - api_field: proxyUri + - api_field: reservationAffinity.consumeReservationType + - api_field: reservationAffinity.key + - api_field: reservationAffinity.values + - api_field: serviceAccount + - api_field: serviceAccountScopes + - api_field: shieldedInstanceConfig.enableIntegrityMonitoring + - api_field: shieldedInstanceConfig.enableSecureBoot + - api_field: shieldedInstanceConfig.enableVtpm + - api_field: state + - api_field: subnet + - api_field: tags + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: vmImage.imageFamily + - api_field: vmImage.imageName + - api_field: vmImage.project diff --git a/google/services/notebooks/resource_notebooks_runtime_generated_meta.yaml b/google/services/notebooks/resource_notebooks_runtime_generated_meta.yaml index fe12067ac0d..aa96ee2071d 100644 --- a/google/services/notebooks/resource_notebooks_runtime_generated_meta.yaml +++ b/google/services/notebooks/resource_notebooks_runtime_generated_meta.yaml @@ -1,70 +1,70 @@ -resource: 'google_notebooks_runtime' -generation_type: 'mmv1' -source_file: 'products/notebooks/Runtime.yaml' -api_service_name: 'notebooks.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Runtime' +resource: google_notebooks_runtime +generation_type: mmv1 +source_file: products/notebooks/Runtime.yaml +api_service_name: notebooks.googleapis.com +api_version: v1 +api_resource_type_kind: Runtime fields: - - api_field: 'accessConfig.accessType' - - api_field: 'accessConfig.proxyUri' - - api_field: 'accessConfig.runtimeOwner' - - field: 'effective_labels' - provider_only: true - - api_field: 'healthState' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'metrics.systemMetrics' - - field: 'name' - provider_only: true - - api_field: 'softwareConfig.customGpuDriverPath' - - api_field: 'softwareConfig.enableHealthMonitoring' - - api_field: 'softwareConfig.idleShutdown' - - api_field: 'softwareConfig.idleShutdownTimeout' - - api_field: 'softwareConfig.installGpuDriver' - - api_field: 'softwareConfig.kernels.repository' - - api_field: 'softwareConfig.kernels.tag' - - api_field: 'softwareConfig.notebookUpgradeSchedule' - - api_field: 'softwareConfig.postStartupScript' - - api_field: 'softwareConfig.postStartupScriptBehavior' - - api_field: 'softwareConfig.upgradeable' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'virtualMachine.instanceId' - - api_field: 'virtualMachine.instanceName' - - api_field: 'virtualMachine.virtualMachineConfig.acceleratorConfig.coreCount' - - api_field: 'virtualMachine.virtualMachineConfig.acceleratorConfig.type' - - api_field: 'virtualMachine.virtualMachineConfig.containerImages.repository' - - api_field: 'virtualMachine.virtualMachineConfig.containerImages.tag' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.autoDelete' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.boot' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.deviceName' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.guestOsFeatures' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.index' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.initializeParams.description' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.initializeParams.diskName' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.initializeParams.diskSizeGb' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.initializeParams.diskType' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.initializeParams.labels' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.interface' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.kind' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.licenses' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.mode' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.source' - - api_field: 'virtualMachine.virtualMachineConfig.dataDisk.type' - - api_field: 'virtualMachine.virtualMachineConfig.encryptionConfig.kmsKey' - - api_field: 'virtualMachine.virtualMachineConfig.guestAttributes' - - api_field: 'virtualMachine.virtualMachineConfig.internalIpOnly' - - api_field: 'virtualMachine.virtualMachineConfig.labels' - - api_field: 'virtualMachine.virtualMachineConfig.machineType' - - api_field: 'virtualMachine.virtualMachineConfig.metadata' - - api_field: 'virtualMachine.virtualMachineConfig.network' - - api_field: 'virtualMachine.virtualMachineConfig.nicType' - - api_field: 'virtualMachine.virtualMachineConfig.reservedIpRange' - - api_field: 'virtualMachine.virtualMachineConfig.shieldedInstanceConfig.enableIntegrityMonitoring' - - api_field: 'virtualMachine.virtualMachineConfig.shieldedInstanceConfig.enableSecureBoot' - - api_field: 'virtualMachine.virtualMachineConfig.shieldedInstanceConfig.enableVtpm' - - api_field: 'virtualMachine.virtualMachineConfig.subnet' - - api_field: 'virtualMachine.virtualMachineConfig.tags' - - api_field: 'virtualMachine.virtualMachineConfig.zone' + - api_field: accessConfig.accessType + - api_field: accessConfig.proxyUri + - api_field: accessConfig.runtimeOwner + - field: effective_labels + provider_only: true + - api_field: healthState + - api_field: labels + - field: location + provider_only: true + - api_field: metrics.systemMetrics + - field: name + provider_only: true + - api_field: softwareConfig.customGpuDriverPath + - api_field: softwareConfig.enableHealthMonitoring + - api_field: softwareConfig.idleShutdown + - api_field: softwareConfig.idleShutdownTimeout + - api_field: softwareConfig.installGpuDriver + - api_field: softwareConfig.kernels.repository + - api_field: softwareConfig.kernels.tag + - api_field: softwareConfig.notebookUpgradeSchedule + - api_field: softwareConfig.postStartupScript + - api_field: softwareConfig.postStartupScriptBehavior + - api_field: softwareConfig.upgradeable + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: virtualMachine.instanceId + - api_field: virtualMachine.instanceName + - api_field: virtualMachine.virtualMachineConfig.acceleratorConfig.coreCount + - api_field: virtualMachine.virtualMachineConfig.acceleratorConfig.type + - api_field: virtualMachine.virtualMachineConfig.containerImages.repository + - api_field: virtualMachine.virtualMachineConfig.containerImages.tag + - api_field: virtualMachine.virtualMachineConfig.dataDisk.autoDelete + - api_field: virtualMachine.virtualMachineConfig.dataDisk.boot + - api_field: virtualMachine.virtualMachineConfig.dataDisk.deviceName + - api_field: virtualMachine.virtualMachineConfig.dataDisk.guestOsFeatures + - api_field: virtualMachine.virtualMachineConfig.dataDisk.index + - api_field: virtualMachine.virtualMachineConfig.dataDisk.initializeParams.description + - api_field: virtualMachine.virtualMachineConfig.dataDisk.initializeParams.diskName + - api_field: virtualMachine.virtualMachineConfig.dataDisk.initializeParams.diskSizeGb + - api_field: virtualMachine.virtualMachineConfig.dataDisk.initializeParams.diskType + - api_field: virtualMachine.virtualMachineConfig.dataDisk.initializeParams.labels + - api_field: virtualMachine.virtualMachineConfig.dataDisk.interface + - api_field: virtualMachine.virtualMachineConfig.dataDisk.kind + - api_field: virtualMachine.virtualMachineConfig.dataDisk.licenses + - api_field: virtualMachine.virtualMachineConfig.dataDisk.mode + - api_field: virtualMachine.virtualMachineConfig.dataDisk.source + - api_field: virtualMachine.virtualMachineConfig.dataDisk.type + - api_field: virtualMachine.virtualMachineConfig.encryptionConfig.kmsKey + - api_field: virtualMachine.virtualMachineConfig.guestAttributes + - api_field: virtualMachine.virtualMachineConfig.internalIpOnly + - api_field: virtualMachine.virtualMachineConfig.labels + - api_field: virtualMachine.virtualMachineConfig.machineType + - api_field: virtualMachine.virtualMachineConfig.metadata + - api_field: virtualMachine.virtualMachineConfig.network + - api_field: virtualMachine.virtualMachineConfig.nicType + - api_field: virtualMachine.virtualMachineConfig.reservedIpRange + - api_field: virtualMachine.virtualMachineConfig.shieldedInstanceConfig.enableIntegrityMonitoring + - api_field: virtualMachine.virtualMachineConfig.shieldedInstanceConfig.enableSecureBoot + - api_field: virtualMachine.virtualMachineConfig.shieldedInstanceConfig.enableVtpm + - api_field: virtualMachine.virtualMachineConfig.subnet + - api_field: virtualMachine.virtualMachineConfig.tags + - api_field: virtualMachine.virtualMachineConfig.zone diff --git a/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_meta.yaml b/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_meta.yaml index b2c4e7deb38..706d59b7317 100644 --- a/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_meta.yaml +++ b/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_meta.yaml @@ -1,121 +1,121 @@ -resource: 'google_oracle_database_autonomous_database' -generation_type: 'mmv1' -source_file: 'products/oracledatabase/AutonomousDatabase.yaml' -api_service_name: 'oracledatabase.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AutonomousDatabase' +resource: google_oracle_database_autonomous_database +generation_type: mmv1 +source_file: products/oracledatabase/AutonomousDatabase.yaml +api_service_name: oracledatabase.googleapis.com +api_version: v1 +api_resource_type_kind: AutonomousDatabase autogen_status: true fields: - - api_field: 'adminPassword' - - field: 'autonomous_database_id' - provider_only: true - - api_field: 'cidr' - - api_field: 'createTime' - - api_field: 'database' - - field: 'deletion_protection' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'entitlementId' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'odbNetwork' - - api_field: 'odbSubnet' - - api_field: 'properties.actualUsedDataStorageSizeTb' - - api_field: 'properties.allocatedStorageSizeTb' - - api_field: 'properties.apexDetails.apexVersion' - - api_field: 'properties.apexDetails.ordsVersion' - - api_field: 'properties.arePrimaryAllowlistedIpsUsed' - - api_field: 'properties.autonomousContainerDatabaseId' - - api_field: 'properties.availableUpgradeVersions' - - api_field: 'properties.backupRetentionPeriodDays' - - api_field: 'properties.characterSet' - - api_field: 'properties.computeCount' - - api_field: 'properties.connectionStrings.allConnectionStrings.high' - - api_field: 'properties.connectionStrings.allConnectionStrings.low' - - api_field: 'properties.connectionStrings.allConnectionStrings.medium' - - api_field: 'properties.connectionStrings.dedicated' - - api_field: 'properties.connectionStrings.high' - - api_field: 'properties.connectionStrings.low' - - api_field: 'properties.connectionStrings.medium' - - api_field: 'properties.connectionStrings.profiles.consumerGroup' - - api_field: 'properties.connectionStrings.profiles.displayName' - - api_field: 'properties.connectionStrings.profiles.hostFormat' - - api_field: 'properties.connectionStrings.profiles.isRegional' - - api_field: 'properties.connectionStrings.profiles.protocol' - - api_field: 'properties.connectionStrings.profiles.sessionMode' - - api_field: 'properties.connectionStrings.profiles.syntaxFormat' - - api_field: 'properties.connectionStrings.profiles.tlsAuthentication' - - api_field: 'properties.connectionStrings.profiles.value' - - api_field: 'properties.connectionUrls.apexUri' - - api_field: 'properties.connectionUrls.databaseTransformsUri' - - api_field: 'properties.connectionUrls.graphStudioUri' - - api_field: 'properties.connectionUrls.machineLearningNotebookUri' - - api_field: 'properties.connectionUrls.machineLearningUserManagementUri' - - api_field: 'properties.connectionUrls.mongoDbUri' - - api_field: 'properties.connectionUrls.ordsUri' - - api_field: 'properties.connectionUrls.sqlDevWebUri' - - api_field: 'properties.cpuCoreCount' - - api_field: 'properties.customerContacts.email' - - api_field: 'properties.dataSafeState' - - api_field: 'properties.dataStorageSizeGb' - - api_field: 'properties.dataStorageSizeTb' - - api_field: 'properties.databaseManagementState' - - api_field: 'properties.dbEdition' - - api_field: 'properties.dbVersion' - - api_field: 'properties.dbWorkload' - - api_field: 'properties.failedDataRecoveryDuration' - - api_field: 'properties.isAutoScalingEnabled' - - api_field: 'properties.isLocalDataGuardEnabled' - - api_field: 'properties.isStorageAutoScalingEnabled' - - api_field: 'properties.licenseType' - - api_field: 'properties.lifecycleDetails' - - api_field: 'properties.localAdgAutoFailoverMaxDataLossLimit' - - api_field: 'properties.localDisasterRecoveryType' - - api_field: 'properties.localStandbyDb.dataGuardRoleChangedTime' - - api_field: 'properties.localStandbyDb.disasterRecoveryRoleChangedTime' - - api_field: 'properties.localStandbyDb.lagTimeDuration' - - api_field: 'properties.localStandbyDb.lifecycleDetails' - - api_field: 'properties.localStandbyDb.state' - - api_field: 'properties.maintenanceBeginTime' - - api_field: 'properties.maintenanceEndTime' - - api_field: 'properties.maintenanceScheduleType' - - api_field: 'properties.memoryPerOracleComputeUnitGbs' - - api_field: 'properties.memoryTableGbs' - - api_field: 'properties.mtlsConnectionRequired' - - api_field: 'properties.nCharacterSet' - - api_field: 'properties.nextLongTermBackupTime' - - api_field: 'properties.ociUrl' - - api_field: 'properties.ocid' - - api_field: 'properties.openMode' - - api_field: 'properties.operationsInsightsState' - - api_field: 'properties.peerDbIds' - - api_field: 'properties.permissionLevel' - - api_field: 'properties.privateEndpoint' - - api_field: 'properties.privateEndpointIp' - - api_field: 'properties.privateEndpointLabel' - - api_field: 'properties.refreshableMode' - - api_field: 'properties.refreshableState' - - api_field: 'properties.role' - - api_field: 'properties.scheduledOperationDetails.dayOfWeek' - - api_field: 'properties.scheduledOperationDetails.startTime.hours' - - api_field: 'properties.scheduledOperationDetails.startTime.minutes' - - api_field: 'properties.scheduledOperationDetails.startTime.nanos' - - api_field: 'properties.scheduledOperationDetails.startTime.seconds' - - api_field: 'properties.scheduledOperationDetails.stopTime.hours' - - api_field: 'properties.scheduledOperationDetails.stopTime.minutes' - - api_field: 'properties.scheduledOperationDetails.stopTime.nanos' - - api_field: 'properties.scheduledOperationDetails.stopTime.seconds' - - api_field: 'properties.secretId' - - api_field: 'properties.sqlWebDeveloperUrl' - - api_field: 'properties.state' - - api_field: 'properties.supportedCloneRegions' - - api_field: 'properties.totalAutoBackupStorageSizeGbs' - - api_field: 'properties.usedDataStorageSizeTbs' - - api_field: 'properties.vaultId' - - field: 'terraform_labels' - provider_only: true + - api_field: adminPassword + - field: autonomous_database_id + provider_only: true + - api_field: cidr + - api_field: createTime + - api_field: database + - field: deletion_protection + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: entitlementId + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: network + - api_field: odbNetwork + - api_field: odbSubnet + - api_field: properties.actualUsedDataStorageSizeTb + - api_field: properties.allocatedStorageSizeTb + - api_field: properties.apexDetails.apexVersion + - api_field: properties.apexDetails.ordsVersion + - api_field: properties.arePrimaryAllowlistedIpsUsed + - api_field: properties.autonomousContainerDatabaseId + - api_field: properties.availableUpgradeVersions + - api_field: properties.backupRetentionPeriodDays + - api_field: properties.characterSet + - api_field: properties.computeCount + - api_field: properties.connectionStrings.allConnectionStrings.high + - api_field: properties.connectionStrings.allConnectionStrings.low + - api_field: properties.connectionStrings.allConnectionStrings.medium + - api_field: properties.connectionStrings.dedicated + - api_field: properties.connectionStrings.high + - api_field: properties.connectionStrings.low + - api_field: properties.connectionStrings.medium + - api_field: properties.connectionStrings.profiles.consumerGroup + - api_field: properties.connectionStrings.profiles.displayName + - api_field: properties.connectionStrings.profiles.hostFormat + - api_field: properties.connectionStrings.profiles.isRegional + - api_field: properties.connectionStrings.profiles.protocol + - api_field: properties.connectionStrings.profiles.sessionMode + - api_field: properties.connectionStrings.profiles.syntaxFormat + - api_field: properties.connectionStrings.profiles.tlsAuthentication + - api_field: properties.connectionStrings.profiles.value + - api_field: properties.connectionUrls.apexUri + - api_field: properties.connectionUrls.databaseTransformsUri + - api_field: properties.connectionUrls.graphStudioUri + - api_field: properties.connectionUrls.machineLearningNotebookUri + - api_field: properties.connectionUrls.machineLearningUserManagementUri + - api_field: properties.connectionUrls.mongoDbUri + - api_field: properties.connectionUrls.ordsUri + - api_field: properties.connectionUrls.sqlDevWebUri + - api_field: properties.cpuCoreCount + - api_field: properties.customerContacts.email + - api_field: properties.dataSafeState + - api_field: properties.dataStorageSizeGb + - api_field: properties.dataStorageSizeTb + - api_field: properties.databaseManagementState + - api_field: properties.dbEdition + - api_field: properties.dbVersion + - api_field: properties.dbWorkload + - api_field: properties.failedDataRecoveryDuration + - api_field: properties.isAutoScalingEnabled + - api_field: properties.isLocalDataGuardEnabled + - api_field: properties.isStorageAutoScalingEnabled + - api_field: properties.licenseType + - api_field: properties.lifecycleDetails + - api_field: properties.localAdgAutoFailoverMaxDataLossLimit + - api_field: properties.localDisasterRecoveryType + - api_field: properties.localStandbyDb.dataGuardRoleChangedTime + - api_field: properties.localStandbyDb.disasterRecoveryRoleChangedTime + - api_field: properties.localStandbyDb.lagTimeDuration + - api_field: properties.localStandbyDb.lifecycleDetails + - api_field: properties.localStandbyDb.state + - api_field: properties.maintenanceBeginTime + - api_field: properties.maintenanceEndTime + - api_field: properties.maintenanceScheduleType + - api_field: properties.memoryPerOracleComputeUnitGbs + - api_field: properties.memoryTableGbs + - api_field: properties.mtlsConnectionRequired + - api_field: properties.nCharacterSet + - api_field: properties.nextLongTermBackupTime + - api_field: properties.ociUrl + - api_field: properties.ocid + - api_field: properties.openMode + - api_field: properties.operationsInsightsState + - api_field: properties.peerDbIds + - api_field: properties.permissionLevel + - api_field: properties.privateEndpoint + - api_field: properties.privateEndpointIp + - api_field: properties.privateEndpointLabel + - api_field: properties.refreshableMode + - api_field: properties.refreshableState + - api_field: properties.role + - api_field: properties.scheduledOperationDetails.dayOfWeek + - api_field: properties.scheduledOperationDetails.startTime.hours + - api_field: properties.scheduledOperationDetails.startTime.minutes + - api_field: properties.scheduledOperationDetails.startTime.nanos + - api_field: properties.scheduledOperationDetails.startTime.seconds + - api_field: properties.scheduledOperationDetails.stopTime.hours + - api_field: properties.scheduledOperationDetails.stopTime.minutes + - api_field: properties.scheduledOperationDetails.stopTime.nanos + - api_field: properties.scheduledOperationDetails.stopTime.seconds + - api_field: properties.secretId + - api_field: properties.sqlWebDeveloperUrl + - api_field: properties.state + - api_field: properties.supportedCloneRegions + - api_field: properties.totalAutoBackupStorageSizeGbs + - api_field: properties.usedDataStorageSizeTbs + - api_field: properties.vaultId + - field: terraform_labels + provider_only: true diff --git a/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_meta.yaml b/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_meta.yaml index 4c358ca0c56..1c900642645 100644 --- a/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_meta.yaml +++ b/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_meta.yaml @@ -1,59 +1,59 @@ -resource: 'google_oracle_database_cloud_exadata_infrastructure' -generation_type: 'mmv1' -source_file: 'products/oracledatabase/CloudExadataInfrastructure.yaml' -api_service_name: 'oracledatabase.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CloudExadataInfrastructure' +resource: google_oracle_database_cloud_exadata_infrastructure +generation_type: mmv1 +source_file: products/oracledatabase/CloudExadataInfrastructure.yaml +api_service_name: oracledatabase.googleapis.com +api_version: v1 +api_resource_type_kind: CloudExadataInfrastructure autogen_status: true fields: - - field: 'cloud_exadata_infrastructure_id' - provider_only: true - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'entitlementId' - - api_field: 'gcpOracleZone' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'properties.activatedStorageCount' - - api_field: 'properties.additionalStorageCount' - - api_field: 'properties.availableStorageSizeGb' - - api_field: 'properties.computeCount' - - api_field: 'properties.cpuCount' - - api_field: 'properties.customerContacts.email' - - api_field: 'properties.dataStorageSizeTb' - - api_field: 'properties.dbNodeStorageSizeGb' - - api_field: 'properties.dbServerVersion' - - api_field: 'properties.maintenanceWindow.customActionTimeoutMins' - - api_field: 'properties.maintenanceWindow.daysOfWeek' - - api_field: 'properties.maintenanceWindow.hoursOfDay' - - api_field: 'properties.maintenanceWindow.isCustomActionTimeoutEnabled' - - api_field: 'properties.maintenanceWindow.leadTimeWeek' - - api_field: 'properties.maintenanceWindow.months' - - api_field: 'properties.maintenanceWindow.patchingMode' - - api_field: 'properties.maintenanceWindow.preference' - - api_field: 'properties.maintenanceWindow.weeksOfMonth' - - api_field: 'properties.maxCpuCount' - - api_field: 'properties.maxDataStorageTb' - - api_field: 'properties.maxDbNodeStorageSizeGb' - - api_field: 'properties.maxMemoryGb' - - api_field: 'properties.memorySizeGb' - - api_field: 'properties.monthlyDbServerVersion' - - api_field: 'properties.monthlyStorageServerVersion' - - api_field: 'properties.nextMaintenanceRunId' - - api_field: 'properties.nextMaintenanceRunTime' - - api_field: 'properties.nextSecurityMaintenanceRunTime' - - api_field: 'properties.ociUrl' - - api_field: 'properties.ocid' - - api_field: 'properties.shape' - - api_field: 'properties.state' - - api_field: 'properties.storageCount' - - api_field: 'properties.storageServerVersion' - - api_field: 'properties.totalStorageSizeGb' - - field: 'terraform_labels' - provider_only: true + - field: cloud_exadata_infrastructure_id + provider_only: true + - api_field: createTime + - field: deletion_protection + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: entitlementId + - api_field: gcpOracleZone + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: properties.activatedStorageCount + - api_field: properties.additionalStorageCount + - api_field: properties.availableStorageSizeGb + - api_field: properties.computeCount + - api_field: properties.cpuCount + - api_field: properties.customerContacts.email + - api_field: properties.dataStorageSizeTb + - api_field: properties.dbNodeStorageSizeGb + - api_field: properties.dbServerVersion + - api_field: properties.maintenanceWindow.customActionTimeoutMins + - api_field: properties.maintenanceWindow.daysOfWeek + - api_field: properties.maintenanceWindow.hoursOfDay + - api_field: properties.maintenanceWindow.isCustomActionTimeoutEnabled + - api_field: properties.maintenanceWindow.leadTimeWeek + - api_field: properties.maintenanceWindow.months + - api_field: properties.maintenanceWindow.patchingMode + - api_field: properties.maintenanceWindow.preference + - api_field: properties.maintenanceWindow.weeksOfMonth + - api_field: properties.maxCpuCount + - api_field: properties.maxDataStorageTb + - api_field: properties.maxDbNodeStorageSizeGb + - api_field: properties.maxMemoryGb + - api_field: properties.memorySizeGb + - api_field: properties.monthlyDbServerVersion + - api_field: properties.monthlyStorageServerVersion + - api_field: properties.nextMaintenanceRunId + - api_field: properties.nextMaintenanceRunTime + - api_field: properties.nextSecurityMaintenanceRunTime + - api_field: properties.ociUrl + - api_field: properties.ocid + - api_field: properties.shape + - api_field: properties.state + - api_field: properties.storageCount + - api_field: properties.storageServerVersion + - api_field: properties.totalStorageSizeGb + - field: terraform_labels + provider_only: true diff --git a/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_meta.yaml b/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_meta.yaml index f4d0830eeb6..aa51252d808 100644 --- a/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_meta.yaml +++ b/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_meta.yaml @@ -1,65 +1,65 @@ -resource: 'google_oracle_database_cloud_vm_cluster' -generation_type: 'mmv1' -source_file: 'products/oracledatabase/CloudVmCluster.yaml' -api_service_name: 'oracledatabase.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CloudVmCluster' +resource: google_oracle_database_cloud_vm_cluster +generation_type: mmv1 +source_file: products/oracledatabase/CloudVmCluster.yaml +api_service_name: oracledatabase.googleapis.com +api_version: v1 +api_resource_type_kind: CloudVmCluster autogen_status: true fields: - - api_field: 'backupOdbSubnet' - - api_field: 'backupSubnetCidr' - - api_field: 'cidr' - - field: 'cloud_vm_cluster_id' - provider_only: true - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'exadataInfrastructure' - - api_field: 'gcpOracleZone' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'odbNetwork' - - api_field: 'odbSubnet' - - api_field: 'properties.clusterName' - - api_field: 'properties.compartmentId' - - api_field: 'properties.cpuCoreCount' - - api_field: 'properties.dataStorageSizeTb' - - api_field: 'properties.dbNodeStorageSizeGb' - - api_field: 'properties.dbServerOcids' - - api_field: 'properties.diagnosticsDataCollectionOptions.diagnosticsEventsEnabled' - - api_field: 'properties.diagnosticsDataCollectionOptions.healthMonitoringEnabled' - - api_field: 'properties.diagnosticsDataCollectionOptions.incidentLogsEnabled' - - api_field: 'properties.diskRedundancy' - - api_field: 'properties.dnsListenerIp' - - api_field: 'properties.domain' - - api_field: 'properties.giVersion' - - api_field: 'properties.hostname' - - api_field: 'properties.hostnamePrefix' - - api_field: 'properties.licenseType' - - api_field: 'properties.localBackupEnabled' - - api_field: 'properties.memorySizeGb' - - api_field: 'properties.nodeCount' - - api_field: 'properties.ociUrl' - - api_field: 'properties.ocid' - - api_field: 'properties.ocpuCount' - - api_field: 'properties.scanDns' - - api_field: 'properties.scanDnsRecordId' - - api_field: 'properties.scanIpIds' - - api_field: 'properties.scanListenerPortTcp' - - api_field: 'properties.scanListenerPortTcpSsl' - - api_field: 'properties.shape' - - api_field: 'properties.sparseDiskgroupEnabled' - - api_field: 'properties.sshPublicKeys' - - api_field: 'properties.state' - - api_field: 'properties.storageSizeGb' - - api_field: 'properties.systemVersion' - - api_field: 'properties.timeZone.id' - - api_field: 'properties.timeZone.version' - - field: 'terraform_labels' - provider_only: true + - api_field: backupOdbSubnet + - api_field: backupSubnetCidr + - api_field: cidr + - field: cloud_vm_cluster_id + provider_only: true + - api_field: createTime + - field: deletion_protection + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: exadataInfrastructure + - api_field: gcpOracleZone + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: network + - api_field: odbNetwork + - api_field: odbSubnet + - api_field: properties.clusterName + - api_field: properties.compartmentId + - api_field: properties.cpuCoreCount + - api_field: properties.dataStorageSizeTb + - api_field: properties.dbNodeStorageSizeGb + - api_field: properties.dbServerOcids + - api_field: properties.diagnosticsDataCollectionOptions.diagnosticsEventsEnabled + - api_field: properties.diagnosticsDataCollectionOptions.healthMonitoringEnabled + - api_field: properties.diagnosticsDataCollectionOptions.incidentLogsEnabled + - api_field: properties.diskRedundancy + - api_field: properties.dnsListenerIp + - api_field: properties.domain + - api_field: properties.giVersion + - api_field: properties.hostname + - api_field: properties.hostnamePrefix + - api_field: properties.licenseType + - api_field: properties.localBackupEnabled + - api_field: properties.memorySizeGb + - api_field: properties.nodeCount + - api_field: properties.ociUrl + - api_field: properties.ocid + - api_field: properties.ocpuCount + - api_field: properties.scanDns + - api_field: properties.scanDnsRecordId + - api_field: properties.scanIpIds + - api_field: properties.scanListenerPortTcp + - api_field: properties.scanListenerPortTcpSsl + - api_field: properties.shape + - api_field: properties.sparseDiskgroupEnabled + - api_field: properties.sshPublicKeys + - api_field: properties.state + - api_field: properties.storageSizeGb + - api_field: properties.systemVersion + - api_field: properties.timeZone.id + - api_field: properties.timeZone.version + - field: terraform_labels + provider_only: true diff --git a/google/services/oracledatabase/resource_oracle_database_db_system_generated_meta.yaml b/google/services/oracledatabase/resource_oracle_database_db_system_generated_meta.yaml index bfd1d768890..550b1736b27 100644 --- a/google/services/oracledatabase/resource_oracle_database_db_system_generated_meta.yaml +++ b/google/services/oracledatabase/resource_oracle_database_db_system_generated_meta.yaml @@ -1,75 +1,75 @@ -resource: 'google_oracle_database_db_system' -generation_type: 'mmv1' -source_file: 'products/oracledatabase/DbSystem.yaml' -api_service_name: 'oracledatabase.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DbSystem' +resource: google_oracle_database_db_system +generation_type: mmv1 +source_file: products/oracledatabase/DbSystem.yaml +api_service_name: oracledatabase.googleapis.com +api_version: v1 +api_resource_type_kind: DbSystem autogen_status: true fields: - - api_field: 'createTime' - - field: 'db_system_id' - provider_only: true - - field: 'deletion_protection' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'entitlementId' - - api_field: 'gcpOracleZone' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'ociUrl' - - api_field: 'odbNetwork' - - api_field: 'odbSubnet' - - api_field: 'properties.computeCount' - - api_field: 'properties.computeModel' - - api_field: 'properties.dataCollectionOptions.isDiagnosticsEventsEnabled' - - api_field: 'properties.dataCollectionOptions.isIncidentLogsEnabled' - - api_field: 'properties.dataStorageSizeGb' - - api_field: 'properties.databaseEdition' - - api_field: 'properties.dbHome.database.adminPassword' - - api_field: 'properties.dbHome.database.characterSet' - - api_field: 'properties.dbHome.database.createTime' - - api_field: 'properties.dbHome.database.databaseId' - - api_field: 'properties.dbHome.database.dbHomeName' - - api_field: 'properties.dbHome.database.dbName' - - api_field: 'properties.dbHome.database.dbUniqueName' - - api_field: 'properties.dbHome.database.gcpOracleZone' - - api_field: 'properties.dbHome.database.name' - - api_field: 'properties.dbHome.database.ncharacterSet' - - api_field: 'properties.dbHome.database.ociUrl' - - api_field: 'properties.dbHome.database.opsInsightsStatus' - - api_field: 'properties.dbHome.database.properties.databaseManagementConfig.managementState' - - api_field: 'properties.dbHome.database.properties.databaseManagementConfig.managementType' - - api_field: 'properties.dbHome.database.properties.dbBackupConfig.autoBackupEnabled' - - api_field: 'properties.dbHome.database.properties.dbBackupConfig.autoFullBackupDay' - - api_field: 'properties.dbHome.database.properties.dbBackupConfig.autoFullBackupWindow' - - api_field: 'properties.dbHome.database.properties.dbBackupConfig.autoIncrementalBackupWindow' - - api_field: 'properties.dbHome.database.properties.dbBackupConfig.backupDeletionPolicy' - - api_field: 'properties.dbHome.database.properties.dbBackupConfig.backupDestinationDetails.type' - - api_field: 'properties.dbHome.database.properties.dbBackupConfig.retentionPeriodDays' - - api_field: 'properties.dbHome.database.properties.dbVersion' - - api_field: 'properties.dbHome.database.properties.state' - - api_field: 'properties.dbHome.database.tdeWalletPassword' - - api_field: 'properties.dbHome.dbVersion' - - api_field: 'properties.dbHome.displayName' - - api_field: 'properties.dbHome.isUnifiedAuditingEnabled' - - api_field: 'properties.dbSystemOptions.storageManagement' - - api_field: 'properties.domain' - - api_field: 'properties.hostname' - - api_field: 'properties.hostnamePrefix' - - api_field: 'properties.initialDataStorageSizeGb' - - api_field: 'properties.licenseModel' - - api_field: 'properties.lifecycleState' - - api_field: 'properties.memorySizeGb' - - api_field: 'properties.nodeCount' - - api_field: 'properties.ocid' - - api_field: 'properties.privateIp' - - api_field: 'properties.recoStorageSizeGb' - - api_field: 'properties.shape' - - api_field: 'properties.sshPublicKeys' - - api_field: 'properties.timeZone.id' - - field: 'terraform_labels' - provider_only: true + - api_field: createTime + - field: db_system_id + provider_only: true + - field: deletion_protection + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: entitlementId + - api_field: gcpOracleZone + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: ociUrl + - api_field: odbNetwork + - api_field: odbSubnet + - api_field: properties.computeCount + - api_field: properties.computeModel + - api_field: properties.dataCollectionOptions.isDiagnosticsEventsEnabled + - api_field: properties.dataCollectionOptions.isIncidentLogsEnabled + - api_field: properties.dataStorageSizeGb + - api_field: properties.databaseEdition + - api_field: properties.dbHome.database.adminPassword + - api_field: properties.dbHome.database.characterSet + - api_field: properties.dbHome.database.createTime + - api_field: properties.dbHome.database.databaseId + - api_field: properties.dbHome.database.dbHomeName + - api_field: properties.dbHome.database.dbName + - api_field: properties.dbHome.database.dbUniqueName + - api_field: properties.dbHome.database.gcpOracleZone + - api_field: properties.dbHome.database.name + - api_field: properties.dbHome.database.ncharacterSet + - api_field: properties.dbHome.database.ociUrl + - api_field: properties.dbHome.database.opsInsightsStatus + - api_field: properties.dbHome.database.properties.databaseManagementConfig.managementState + - api_field: properties.dbHome.database.properties.databaseManagementConfig.managementType + - api_field: properties.dbHome.database.properties.dbBackupConfig.autoBackupEnabled + - api_field: properties.dbHome.database.properties.dbBackupConfig.autoFullBackupDay + - api_field: properties.dbHome.database.properties.dbBackupConfig.autoFullBackupWindow + - api_field: properties.dbHome.database.properties.dbBackupConfig.autoIncrementalBackupWindow + - api_field: properties.dbHome.database.properties.dbBackupConfig.backupDeletionPolicy + - api_field: properties.dbHome.database.properties.dbBackupConfig.backupDestinationDetails.type + - api_field: properties.dbHome.database.properties.dbBackupConfig.retentionPeriodDays + - api_field: properties.dbHome.database.properties.dbVersion + - api_field: properties.dbHome.database.properties.state + - api_field: properties.dbHome.database.tdeWalletPassword + - api_field: properties.dbHome.dbVersion + - api_field: properties.dbHome.displayName + - api_field: properties.dbHome.isUnifiedAuditingEnabled + - api_field: properties.dbSystemOptions.storageManagement + - api_field: properties.domain + - api_field: properties.hostname + - api_field: properties.hostnamePrefix + - api_field: properties.initialDataStorageSizeGb + - api_field: properties.licenseModel + - api_field: properties.lifecycleState + - api_field: properties.memorySizeGb + - api_field: properties.nodeCount + - api_field: properties.ocid + - api_field: properties.privateIp + - api_field: properties.recoStorageSizeGb + - api_field: properties.shape + - api_field: properties.sshPublicKeys + - api_field: properties.timeZone.id + - field: terraform_labels + provider_only: true diff --git a/google/services/oracledatabase/resource_oracle_database_exascale_db_storage_vault_generated_meta.yaml b/google/services/oracledatabase/resource_oracle_database_exascale_db_storage_vault_generated_meta.yaml index a8cd1fa17a4..43b9a86a52e 100644 --- a/google/services/oracledatabase/resource_oracle_database_exascale_db_storage_vault_generated_meta.yaml +++ b/google/services/oracledatabase/resource_oracle_database_exascale_db_storage_vault_generated_meta.yaml @@ -1,36 +1,36 @@ -resource: 'google_oracle_database_exascale_db_storage_vault' -generation_type: 'mmv1' -source_file: 'products/oracledatabase/ExascaleDbStorageVault.yaml' -api_service_name: 'oracledatabase.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ExascaleDbStorageVault' +resource: google_oracle_database_exascale_db_storage_vault +generation_type: mmv1 +source_file: products/oracledatabase/ExascaleDbStorageVault.yaml +api_service_name: oracledatabase.googleapis.com +api_version: v1 +api_resource_type_kind: ExascaleDbStorageVault autogen_status: true fields: - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'entitlementId' - - field: 'exascale_db_storage_vault_id' - provider_only: true - - api_field: 'gcpOracleZone' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'properties.additionalFlashCachePercent' - - api_field: 'properties.attachedShapeAttributes' - - api_field: 'properties.availableShapeAttributes' - - api_field: 'properties.exascaleDbStorageDetails.availableSizeGbs' - - api_field: 'properties.exascaleDbStorageDetails.totalSizeGbs' - - api_field: 'properties.ociUri' - - api_field: 'properties.ocid' - - api_field: 'properties.state' - - api_field: 'properties.timeZone.id' - - api_field: 'properties.timeZone.version' - - api_field: 'properties.vmClusterCount' - - api_field: 'properties.vmClusterIds' - - field: 'terraform_labels' - provider_only: true + - api_field: createTime + - field: deletion_protection + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: entitlementId + - field: exascale_db_storage_vault_id + provider_only: true + - api_field: gcpOracleZone + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: properties.additionalFlashCachePercent + - api_field: properties.attachedShapeAttributes + - api_field: properties.availableShapeAttributes + - api_field: properties.exascaleDbStorageDetails.availableSizeGbs + - api_field: properties.exascaleDbStorageDetails.totalSizeGbs + - api_field: properties.ociUri + - api_field: properties.ocid + - api_field: properties.state + - api_field: properties.timeZone.id + - api_field: properties.timeZone.version + - api_field: properties.vmClusterCount + - api_field: properties.vmClusterIds + - field: terraform_labels + provider_only: true diff --git a/google/services/oracledatabase/resource_oracle_database_odb_network_generated_meta.yaml b/google/services/oracledatabase/resource_oracle_database_odb_network_generated_meta.yaml index 49659efb354..56cdfd12686 100644 --- a/google/services/oracledatabase/resource_oracle_database_odb_network_generated_meta.yaml +++ b/google/services/oracledatabase/resource_oracle_database_odb_network_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_oracle_database_odb_network' -generation_type: 'mmv1' -source_file: 'products/oracledatabase/OdbNetwork.yaml' -api_service_name: 'oracledatabase.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'OdbNetwork' +resource: google_oracle_database_odb_network +generation_type: mmv1 +source_file: products/oracledatabase/OdbNetwork.yaml +api_service_name: oracledatabase.googleapis.com +api_version: v1 +api_resource_type_kind: OdbNetwork autogen_status: true fields: - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'entitlementId' - - api_field: 'gcpOracleZone' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - field: 'odb_network_id' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: createTime + - field: deletion_protection + provider_only: true + - field: effective_labels + provider_only: true + - api_field: entitlementId + - api_field: gcpOracleZone + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: network + - field: odb_network_id + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true diff --git a/google/services/oracledatabase/resource_oracle_database_odb_subnet_generated_meta.yaml b/google/services/oracledatabase/resource_oracle_database_odb_subnet_generated_meta.yaml index 69864eee782..476c92c0a30 100644 --- a/google/services/oracledatabase/resource_oracle_database_odb_subnet_generated_meta.yaml +++ b/google/services/oracledatabase/resource_oracle_database_odb_subnet_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_oracle_database_odb_subnet' -generation_type: 'mmv1' -source_file: 'products/oracledatabase/OdbSubnet.yaml' -api_service_name: 'oracledatabase.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'OdbSubnet' +resource: google_oracle_database_odb_subnet +generation_type: mmv1 +source_file: products/oracledatabase/OdbSubnet.yaml +api_service_name: oracledatabase.googleapis.com +api_version: v1 +api_resource_type_kind: OdbSubnet autogen_status: true fields: - - api_field: 'cidrRange' - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'odb_subnet_id' - provider_only: true - - field: 'odbnetwork' - provider_only: true - - api_field: 'purpose' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: cidrRange + - api_field: createTime + - field: deletion_protection + provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: odb_subnet_id + provider_only: true + - field: odbnetwork + provider_only: true + - api_field: purpose + - api_field: state + - field: terraform_labels + provider_only: true diff --git a/google/services/orgpolicy/resource_org_policy_custom_constraint_generated_meta.yaml b/google/services/orgpolicy/resource_org_policy_custom_constraint_generated_meta.yaml index 6d5f62579b0..fd00d0b9e5b 100644 --- a/google/services/orgpolicy/resource_org_policy_custom_constraint_generated_meta.yaml +++ b/google/services/orgpolicy/resource_org_policy_custom_constraint_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_org_policy_custom_constraint' -generation_type: 'mmv1' -source_file: 'products/orgpolicy/CustomConstraint.yaml' -api_service_name: 'orgpolicy.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'CustomConstraint' +resource: google_org_policy_custom_constraint +generation_type: mmv1 +source_file: products/orgpolicy/CustomConstraint.yaml +api_service_name: orgpolicy.googleapis.com +api_version: v2 +api_resource_type_kind: CustomConstraint fields: - - api_field: 'actionType' - - api_field: 'condition' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'methodTypes' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'resourceTypes' - - api_field: 'updateTime' + - api_field: actionType + - api_field: condition + - api_field: description + - api_field: displayName + - api_field: methodTypes + - api_field: name + - field: parent + provider_only: true + - api_field: resourceTypes + - api_field: updateTime diff --git a/google/services/orgpolicy/resource_org_policy_policy_generated_meta.yaml b/google/services/orgpolicy/resource_org_policy_policy_generated_meta.yaml index d497773590b..bd5f1d2b376 100644 --- a/google/services/orgpolicy/resource_org_policy_policy_generated_meta.yaml +++ b/google/services/orgpolicy/resource_org_policy_policy_generated_meta.yaml @@ -1,45 +1,45 @@ -resource: 'google_org_policy_policy' -generation_type: 'mmv1' -source_file: 'products/orgpolicy/Policy.yaml' -api_service_name: 'orgpolicy.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Policy' +resource: google_org_policy_policy +generation_type: mmv1 +source_file: products/orgpolicy/Policy.yaml +api_service_name: orgpolicy.googleapis.com +api_version: v2 +api_resource_type_kind: Policy api_variant_patterns: - - 'folders/{folder}/policies/{policy}' - - 'organizations/{organization}/policies/{policy}' - - 'projects/{project}/policies/{policy}' + - folders/{folder}/policies/{policy} + - organizations/{organization}/policies/{policy} + - projects/{project}/policies/{policy} fields: - - api_field: 'dryRunSpec.etag' - - api_field: 'dryRunSpec.inheritFromParent' - - api_field: 'dryRunSpec.reset' - - api_field: 'dryRunSpec.rules.allowAll' - - api_field: 'dryRunSpec.rules.condition.description' - - api_field: 'dryRunSpec.rules.condition.expression' - - api_field: 'dryRunSpec.rules.condition.location' - - api_field: 'dryRunSpec.rules.condition.title' - - api_field: 'dryRunSpec.rules.denyAll' - - api_field: 'dryRunSpec.rules.enforce' - - api_field: 'dryRunSpec.rules.parameters' - json: true - - api_field: 'dryRunSpec.rules.values.allowedValues' - - api_field: 'dryRunSpec.rules.values.deniedValues' - - api_field: 'dryRunSpec.updateTime' - - api_field: 'etag' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'spec.etag' - - api_field: 'spec.inheritFromParent' - - api_field: 'spec.reset' - - api_field: 'spec.rules.allowAll' - - api_field: 'spec.rules.condition.description' - - api_field: 'spec.rules.condition.expression' - - api_field: 'spec.rules.condition.location' - - api_field: 'spec.rules.condition.title' - - api_field: 'spec.rules.denyAll' - - api_field: 'spec.rules.enforce' - - api_field: 'spec.rules.parameters' - json: true - - api_field: 'spec.rules.values.allowedValues' - - api_field: 'spec.rules.values.deniedValues' - - api_field: 'spec.updateTime' + - api_field: dryRunSpec.etag + - api_field: dryRunSpec.inheritFromParent + - api_field: dryRunSpec.reset + - api_field: dryRunSpec.rules.allowAll + - api_field: dryRunSpec.rules.condition.description + - api_field: dryRunSpec.rules.condition.expression + - api_field: dryRunSpec.rules.condition.location + - api_field: dryRunSpec.rules.condition.title + - api_field: dryRunSpec.rules.denyAll + - api_field: dryRunSpec.rules.enforce + - api_field: dryRunSpec.rules.parameters + json: true + - api_field: dryRunSpec.rules.values.allowedValues + - api_field: dryRunSpec.rules.values.deniedValues + - api_field: dryRunSpec.updateTime + - api_field: etag + - api_field: name + - field: parent + provider_only: true + - api_field: spec.etag + - api_field: spec.inheritFromParent + - api_field: spec.reset + - api_field: spec.rules.allowAll + - api_field: spec.rules.condition.description + - api_field: spec.rules.condition.expression + - api_field: spec.rules.condition.location + - api_field: spec.rules.condition.title + - api_field: spec.rules.denyAll + - api_field: spec.rules.enforce + - api_field: spec.rules.parameters + json: true + - api_field: spec.rules.values.allowedValues + - api_field: spec.rules.values.deniedValues + - api_field: spec.updateTime diff --git a/google/services/osconfig/resource_os_config_patch_deployment_generated_meta.yaml b/google/services/osconfig/resource_os_config_patch_deployment_generated_meta.yaml index 173c1de2a50..a01a40f223a 100644 --- a/google/services/osconfig/resource_os_config_patch_deployment_generated_meta.yaml +++ b/google/services/osconfig/resource_os_config_patch_deployment_generated_meta.yaml @@ -1,83 +1,83 @@ -resource: 'google_os_config_patch_deployment' -generation_type: 'mmv1' -source_file: 'products/osconfig/PatchDeployment.yaml' -api_service_name: 'osconfig.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PatchDeployment' +resource: google_os_config_patch_deployment +generation_type: mmv1 +source_file: products/osconfig/PatchDeployment.yaml +api_service_name: osconfig.googleapis.com +api_version: v1 +api_resource_type_kind: PatchDeployment fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'duration' - - api_field: 'instanceFilter.all' - - api_field: 'instanceFilter.groupLabels.labels' - - api_field: 'instanceFilter.instanceNamePrefixes' - - api_field: 'instanceFilter.instances' - - api_field: 'instanceFilter.zones' - - api_field: 'lastExecuteTime' - - api_field: 'name' - - api_field: 'oneTimeSchedule.executeTime' - - api_field: 'patchConfig.apt.excludes' - - api_field: 'patchConfig.apt.exclusivePackages' - - api_field: 'patchConfig.apt.type' - - api_field: 'patchConfig.goo.enabled' - - api_field: 'patchConfig.migInstancesAllowed' - - api_field: 'patchConfig.postStep.linuxExecStepConfig.allowedSuccessCodes' - - api_field: 'patchConfig.postStep.linuxExecStepConfig.gcsObject.bucket' - - api_field: 'patchConfig.postStep.linuxExecStepConfig.gcsObject.generationNumber' - - api_field: 'patchConfig.postStep.linuxExecStepConfig.gcsObject.object' - - api_field: 'patchConfig.postStep.linuxExecStepConfig.interpreter' - - api_field: 'patchConfig.postStep.linuxExecStepConfig.localPath' - - api_field: 'patchConfig.postStep.windowsExecStepConfig.allowedSuccessCodes' - - api_field: 'patchConfig.postStep.windowsExecStepConfig.gcsObject.bucket' - - api_field: 'patchConfig.postStep.windowsExecStepConfig.gcsObject.generationNumber' - - api_field: 'patchConfig.postStep.windowsExecStepConfig.gcsObject.object' - - api_field: 'patchConfig.postStep.windowsExecStepConfig.interpreter' - - api_field: 'patchConfig.postStep.windowsExecStepConfig.localPath' - - api_field: 'patchConfig.preStep.linuxExecStepConfig.allowedSuccessCodes' - - api_field: 'patchConfig.preStep.linuxExecStepConfig.gcsObject.bucket' - - api_field: 'patchConfig.preStep.linuxExecStepConfig.gcsObject.generationNumber' - - api_field: 'patchConfig.preStep.linuxExecStepConfig.gcsObject.object' - - api_field: 'patchConfig.preStep.linuxExecStepConfig.interpreter' - - api_field: 'patchConfig.preStep.linuxExecStepConfig.localPath' - - api_field: 'patchConfig.preStep.windowsExecStepConfig.allowedSuccessCodes' - - api_field: 'patchConfig.preStep.windowsExecStepConfig.gcsObject.bucket' - - api_field: 'patchConfig.preStep.windowsExecStepConfig.gcsObject.generationNumber' - - api_field: 'patchConfig.preStep.windowsExecStepConfig.gcsObject.object' - - api_field: 'patchConfig.preStep.windowsExecStepConfig.interpreter' - - api_field: 'patchConfig.preStep.windowsExecStepConfig.localPath' - - api_field: 'patchConfig.rebootConfig' - - api_field: 'patchConfig.windowsUpdate.classifications' - - api_field: 'patchConfig.windowsUpdate.excludes' - - api_field: 'patchConfig.windowsUpdate.exclusivePatches' - - api_field: 'patchConfig.yum.excludes' - - api_field: 'patchConfig.yum.exclusivePackages' - - api_field: 'patchConfig.yum.minimal' - - api_field: 'patchConfig.yum.security' - - api_field: 'patchConfig.zypper.categories' - - api_field: 'patchConfig.zypper.excludes' - - api_field: 'patchConfig.zypper.exclusivePatches' - - api_field: 'patchConfig.zypper.severities' - - api_field: 'patchConfig.zypper.withOptional' - - api_field: 'patchConfig.zypper.withUpdate' - - field: 'patch_deployment_id' - provider_only: true - - api_field: 'recurringSchedule.endTime' - - api_field: 'recurringSchedule.lastExecuteTime' - - api_field: 'recurringSchedule.monthly.monthDay' - - api_field: 'recurringSchedule.monthly.weekDayOfMonth.dayOfWeek' - - api_field: 'recurringSchedule.monthly.weekDayOfMonth.dayOffset' - - api_field: 'recurringSchedule.monthly.weekDayOfMonth.weekOrdinal' - - api_field: 'recurringSchedule.nextExecuteTime' - - api_field: 'recurringSchedule.startTime' - - api_field: 'recurringSchedule.timeOfDay.hours' - - api_field: 'recurringSchedule.timeOfDay.minutes' - - api_field: 'recurringSchedule.timeOfDay.nanos' - - api_field: 'recurringSchedule.timeOfDay.seconds' - - api_field: 'recurringSchedule.timeZone.id' - - api_field: 'recurringSchedule.timeZone.version' - - api_field: 'recurringSchedule.weekly.dayOfWeek' - - api_field: 'rollout.disruptionBudget.fixed' - - api_field: 'rollout.disruptionBudget.percent' - field: 'rollout.disruption_budget.percentage' - - api_field: 'rollout.mode' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: duration + - api_field: instanceFilter.all + - api_field: instanceFilter.groupLabels.labels + - api_field: instanceFilter.instanceNamePrefixes + - api_field: instanceFilter.instances + - api_field: instanceFilter.zones + - api_field: lastExecuteTime + - api_field: name + - api_field: oneTimeSchedule.executeTime + - api_field: patchConfig.apt.excludes + - api_field: patchConfig.apt.exclusivePackages + - api_field: patchConfig.apt.type + - api_field: patchConfig.goo.enabled + - api_field: patchConfig.migInstancesAllowed + - api_field: patchConfig.postStep.linuxExecStepConfig.allowedSuccessCodes + - api_field: patchConfig.postStep.linuxExecStepConfig.gcsObject.bucket + - api_field: patchConfig.postStep.linuxExecStepConfig.gcsObject.generationNumber + - api_field: patchConfig.postStep.linuxExecStepConfig.gcsObject.object + - api_field: patchConfig.postStep.linuxExecStepConfig.interpreter + - api_field: patchConfig.postStep.linuxExecStepConfig.localPath + - api_field: patchConfig.postStep.windowsExecStepConfig.allowedSuccessCodes + - api_field: patchConfig.postStep.windowsExecStepConfig.gcsObject.bucket + - api_field: patchConfig.postStep.windowsExecStepConfig.gcsObject.generationNumber + - api_field: patchConfig.postStep.windowsExecStepConfig.gcsObject.object + - api_field: patchConfig.postStep.windowsExecStepConfig.interpreter + - api_field: patchConfig.postStep.windowsExecStepConfig.localPath + - api_field: patchConfig.preStep.linuxExecStepConfig.allowedSuccessCodes + - api_field: patchConfig.preStep.linuxExecStepConfig.gcsObject.bucket + - api_field: patchConfig.preStep.linuxExecStepConfig.gcsObject.generationNumber + - api_field: patchConfig.preStep.linuxExecStepConfig.gcsObject.object + - api_field: patchConfig.preStep.linuxExecStepConfig.interpreter + - api_field: patchConfig.preStep.linuxExecStepConfig.localPath + - api_field: patchConfig.preStep.windowsExecStepConfig.allowedSuccessCodes + - api_field: patchConfig.preStep.windowsExecStepConfig.gcsObject.bucket + - api_field: patchConfig.preStep.windowsExecStepConfig.gcsObject.generationNumber + - api_field: patchConfig.preStep.windowsExecStepConfig.gcsObject.object + - api_field: patchConfig.preStep.windowsExecStepConfig.interpreter + - api_field: patchConfig.preStep.windowsExecStepConfig.localPath + - api_field: patchConfig.rebootConfig + - api_field: patchConfig.windowsUpdate.classifications + - api_field: patchConfig.windowsUpdate.excludes + - api_field: patchConfig.windowsUpdate.exclusivePatches + - api_field: patchConfig.yum.excludes + - api_field: patchConfig.yum.exclusivePackages + - api_field: patchConfig.yum.minimal + - api_field: patchConfig.yum.security + - api_field: patchConfig.zypper.categories + - api_field: patchConfig.zypper.excludes + - api_field: patchConfig.zypper.exclusivePatches + - api_field: patchConfig.zypper.severities + - api_field: patchConfig.zypper.withOptional + - api_field: patchConfig.zypper.withUpdate + - field: patch_deployment_id + provider_only: true + - api_field: recurringSchedule.endTime + - api_field: recurringSchedule.lastExecuteTime + - api_field: recurringSchedule.monthly.monthDay + - api_field: recurringSchedule.monthly.weekDayOfMonth.dayOfWeek + - api_field: recurringSchedule.monthly.weekDayOfMonth.dayOffset + - api_field: recurringSchedule.monthly.weekDayOfMonth.weekOrdinal + - api_field: recurringSchedule.nextExecuteTime + - api_field: recurringSchedule.startTime + - api_field: recurringSchedule.timeOfDay.hours + - api_field: recurringSchedule.timeOfDay.minutes + - api_field: recurringSchedule.timeOfDay.nanos + - api_field: recurringSchedule.timeOfDay.seconds + - api_field: recurringSchedule.timeZone.id + - api_field: recurringSchedule.timeZone.version + - api_field: recurringSchedule.weekly.dayOfWeek + - api_field: rollout.disruptionBudget.fixed + - api_field: rollout.disruptionBudget.percent + field: rollout.disruption_budget.percentage + - api_field: rollout.mode + - api_field: updateTime diff --git a/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_folder_generated_meta.yaml b/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_folder_generated_meta.yaml index 060e7bbe986..e6b2ae7d3a4 100644 --- a/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_folder_generated_meta.yaml +++ b/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_folder_generated_meta.yaml @@ -1,155 +1,155 @@ -resource: 'google_os_config_v2_policy_orchestrator_for_folder' -generation_type: 'mmv1' -source_file: 'products/osconfigv2/PolicyOrchestratorForFolder.yaml' -api_service_name: 'osconfig.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'PolicyOrchestrator' +resource: google_os_config_v2_policy_orchestrator_for_folder +generation_type: mmv1 +source_file: products/osconfigv2/PolicyOrchestratorForFolder.yaml +api_service_name: osconfig.googleapis.com +api_version: v2 +api_resource_type_kind: PolicyOrchestrator api_variant_patterns: - - 'folders/{folder}/locations/{location}/policyOrchestrators/{policyOrchestrator}' + - folders/{folder}/locations/{location}/policyOrchestrators/{policyOrchestrator} autogen_status: true fields: - - api_field: 'action' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - field: 'folder_id' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'orchestratedResource.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.baseline' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.deleted' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.description' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.etag' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.all' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.exclusionLabels.labels' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inclusionLabels.labels' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osShortName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osVersion' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.allowNoResourceGroupMatch' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.description' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.mode' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osShortName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osVersion' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.args' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.interpreter' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.outputFilePath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.script' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.args' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.interpreter' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.outputFilePath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.script' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.content' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.path' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.permissions' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.state' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.apt.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.pullDeps' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.desiredState' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.googet.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.properties' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.pullDeps' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.yum.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.zypper.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.archiveType' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.components' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.distribution' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.gpgKey' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.url' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.baseUrl' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.displayName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.gpgKeys' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.baseUrl' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.displayName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.gpgKeys' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.reconciling' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.revisionCreateTime' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.revisionId' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.fixed' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.percent' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.minWaitDuration' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rolloutState' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.uid' - - api_field: 'orchestrationScope.selectors.locationSelector.includedLocations' - - api_field: 'orchestrationScope.selectors.resourceHierarchySelector.includedFolders' - - api_field: 'orchestrationScope.selectors.resourceHierarchySelector.includedProjects' - - api_field: 'orchestrationState.currentIterationState.error.code' - - api_field: 'orchestrationState.currentIterationState.error.details.type_url' - - api_field: 'orchestrationState.currentIterationState.error.details.value' - - api_field: 'orchestrationState.currentIterationState.error.message' - - api_field: 'orchestrationState.currentIterationState.failedActions' - - api_field: 'orchestrationState.currentIterationState.finishTime' - - api_field: 'orchestrationState.currentIterationState.performedActions' - - api_field: 'orchestrationState.currentIterationState.progress' - - api_field: 'orchestrationState.currentIterationState.rolloutResource' - - api_field: 'orchestrationState.currentIterationState.startTime' - - api_field: 'orchestrationState.currentIterationState.state' - - api_field: 'orchestrationState.previousIterationState.error.code' - - api_field: 'orchestrationState.previousIterationState.error.details.type_url' - - api_field: 'orchestrationState.previousIterationState.error.details.value' - - api_field: 'orchestrationState.previousIterationState.error.message' - - api_field: 'orchestrationState.previousIterationState.failedActions' - - api_field: 'orchestrationState.previousIterationState.finishTime' - - api_field: 'orchestrationState.previousIterationState.performedActions' - - api_field: 'orchestrationState.previousIterationState.progress' - - api_field: 'orchestrationState.previousIterationState.rolloutResource' - - api_field: 'orchestrationState.previousIterationState.startTime' - - api_field: 'orchestrationState.previousIterationState.state' - - field: 'policy_orchestrator_id' - provider_only: true - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: action + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - field: folder_id + provider_only: true + - api_field: labels + - api_field: name + - api_field: orchestratedResource.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.baseline + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.deleted + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.description + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.etag + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.all + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.exclusionLabels.labels + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inclusionLabels.labels + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osShortName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osVersion + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.allowNoResourceGroupMatch + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.description + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.mode + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osShortName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osVersion + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.args + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.interpreter + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.outputFilePath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.script + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.args + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.interpreter + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.outputFilePath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.script + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.content + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.path + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.permissions + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.state + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.apt.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.pullDeps + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.desiredState + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.googet.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.properties + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.pullDeps + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.yum.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.zypper.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.archiveType + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.components + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.distribution + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.gpgKey + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.url + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.baseUrl + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.displayName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.gpgKeys + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.baseUrl + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.displayName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.gpgKeys + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.reconciling + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.revisionCreateTime + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.revisionId + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.fixed + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.percent + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.minWaitDuration + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rolloutState + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.uid + - api_field: orchestrationScope.selectors.locationSelector.includedLocations + - api_field: orchestrationScope.selectors.resourceHierarchySelector.includedFolders + - api_field: orchestrationScope.selectors.resourceHierarchySelector.includedProjects + - api_field: orchestrationState.currentIterationState.error.code + - api_field: orchestrationState.currentIterationState.error.details.type_url + - api_field: orchestrationState.currentIterationState.error.details.value + - api_field: orchestrationState.currentIterationState.error.message + - api_field: orchestrationState.currentIterationState.failedActions + - api_field: orchestrationState.currentIterationState.finishTime + - api_field: orchestrationState.currentIterationState.performedActions + - api_field: orchestrationState.currentIterationState.progress + - api_field: orchestrationState.currentIterationState.rolloutResource + - api_field: orchestrationState.currentIterationState.startTime + - api_field: orchestrationState.currentIterationState.state + - api_field: orchestrationState.previousIterationState.error.code + - api_field: orchestrationState.previousIterationState.error.details.type_url + - api_field: orchestrationState.previousIterationState.error.details.value + - api_field: orchestrationState.previousIterationState.error.message + - api_field: orchestrationState.previousIterationState.failedActions + - api_field: orchestrationState.previousIterationState.finishTime + - api_field: orchestrationState.previousIterationState.performedActions + - api_field: orchestrationState.previousIterationState.progress + - api_field: orchestrationState.previousIterationState.rolloutResource + - api_field: orchestrationState.previousIterationState.startTime + - api_field: orchestrationState.previousIterationState.state + - field: policy_orchestrator_id + provider_only: true + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_organization_generated_meta.yaml b/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_organization_generated_meta.yaml index 19d3da7ecc5..0dd2986a4ab 100644 --- a/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_organization_generated_meta.yaml +++ b/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_for_organization_generated_meta.yaml @@ -1,155 +1,155 @@ -resource: 'google_os_config_v2_policy_orchestrator_for_organization' -generation_type: 'mmv1' -source_file: 'products/osconfigv2/PolicyOrchestratorForOrganization.yaml' -api_service_name: 'osconfig.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'PolicyOrchestrator' +resource: google_os_config_v2_policy_orchestrator_for_organization +generation_type: mmv1 +source_file: products/osconfigv2/PolicyOrchestratorForOrganization.yaml +api_service_name: osconfig.googleapis.com +api_version: v2 +api_resource_type_kind: PolicyOrchestrator api_variant_patterns: - - 'organizations/{organization}/locations/{location}/policyOrchestrators/{policyOrchestrator}' + - organizations/{organization}/locations/{location}/policyOrchestrators/{policyOrchestrator} autogen_status: true fields: - - api_field: 'action' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'orchestratedResource.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.baseline' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.deleted' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.description' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.etag' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.all' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.exclusionLabels.labels' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inclusionLabels.labels' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osShortName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osVersion' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.allowNoResourceGroupMatch' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.description' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.mode' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osShortName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osVersion' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.args' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.interpreter' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.outputFilePath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.script' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.args' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.interpreter' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.outputFilePath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.script' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.content' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.path' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.permissions' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.state' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.apt.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.pullDeps' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.desiredState' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.googet.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.properties' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.pullDeps' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.yum.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.zypper.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.archiveType' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.components' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.distribution' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.gpgKey' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.url' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.baseUrl' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.displayName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.gpgKeys' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.baseUrl' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.displayName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.gpgKeys' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.reconciling' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.revisionCreateTime' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.revisionId' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.fixed' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.percent' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.minWaitDuration' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rolloutState' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.uid' - - api_field: 'orchestrationScope.selectors.locationSelector.includedLocations' - - api_field: 'orchestrationScope.selectors.resourceHierarchySelector.includedFolders' - - api_field: 'orchestrationScope.selectors.resourceHierarchySelector.includedProjects' - - api_field: 'orchestrationState.currentIterationState.error.code' - - api_field: 'orchestrationState.currentIterationState.error.details.type_url' - - api_field: 'orchestrationState.currentIterationState.error.details.value' - - api_field: 'orchestrationState.currentIterationState.error.message' - - api_field: 'orchestrationState.currentIterationState.failedActions' - - api_field: 'orchestrationState.currentIterationState.finishTime' - - api_field: 'orchestrationState.currentIterationState.performedActions' - - api_field: 'orchestrationState.currentIterationState.progress' - - api_field: 'orchestrationState.currentIterationState.rolloutResource' - - api_field: 'orchestrationState.currentIterationState.startTime' - - api_field: 'orchestrationState.currentIterationState.state' - - api_field: 'orchestrationState.previousIterationState.error.code' - - api_field: 'orchestrationState.previousIterationState.error.details.type_url' - - api_field: 'orchestrationState.previousIterationState.error.details.value' - - api_field: 'orchestrationState.previousIterationState.error.message' - - api_field: 'orchestrationState.previousIterationState.failedActions' - - api_field: 'orchestrationState.previousIterationState.finishTime' - - api_field: 'orchestrationState.previousIterationState.performedActions' - - api_field: 'orchestrationState.previousIterationState.progress' - - api_field: 'orchestrationState.previousIterationState.rolloutResource' - - api_field: 'orchestrationState.previousIterationState.startTime' - - api_field: 'orchestrationState.previousIterationState.state' - - field: 'organization_id' - provider_only: true - - field: 'policy_orchestrator_id' - provider_only: true - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: action + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - api_field: name + - api_field: orchestratedResource.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.baseline + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.deleted + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.description + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.etag + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.all + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.exclusionLabels.labels + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inclusionLabels.labels + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osShortName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osVersion + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.allowNoResourceGroupMatch + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.description + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.mode + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osShortName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osVersion + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.args + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.interpreter + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.outputFilePath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.script + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.args + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.interpreter + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.outputFilePath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.script + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.content + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.path + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.permissions + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.state + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.apt.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.pullDeps + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.desiredState + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.googet.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.properties + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.pullDeps + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.yum.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.zypper.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.archiveType + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.components + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.distribution + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.gpgKey + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.url + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.baseUrl + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.displayName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.gpgKeys + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.baseUrl + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.displayName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.gpgKeys + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.reconciling + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.revisionCreateTime + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.revisionId + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.fixed + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.percent + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.minWaitDuration + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rolloutState + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.uid + - api_field: orchestrationScope.selectors.locationSelector.includedLocations + - api_field: orchestrationScope.selectors.resourceHierarchySelector.includedFolders + - api_field: orchestrationScope.selectors.resourceHierarchySelector.includedProjects + - api_field: orchestrationState.currentIterationState.error.code + - api_field: orchestrationState.currentIterationState.error.details.type_url + - api_field: orchestrationState.currentIterationState.error.details.value + - api_field: orchestrationState.currentIterationState.error.message + - api_field: orchestrationState.currentIterationState.failedActions + - api_field: orchestrationState.currentIterationState.finishTime + - api_field: orchestrationState.currentIterationState.performedActions + - api_field: orchestrationState.currentIterationState.progress + - api_field: orchestrationState.currentIterationState.rolloutResource + - api_field: orchestrationState.currentIterationState.startTime + - api_field: orchestrationState.currentIterationState.state + - api_field: orchestrationState.previousIterationState.error.code + - api_field: orchestrationState.previousIterationState.error.details.type_url + - api_field: orchestrationState.previousIterationState.error.details.value + - api_field: orchestrationState.previousIterationState.error.message + - api_field: orchestrationState.previousIterationState.failedActions + - api_field: orchestrationState.previousIterationState.finishTime + - api_field: orchestrationState.previousIterationState.performedActions + - api_field: orchestrationState.previousIterationState.progress + - api_field: orchestrationState.previousIterationState.rolloutResource + - api_field: orchestrationState.previousIterationState.startTime + - api_field: orchestrationState.previousIterationState.state + - field: organization_id + provider_only: true + - field: policy_orchestrator_id + provider_only: true + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_generated_meta.yaml b/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_generated_meta.yaml index da7efd7a4c6..6d566fa47e6 100644 --- a/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_generated_meta.yaml +++ b/google/services/osconfigv2/resource_os_config_v2_policy_orchestrator_generated_meta.yaml @@ -1,151 +1,151 @@ -resource: 'google_os_config_v2_policy_orchestrator' -generation_type: 'mmv1' -source_file: 'products/osconfigv2/PolicyOrchestrator.yaml' -api_service_name: 'osconfig.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'PolicyOrchestrator' +resource: google_os_config_v2_policy_orchestrator +generation_type: mmv1 +source_file: products/osconfigv2/PolicyOrchestrator.yaml +api_service_name: osconfig.googleapis.com +api_version: v2 +api_resource_type_kind: PolicyOrchestrator api_variant_patterns: - - 'projects/{project}/locations/{location}/policyOrchestrators/{policyOrchestrator}' + - projects/{project}/locations/{location}/policyOrchestrators/{policyOrchestrator} autogen_status: true fields: - - api_field: 'action' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'orchestratedResource.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.baseline' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.deleted' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.description' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.all' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.exclusionLabels.labels' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inclusionLabels.labels' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osShortName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osVersion' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.allowNoResourceGroupMatch' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.description' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.mode' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osShortName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osVersion' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.args' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.interpreter' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.outputFilePath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.script' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.args' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.interpreter' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.outputFilePath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.script' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.content' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.path' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.permissions' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.state' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.apt.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.pullDeps' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.desiredState' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.googet.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.properties' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.pullDeps' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.allowInsecure' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.bucket' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.generation' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.object' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.localPath' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.sha256Checksum' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.yum.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.zypper.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.archiveType' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.components' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.distribution' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.gpgKey' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.uri' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.name' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.url' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.baseUrl' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.displayName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.gpgKeys' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.baseUrl' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.displayName' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.gpgKeys' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.id' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.reconciling' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.revisionCreateTime' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.revisionId' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.fixed' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.percent' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rollout.minWaitDuration' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.rolloutState' - - api_field: 'orchestratedResource.osPolicyAssignmentV1Payload.uid' - - api_field: 'orchestrationScope.selectors.locationSelector.includedLocations' - - api_field: 'orchestrationScope.selectors.resourceHierarchySelector.includedFolders' - - api_field: 'orchestrationScope.selectors.resourceHierarchySelector.includedProjects' - - api_field: 'orchestrationState.currentIterationState.error.code' - - api_field: 'orchestrationState.currentIterationState.error.details.type_url' - - api_field: 'orchestrationState.currentIterationState.error.details.value' - - api_field: 'orchestrationState.currentIterationState.error.message' - - api_field: 'orchestrationState.currentIterationState.failedActions' - - api_field: 'orchestrationState.currentIterationState.finishTime' - - api_field: 'orchestrationState.currentIterationState.performedActions' - - api_field: 'orchestrationState.currentIterationState.progress' - - api_field: 'orchestrationState.currentIterationState.rolloutResource' - - api_field: 'orchestrationState.currentIterationState.startTime' - - api_field: 'orchestrationState.currentIterationState.state' - - api_field: 'orchestrationState.previousIterationState.error.code' - - api_field: 'orchestrationState.previousIterationState.error.details.type_url' - - api_field: 'orchestrationState.previousIterationState.error.details.value' - - api_field: 'orchestrationState.previousIterationState.error.message' - - api_field: 'orchestrationState.previousIterationState.failedActions' - - api_field: 'orchestrationState.previousIterationState.finishTime' - - api_field: 'orchestrationState.previousIterationState.performedActions' - - api_field: 'orchestrationState.previousIterationState.progress' - - api_field: 'orchestrationState.previousIterationState.rolloutResource' - - api_field: 'orchestrationState.previousIterationState.startTime' - - api_field: 'orchestrationState.previousIterationState.state' - - field: 'policy_orchestrator_id' - provider_only: true - - api_field: 'reconciling' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: action + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: orchestratedResource.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.baseline + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.deleted + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.description + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.all + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.exclusionLabels.labels + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inclusionLabels.labels + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osShortName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.instanceFilter.inventories.osVersion + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.allowNoResourceGroupMatch + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.description + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.mode + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osShortName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.inventoryFilters.osVersion + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.args + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.interpreter + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.outputFilePath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.enforce.script + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.args + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.interpreter + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.outputFilePath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.exec.validate.script + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.content + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.file.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.path + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.permissions + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.file.state + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.apt.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.pullDeps + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.deb.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.desiredState + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.googet.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.properties + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.msi.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.pullDeps + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.allowInsecure + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.bucket + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.generation + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.gcs.object + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.localPath + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.sha256Checksum + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.rpm.source.remote.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.yum.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.pkg.zypper.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.archiveType + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.components + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.distribution + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.gpgKey + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.apt.uri + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.name + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.goo.url + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.baseUrl + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.displayName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.gpgKeys + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.yum.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.baseUrl + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.displayName + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.gpgKeys + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.osPolicies.resourceGroups.resources.repository.zypper.id + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.reconciling + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.revisionCreateTime + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.revisionId + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.fixed + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.disruptionBudget.percent + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rollout.minWaitDuration + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.rolloutState + - api_field: orchestratedResource.osPolicyAssignmentV1Payload.uid + - api_field: orchestrationScope.selectors.locationSelector.includedLocations + - api_field: orchestrationScope.selectors.resourceHierarchySelector.includedFolders + - api_field: orchestrationScope.selectors.resourceHierarchySelector.includedProjects + - api_field: orchestrationState.currentIterationState.error.code + - api_field: orchestrationState.currentIterationState.error.details.type_url + - api_field: orchestrationState.currentIterationState.error.details.value + - api_field: orchestrationState.currentIterationState.error.message + - api_field: orchestrationState.currentIterationState.failedActions + - api_field: orchestrationState.currentIterationState.finishTime + - api_field: orchestrationState.currentIterationState.performedActions + - api_field: orchestrationState.currentIterationState.progress + - api_field: orchestrationState.currentIterationState.rolloutResource + - api_field: orchestrationState.currentIterationState.startTime + - api_field: orchestrationState.currentIterationState.state + - api_field: orchestrationState.previousIterationState.error.code + - api_field: orchestrationState.previousIterationState.error.details.type_url + - api_field: orchestrationState.previousIterationState.error.details.value + - api_field: orchestrationState.previousIterationState.error.message + - api_field: orchestrationState.previousIterationState.failedActions + - api_field: orchestrationState.previousIterationState.finishTime + - api_field: orchestrationState.previousIterationState.performedActions + - api_field: orchestrationState.previousIterationState.progress + - api_field: orchestrationState.previousIterationState.rolloutResource + - api_field: orchestrationState.previousIterationState.startTime + - api_field: orchestrationState.previousIterationState.state + - field: policy_orchestrator_id + provider_only: true + - api_field: reconciling + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/oslogin/resource_os_login_ssh_public_key_generated_meta.yaml b/google/services/oslogin/resource_os_login_ssh_public_key_generated_meta.yaml index adae328c2dd..e75ac1e5b22 100644 --- a/google/services/oslogin/resource_os_login_ssh_public_key_generated_meta.yaml +++ b/google/services/oslogin/resource_os_login_ssh_public_key_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_os_login_ssh_public_key' -generation_type: 'mmv1' -source_file: 'products/oslogin/SSHPublicKey.yaml' -api_service_name: 'oslogin.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SshPublicKey' +resource: google_os_login_ssh_public_key +generation_type: mmv1 +source_file: products/oslogin/SSHPublicKey.yaml +api_service_name: oslogin.googleapis.com +api_version: v1 +api_resource_type_kind: SshPublicKey fields: - - api_field: 'expirationTimeUsec' - - api_field: 'fingerprint' - - api_field: 'key' - - field: 'project' - provider_only: true - - field: 'user' - provider_only: true + - api_field: expirationTimeUsec + - api_field: fingerprint + - api_field: key + - field: project + provider_only: true + - field: user + provider_only: true diff --git a/google/services/parallelstore/resource_parallelstore_instance_generated_meta.yaml b/google/services/parallelstore/resource_parallelstore_instance_generated_meta.yaml index d88b52cfb78..7b64e178b7f 100644 --- a/google/services/parallelstore/resource_parallelstore_instance_generated_meta.yaml +++ b/google/services/parallelstore/resource_parallelstore_instance_generated_meta.yaml @@ -1,31 +1,31 @@ -resource: 'google_parallelstore_instance' -generation_type: 'mmv1' -source_file: 'products/parallelstore/Instance.yaml' -api_service_name: 'parallelstore.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_parallelstore_instance +generation_type: mmv1 +source_file: products/parallelstore/Instance.yaml +api_service_name: parallelstore.googleapis.com +api_version: v1 +api_resource_type_kind: Instance autogen_status: true fields: - - api_field: 'accessPoints' - - api_field: 'capacityGib' - - api_field: 'createTime' - - api_field: 'daosVersion' - - api_field: 'deploymentType' - - api_field: 'description' - - api_field: 'directoryStripeLevel' - - field: 'effective_labels' - provider_only: true - - api_field: 'effectiveReservedIpRange' - - api_field: 'fileStripeLevel' - - field: 'instance_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'network' - - api_field: 'reservedIpRange' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: accessPoints + - api_field: capacityGib + - api_field: createTime + - api_field: daosVersion + - api_field: deploymentType + - api_field: description + - api_field: directoryStripeLevel + - field: effective_labels + provider_only: true + - api_field: effectiveReservedIpRange + - api_field: fileStripeLevel + - field: instance_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: network + - api_field: reservedIpRange + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/parametermanager/resource_parameter_manager_parameter_generated_meta.yaml b/google/services/parametermanager/resource_parameter_manager_parameter_generated_meta.yaml index 7294ad748ac..3f24afae7f5 100644 --- a/google/services/parametermanager/resource_parameter_manager_parameter_generated_meta.yaml +++ b/google/services/parametermanager/resource_parameter_manager_parameter_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_parameter_manager_parameter' -generation_type: 'mmv1' -source_file: 'products/parametermanager/Parameter.yaml' -api_service_name: 'parametermanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Parameter' +resource: google_parameter_manager_parameter +generation_type: mmv1 +source_file: products/parametermanager/Parameter.yaml +api_service_name: parametermanager.googleapis.com +api_version: v1 +api_resource_type_kind: Parameter fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'format' - - api_field: 'kmsKey' - - api_field: 'labels' - - api_field: 'name' - - field: 'parameter_id' - provider_only: true - - api_field: 'policyMember.iamPolicyNamePrincipal' - - api_field: 'policyMember.iamPolicyUidPrincipal' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: format + - api_field: kmsKey + - api_field: labels + - api_field: name + - field: parameter_id + provider_only: true + - api_field: policyMember.iamPolicyNamePrincipal + - api_field: policyMember.iamPolicyUidPrincipal + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/parametermanager/resource_parameter_manager_parameter_version_generated_meta.yaml b/google/services/parametermanager/resource_parameter_manager_parameter_version_generated_meta.yaml index 0d2968f7243..f7bd9467dae 100644 --- a/google/services/parametermanager/resource_parameter_manager_parameter_version_generated_meta.yaml +++ b/google/services/parametermanager/resource_parameter_manager_parameter_version_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_parameter_manager_parameter_version' -generation_type: 'mmv1' -source_file: 'products/parametermanager/ParameterVersion.yaml' -api_service_name: 'parametermanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ParameterVersion' +resource: google_parameter_manager_parameter_version +generation_type: mmv1 +source_file: products/parametermanager/ParameterVersion.yaml +api_service_name: parametermanager.googleapis.com +api_version: v1 +api_resource_type_kind: ParameterVersion fields: - - api_field: 'createTime' - - api_field: 'disabled' - - api_field: 'kmsKeyVersion' - - api_field: 'name' - - field: 'parameter' - provider_only: true - - api_field: 'payload.data' - field: 'parameter_data' - - field: 'parameter_version_id' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: disabled + - api_field: kmsKeyVersion + - api_field: name + - field: parameter + provider_only: true + - api_field: payload.data + field: parameter_data + - field: parameter_version_id + provider_only: true + - api_field: updateTime diff --git a/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_generated_meta.yaml b/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_generated_meta.yaml index f7e0b132c1c..902851dbb04 100644 --- a/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_generated_meta.yaml +++ b/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_parameter_manager_regional_parameter' -generation_type: 'mmv1' -source_file: 'products/parametermanagerregional/RegionalParameter.yaml' -api_service_name: 'parametermanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Parameter' +resource: google_parameter_manager_regional_parameter +generation_type: mmv1 +source_file: products/parametermanagerregional/RegionalParameter.yaml +api_service_name: parametermanager.googleapis.com +api_version: v1 +api_resource_type_kind: Parameter fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'format' - - api_field: 'kmsKey' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parameter_id' - provider_only: true - - api_field: 'policyMember.iamPolicyNamePrincipal' - - api_field: 'policyMember.iamPolicyUidPrincipal' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: format + - api_field: kmsKey + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: parameter_id + provider_only: true + - api_field: policyMember.iamPolicyNamePrincipal + - api_field: policyMember.iamPolicyUidPrincipal + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_version_generated_meta.yaml b/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_version_generated_meta.yaml index f3d43a07a54..31cdfca8f83 100644 --- a/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_version_generated_meta.yaml +++ b/google/services/parametermanagerregional/resource_parameter_manager_regional_parameter_version_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_parameter_manager_regional_parameter_version' -generation_type: 'mmv1' -source_file: 'products/parametermanagerregional/RegionalParameterVersion.yaml' -api_service_name: 'parametermanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ParameterVersion' +resource: google_parameter_manager_regional_parameter_version +generation_type: mmv1 +source_file: products/parametermanagerregional/RegionalParameterVersion.yaml +api_service_name: parametermanager.googleapis.com +api_version: v1 +api_resource_type_kind: ParameterVersion fields: - - api_field: 'createTime' - - api_field: 'disabled' - - api_field: 'kmsKeyVersion' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parameter' - provider_only: true - - api_field: 'payload.data' - field: 'parameter_data' - - field: 'parameter_version_id' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: disabled + - api_field: kmsKeyVersion + - field: location + provider_only: true + - api_field: name + - field: parameter + provider_only: true + - api_field: payload.data + field: parameter_data + - field: parameter_version_id + provider_only: true + - api_field: updateTime diff --git a/google/services/privateca/iam_privateca_ca_pool_generated_test.go b/google/services/privateca/iam_privateca_ca_pool_generated_test.go index a2f2044e923..cd3692f5c70 100644 --- a/google/services/privateca/iam_privateca_ca_pool_generated_test.go +++ b/google/services/privateca/iam_privateca_ca_pool_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccPrivatecaCaPoolIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMBindingStateID("google_privateca_ca_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccPrivatecaCaPoolIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMBindingStateID("google_privateca_ca_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccPrivatecaCaPoolIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMMemberStateID("google_privateca_ca_pool_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccPrivatecaCaPoolIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMPolicyStateID("google_privateca_ca_pool_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccPrivatecaCaPoolIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMPolicyStateID("google_privateca_ca_pool_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccPrivatecaCaPoolIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCaPoolIAMBindingStateID("google_privateca_ca_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccPrivatecaCaPoolIamBindingGenerated_withAndWithoutCondition(t *testin }, { ResourceName: "google_privateca_ca_pool_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMBindingStateID("google_privateca_ca_pool_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_ca_pool_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCaPoolIAMBindingStateID("google_privateca_ca_pool_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_ca_pool_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generatePrivatecaCaPoolIAMBindingStateID("google_privateca_ca_pool_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccPrivatecaCaPoolIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCaPoolIAMMemberStateID("google_privateca_ca_pool_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccPrivatecaCaPoolIamMemberGenerated_withAndWithoutCondition(t *testing }, { ResourceName: "google_privateca_ca_pool_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMMemberStateID("google_privateca_ca_pool_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_ca_pool_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCaPoolIAMMemberStateID("google_privateca_ca_pool_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_ca_pool_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s roles/privateca.certificateManager user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generatePrivatecaCaPoolIAMMemberStateID("google_privateca_ca_pool_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccPrivatecaCaPoolIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_privateca_ca_pool_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/caPools/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-pool%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCaPoolIAMPolicyStateID("google_privateca_ca_pool_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -658,3 +659,56 @@ resource "google_privateca_ca_pool_iam_policy" "foo" { } `, context) } +func generatePrivatecaCaPoolIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + ca_pool := tpgresource.GetResourceNameFromSelfLink(rawState["ca_pool"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/caPools/%s", project, location, ca_pool), "", "", rawState["condition.0.title"]), nil + } +} + +func generatePrivatecaCaPoolIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + ca_pool := tpgresource.GetResourceNameFromSelfLink(rawState["ca_pool"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/caPools/%s", project, location, ca_pool), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generatePrivatecaCaPoolIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + ca_pool := tpgresource.GetResourceNameFromSelfLink(rawState["ca_pool"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/caPools/%s", project, location, ca_pool), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/privateca/iam_privateca_certificate_template_generated_test.go b/google/services/privateca/iam_privateca_certificate_template_generated_test.go index 2645cef6251..0fbc3d5c844 100644 --- a/google/services/privateca/iam_privateca_certificate_template_generated_test.go +++ b/google/services/privateca/iam_privateca_certificate_template_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccPrivatecaCertificateTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_privateca_certificate_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMBindingStateID("google_privateca_certificate_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccPrivatecaCertificateTemplateIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_privateca_certificate_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMBindingStateID("google_privateca_certificate_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccPrivatecaCertificateTemplateIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_privateca_certificate_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMMemberStateID("google_privateca_certificate_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccPrivatecaCertificateTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_privateca_certificate_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMPolicyStateID("google_privateca_certificate_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccPrivatecaCertificateTemplateIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_privateca_certificate_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMPolicyStateID("google_privateca_certificate_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccPrivatecaCertificateTemplateIamBindingGenerated_withCondition(t *tes }, { ResourceName: "google_privateca_certificate_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMBindingStateID("google_privateca_certificate_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccPrivatecaCertificateTemplateIamBindingGenerated_withAndWithoutCondit }, { ResourceName: "google_privateca_certificate_template_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMBindingStateID("google_privateca_certificate_template_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_certificate_template_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMBindingStateID("google_privateca_certificate_template_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_certificate_template_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMBindingStateID("google_privateca_certificate_template_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccPrivatecaCertificateTemplateIamMemberGenerated_withCondition(t *test }, { ResourceName: "google_privateca_certificate_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMMemberStateID("google_privateca_certificate_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccPrivatecaCertificateTemplateIamMemberGenerated_withAndWithoutConditi }, { ResourceName: "google_privateca_certificate_template_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMMemberStateID("google_privateca_certificate_template_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_certificate_template_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMMemberStateID("google_privateca_certificate_template_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_privateca_certificate_template_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s roles/privateca.templateUser user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMMemberStateID("google_privateca_certificate_template_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccPrivatecaCertificateTemplateIamPolicyGenerated_withCondition(t *test }, { ResourceName: "google_privateca_certificate_template_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-template%s", context["random_suffix"])), + ImportStateIdFunc: generatePrivatecaCertificateTemplateIAMPolicyStateID("google_privateca_certificate_template_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -1258,3 +1259,56 @@ resource "google_privateca_certificate_template_iam_policy" "foo" { } `, context) } +func generatePrivatecaCertificateTemplateIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + certificate_template := tpgresource.GetResourceNameFromSelfLink(rawState["certificate_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s", project, location, certificate_template), "", "", rawState["condition.0.title"]), nil + } +} + +func generatePrivatecaCertificateTemplateIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + certificate_template := tpgresource.GetResourceNameFromSelfLink(rawState["certificate_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s", project, location, certificate_template), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generatePrivatecaCertificateTemplateIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + certificate_template := tpgresource.GetResourceNameFromSelfLink(rawState["certificate_template"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/certificateTemplates/%s", project, location, certificate_template), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/privateca/resource_privateca_ca_pool_generated_meta.yaml b/google/services/privateca/resource_privateca_ca_pool_generated_meta.yaml index c30436a03f2..ed4145449a9 100644 --- a/google/services/privateca/resource_privateca_ca_pool_generated_meta.yaml +++ b/google/services/privateca/resource_privateca_ca_pool_generated_meta.yaml @@ -1,70 +1,70 @@ -resource: 'google_privateca_ca_pool' -generation_type: 'mmv1' -source_file: 'products/privateca/CaPool.yaml' -api_service_name: 'privateca.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CaPool' +resource: google_privateca_ca_pool +generation_type: mmv1 +source_file: products/privateca/CaPool.yaml +api_service_name: privateca.googleapis.com +api_version: v1 +api_resource_type_kind: CaPool fields: - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.cloudKmsKey' - - api_field: 'issuancePolicy.allowedIssuanceModes.allowConfigBasedIssuance' - - api_field: 'issuancePolicy.allowedIssuanceModes.allowCsrBasedIssuance' - - api_field: 'issuancePolicy.allowedKeyTypes.ellipticCurve.signatureAlgorithm' - - api_field: 'issuancePolicy.allowedKeyTypes.rsa.maxModulusSize' - - api_field: 'issuancePolicy.allowedKeyTypes.rsa.minModulusSize' - - api_field: 'issuancePolicy.backdateDuration' - - api_field: 'issuancePolicy.baselineValues.additionalExtensions.critical' - - api_field: 'issuancePolicy.baselineValues.additionalExtensions.objectId.objectIdPath' - - api_field: 'issuancePolicy.baselineValues.additionalExtensions.value' - - api_field: 'issuancePolicy.baselineValues.aiaOcspServers' - - api_field: 'issuancePolicy.baselineValues.caOptions.isCa' - - api_field: 'issuancePolicy.baselineValues.caOptions.maxIssuerPathLength' - - field: 'issuance_policy.baseline_values.ca_options.non_ca' - provider_only: true - - field: 'issuance_policy.baseline_values.ca_options.zero_max_issuer_path_length' - provider_only: true - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.certSign' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.contentCommitment' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.crlSign' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.dataEncipherment' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.decipherOnly' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.digitalSignature' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.encipherOnly' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.keyAgreement' - - api_field: 'issuancePolicy.baselineValues.keyUsage.baseKeyUsage.keyEncipherment' - - api_field: 'issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.clientAuth' - - api_field: 'issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.codeSigning' - - api_field: 'issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.emailProtection' - - api_field: 'issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.ocspSigning' - - api_field: 'issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.serverAuth' - - api_field: 'issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.timeStamping' - - api_field: 'issuancePolicy.baselineValues.keyUsage.unknownExtendedKeyUsages.objectIdPath' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.critical' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.excludedDnsNames' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.excludedEmailAddresses' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.excludedIpRanges' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.excludedUris' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.permittedDnsNames' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.permittedEmailAddresses' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.permittedIpRanges' - - api_field: 'issuancePolicy.baselineValues.nameConstraints.permittedUris' - - api_field: 'issuancePolicy.baselineValues.policyIds.objectIdPath' - - api_field: 'issuancePolicy.identityConstraints.allowSubjectAltNamesPassthrough' - - api_field: 'issuancePolicy.identityConstraints.allowSubjectPassthrough' - - api_field: 'issuancePolicy.identityConstraints.celExpression.description' - - api_field: 'issuancePolicy.identityConstraints.celExpression.expression' - - api_field: 'issuancePolicy.identityConstraints.celExpression.location' - - api_field: 'issuancePolicy.identityConstraints.celExpression.title' - - api_field: 'issuancePolicy.maximumLifetime' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'publishingOptions.encodingFormat' - - api_field: 'publishingOptions.publishCaCert' - - api_field: 'publishingOptions.publishCrl' - - field: 'terraform_labels' - provider_only: true - - api_field: 'tier' + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.cloudKmsKey + - api_field: issuancePolicy.allowedIssuanceModes.allowConfigBasedIssuance + - api_field: issuancePolicy.allowedIssuanceModes.allowCsrBasedIssuance + - api_field: issuancePolicy.allowedKeyTypes.ellipticCurve.signatureAlgorithm + - api_field: issuancePolicy.allowedKeyTypes.rsa.maxModulusSize + - api_field: issuancePolicy.allowedKeyTypes.rsa.minModulusSize + - api_field: issuancePolicy.backdateDuration + - api_field: issuancePolicy.baselineValues.additionalExtensions.critical + - api_field: issuancePolicy.baselineValues.additionalExtensions.objectId.objectIdPath + - api_field: issuancePolicy.baselineValues.additionalExtensions.value + - api_field: issuancePolicy.baselineValues.aiaOcspServers + - api_field: issuancePolicy.baselineValues.caOptions.isCa + - api_field: issuancePolicy.baselineValues.caOptions.maxIssuerPathLength + - field: issuance_policy.baseline_values.ca_options.non_ca + provider_only: true + - field: issuance_policy.baseline_values.ca_options.zero_max_issuer_path_length + provider_only: true + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.certSign + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.contentCommitment + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.crlSign + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.dataEncipherment + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.decipherOnly + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.digitalSignature + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.encipherOnly + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.keyAgreement + - api_field: issuancePolicy.baselineValues.keyUsage.baseKeyUsage.keyEncipherment + - api_field: issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.clientAuth + - api_field: issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.codeSigning + - api_field: issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.emailProtection + - api_field: issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.ocspSigning + - api_field: issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.serverAuth + - api_field: issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.timeStamping + - api_field: issuancePolicy.baselineValues.keyUsage.unknownExtendedKeyUsages.objectIdPath + - api_field: issuancePolicy.baselineValues.nameConstraints.critical + - api_field: issuancePolicy.baselineValues.nameConstraints.excludedDnsNames + - api_field: issuancePolicy.baselineValues.nameConstraints.excludedEmailAddresses + - api_field: issuancePolicy.baselineValues.nameConstraints.excludedIpRanges + - api_field: issuancePolicy.baselineValues.nameConstraints.excludedUris + - api_field: issuancePolicy.baselineValues.nameConstraints.permittedDnsNames + - api_field: issuancePolicy.baselineValues.nameConstraints.permittedEmailAddresses + - api_field: issuancePolicy.baselineValues.nameConstraints.permittedIpRanges + - api_field: issuancePolicy.baselineValues.nameConstraints.permittedUris + - api_field: issuancePolicy.baselineValues.policyIds.objectIdPath + - api_field: issuancePolicy.identityConstraints.allowSubjectAltNamesPassthrough + - api_field: issuancePolicy.identityConstraints.allowSubjectPassthrough + - api_field: issuancePolicy.identityConstraints.celExpression.description + - api_field: issuancePolicy.identityConstraints.celExpression.expression + - api_field: issuancePolicy.identityConstraints.celExpression.location + - api_field: issuancePolicy.identityConstraints.celExpression.title + - api_field: issuancePolicy.maximumLifetime + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: publishingOptions.encodingFormat + - api_field: publishingOptions.publishCaCert + - api_field: publishingOptions.publishCrl + - field: terraform_labels + provider_only: true + - api_field: tier diff --git a/google/services/privateca/resource_privateca_certificate_authority_generated_meta.yaml b/google/services/privateca/resource_privateca_certificate_authority_generated_meta.yaml index 89dfc011cc2..afcce742f23 100644 --- a/google/services/privateca/resource_privateca_certificate_authority_generated_meta.yaml +++ b/google/services/privateca/resource_privateca_certificate_authority_generated_meta.yaml @@ -1,93 +1,93 @@ -resource: 'google_privateca_certificate_authority' -generation_type: 'mmv1' -source_file: 'products/privateca/CertificateAuthority.yaml' -api_service_name: 'privateca.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CertificateAuthority' +resource: google_privateca_certificate_authority +generation_type: mmv1 +source_file: products/privateca/CertificateAuthority.yaml +api_service_name: privateca.googleapis.com +api_version: v1 +api_resource_type_kind: CertificateAuthority fields: - - api_field: 'accessUrls.caCertificateAccessUrl' - - api_field: 'accessUrls.crlAccessUrls' - - field: 'certificate_authority_id' - provider_only: true - - api_field: 'config.subjectConfig.subject.commonName' - - api_field: 'config.subjectConfig.subject.countryCode' - - api_field: 'config.subjectConfig.subject.locality' - - api_field: 'config.subjectConfig.subject.organization' - - api_field: 'config.subjectConfig.subject.organizationalUnit' - - api_field: 'config.subjectConfig.subject.postalCode' - - api_field: 'config.subjectConfig.subject.province' - - api_field: 'config.subjectConfig.subject.streetAddress' - - api_field: 'config.subjectConfig.subjectAltName.dnsNames' - - api_field: 'config.subjectConfig.subjectAltName.emailAddresses' - - api_field: 'config.subjectConfig.subjectAltName.ipAddresses' - - api_field: 'config.subjectConfig.subjectAltName.uris' - - api_field: 'config.subjectKeyId.keyId' - - api_field: 'config.x509Config.additionalExtensions.critical' - - api_field: 'config.x509Config.additionalExtensions.objectId.objectIdPath' - - api_field: 'config.x509Config.additionalExtensions.value' - - api_field: 'config.x509Config.aiaOcspServers' - - api_field: 'config.x509Config.caOptions.isCa' - - api_field: 'config.x509Config.caOptions.maxIssuerPathLength' - - field: 'config.x509_config.ca_options.non_ca' - provider_only: true - - field: 'config.x509_config.ca_options.zero_max_issuer_path_length' - provider_only: true - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.certSign' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.contentCommitment' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.crlSign' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.dataEncipherment' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.decipherOnly' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.digitalSignature' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.encipherOnly' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.keyAgreement' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.keyEncipherment' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.clientAuth' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.codeSigning' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.emailProtection' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.ocspSigning' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.serverAuth' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.timeStamping' - - api_field: 'config.x509Config.keyUsage.unknownExtendedKeyUsages.objectIdPath' - - api_field: 'config.x509Config.nameConstraints.critical' - - api_field: 'config.x509Config.nameConstraints.excludedDnsNames' - - api_field: 'config.x509Config.nameConstraints.excludedEmailAddresses' - - api_field: 'config.x509Config.nameConstraints.excludedIpRanges' - - api_field: 'config.x509Config.nameConstraints.excludedUris' - - api_field: 'config.x509Config.nameConstraints.permittedDnsNames' - - api_field: 'config.x509Config.nameConstraints.permittedEmailAddresses' - - api_field: 'config.x509Config.nameConstraints.permittedIpRanges' - - api_field: 'config.x509Config.nameConstraints.permittedUris' - - api_field: 'config.x509Config.policyIds.objectIdPath' - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - field: 'desired_state' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'gcsBucket' - - field: 'ignore_active_certificates_on_deletion' - provider_only: true - - api_field: 'keySpec.algorithm' - - api_field: 'keySpec.cloudKmsKeyVersion' - - api_field: 'labels' - - api_field: 'lifetime' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'pem_ca_certificate' - provider_only: true - - api_field: 'pemCaCertificates' - - field: 'pool' - provider_only: true - - field: 'skip_grace_period' - provider_only: true - - api_field: 'state' - - api_field: 'subordinateConfig.certificateAuthority' - - api_field: 'subordinateConfig.pemIssuerChain.pemCertificates' - - field: 'terraform_labels' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' - - api_field: 'userDefinedAccessUrls.aiaIssuingCertificateUrls' - - api_field: 'userDefinedAccessUrls.crlAccessUrls' + - api_field: accessUrls.caCertificateAccessUrl + - api_field: accessUrls.crlAccessUrls + - field: certificate_authority_id + provider_only: true + - api_field: config.subjectConfig.subject.commonName + - api_field: config.subjectConfig.subject.countryCode + - api_field: config.subjectConfig.subject.locality + - api_field: config.subjectConfig.subject.organization + - api_field: config.subjectConfig.subject.organizationalUnit + - api_field: config.subjectConfig.subject.postalCode + - api_field: config.subjectConfig.subject.province + - api_field: config.subjectConfig.subject.streetAddress + - api_field: config.subjectConfig.subjectAltName.dnsNames + - api_field: config.subjectConfig.subjectAltName.emailAddresses + - api_field: config.subjectConfig.subjectAltName.ipAddresses + - api_field: config.subjectConfig.subjectAltName.uris + - api_field: config.subjectKeyId.keyId + - api_field: config.x509Config.additionalExtensions.critical + - api_field: config.x509Config.additionalExtensions.objectId.objectIdPath + - api_field: config.x509Config.additionalExtensions.value + - api_field: config.x509Config.aiaOcspServers + - api_field: config.x509Config.caOptions.isCa + - api_field: config.x509Config.caOptions.maxIssuerPathLength + - field: config.x509_config.ca_options.non_ca + provider_only: true + - field: config.x509_config.ca_options.zero_max_issuer_path_length + provider_only: true + - api_field: config.x509Config.keyUsage.baseKeyUsage.certSign + - api_field: config.x509Config.keyUsage.baseKeyUsage.contentCommitment + - api_field: config.x509Config.keyUsage.baseKeyUsage.crlSign + - api_field: config.x509Config.keyUsage.baseKeyUsage.dataEncipherment + - api_field: config.x509Config.keyUsage.baseKeyUsage.decipherOnly + - api_field: config.x509Config.keyUsage.baseKeyUsage.digitalSignature + - api_field: config.x509Config.keyUsage.baseKeyUsage.encipherOnly + - api_field: config.x509Config.keyUsage.baseKeyUsage.keyAgreement + - api_field: config.x509Config.keyUsage.baseKeyUsage.keyEncipherment + - api_field: config.x509Config.keyUsage.extendedKeyUsage.clientAuth + - api_field: config.x509Config.keyUsage.extendedKeyUsage.codeSigning + - api_field: config.x509Config.keyUsage.extendedKeyUsage.emailProtection + - api_field: config.x509Config.keyUsage.extendedKeyUsage.ocspSigning + - api_field: config.x509Config.keyUsage.extendedKeyUsage.serverAuth + - api_field: config.x509Config.keyUsage.extendedKeyUsage.timeStamping + - api_field: config.x509Config.keyUsage.unknownExtendedKeyUsages.objectIdPath + - api_field: config.x509Config.nameConstraints.critical + - api_field: config.x509Config.nameConstraints.excludedDnsNames + - api_field: config.x509Config.nameConstraints.excludedEmailAddresses + - api_field: config.x509Config.nameConstraints.excludedIpRanges + - api_field: config.x509Config.nameConstraints.excludedUris + - api_field: config.x509Config.nameConstraints.permittedDnsNames + - api_field: config.x509Config.nameConstraints.permittedEmailAddresses + - api_field: config.x509Config.nameConstraints.permittedIpRanges + - api_field: config.x509Config.nameConstraints.permittedUris + - api_field: config.x509Config.policyIds.objectIdPath + - api_field: createTime + - field: deletion_protection + provider_only: true + - field: desired_state + provider_only: true + - field: effective_labels + provider_only: true + - api_field: gcsBucket + - field: ignore_active_certificates_on_deletion + provider_only: true + - api_field: keySpec.algorithm + - api_field: keySpec.cloudKmsKeyVersion + - api_field: labels + - api_field: lifetime + - field: location + provider_only: true + - api_field: name + - field: pem_ca_certificate + provider_only: true + - api_field: pemCaCertificates + - field: pool + provider_only: true + - field: skip_grace_period + provider_only: true + - api_field: state + - api_field: subordinateConfig.certificateAuthority + - api_field: subordinateConfig.pemIssuerChain.pemCertificates + - field: terraform_labels + provider_only: true + - api_field: type + - api_field: updateTime + - api_field: userDefinedAccessUrls.aiaIssuingCertificateUrls + - api_field: userDefinedAccessUrls.crlAccessUrls diff --git a/google/services/privateca/resource_privateca_certificate_generated_meta.yaml b/google/services/privateca/resource_privateca_certificate_generated_meta.yaml index 8871842cdf3..a6f1a770ebc 100644 --- a/google/services/privateca/resource_privateca_certificate_generated_meta.yaml +++ b/google/services/privateca/resource_privateca_certificate_generated_meta.yaml @@ -1,139 +1,139 @@ -resource: 'google_privateca_certificate' -generation_type: 'mmv1' -source_file: 'products/privateca/Certificate.yaml' -api_service_name: 'privateca.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Certificate' +resource: google_privateca_certificate +generation_type: mmv1 +source_file: products/privateca/Certificate.yaml +api_service_name: privateca.googleapis.com +api_version: v1 +api_resource_type_kind: Certificate fields: - - field: 'certificate_authority' - provider_only: true - - api_field: 'certificateDescription.aiaIssuingCertificateUrls' - - api_field: 'certificateDescription.authorityKeyId.keyId' - - api_field: 'certificateDescription.certFingerprint.sha256Hash' - - api_field: 'certificateDescription.crlDistributionPoints' - - api_field: 'certificateDescription.publicKey.format' - - api_field: 'certificateDescription.publicKey.key' - - api_field: 'certificateDescription.subjectDescription.hexSerialNumber' - - api_field: 'certificateDescription.subjectDescription.lifetime' - - api_field: 'certificateDescription.subjectDescription.notAfterTime' - - api_field: 'certificateDescription.subjectDescription.notBeforeTime' - - api_field: 'certificateDescription.subjectDescription.subject.commonName' - - api_field: 'certificateDescription.subjectDescription.subject.countryCode' - - api_field: 'certificateDescription.subjectDescription.subject.locality' - - api_field: 'certificateDescription.subjectDescription.subject.organization' - - api_field: 'certificateDescription.subjectDescription.subject.organizationalUnit' - - api_field: 'certificateDescription.subjectDescription.subject.postalCode' - - api_field: 'certificateDescription.subjectDescription.subject.province' - - api_field: 'certificateDescription.subjectDescription.subject.streetAddress' - - api_field: 'certificateDescription.subjectDescription.subjectAltName.customSans.critical' - - api_field: 'certificateDescription.subjectDescription.subjectAltName.customSans.obectId.objectIdPath' - - api_field: 'certificateDescription.subjectDescription.subjectAltName.customSans.value' - - api_field: 'certificateDescription.subjectDescription.subjectAltName.dnsNames' - - api_field: 'certificateDescription.subjectDescription.subjectAltName.emailAddresses' - - api_field: 'certificateDescription.subjectDescription.subjectAltName.ipAddresses' - - api_field: 'certificateDescription.subjectDescription.subjectAltName.uris' - - api_field: 'certificateDescription.subjectKeyId.keyId' - - api_field: 'certificateDescription.x509Description.additionalExtensions.critical' - - api_field: 'certificateDescription.x509Description.additionalExtensions.objectId.objectIdPath' - - api_field: 'certificateDescription.x509Description.additionalExtensions.value' - - api_field: 'certificateDescription.x509Description.aiaOcspServers' - - api_field: 'certificateDescription.x509Description.caOptions.isCa' - - api_field: 'certificateDescription.x509Description.caOptions.maxIssuerPathLength' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.certSign' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.contentCommitment' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.crlSign' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.dataEncipherment' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.decipherOnly' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.digitalSignature' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.encipherOnly' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.keyAgreement' - - api_field: 'certificateDescription.x509Description.keyUsage.baseKeyUsage.keyEncipherment' - - api_field: 'certificateDescription.x509Description.keyUsage.extendedKeyUsage.clientAuth' - - api_field: 'certificateDescription.x509Description.keyUsage.extendedKeyUsage.codeSigning' - - api_field: 'certificateDescription.x509Description.keyUsage.extendedKeyUsage.emailProtection' - - api_field: 'certificateDescription.x509Description.keyUsage.extendedKeyUsage.ocspSigning' - - api_field: 'certificateDescription.x509Description.keyUsage.extendedKeyUsage.serverAuth' - - api_field: 'certificateDescription.x509Description.keyUsage.extendedKeyUsage.timeStamping' - - api_field: 'certificateDescription.x509Description.keyUsage.unknownExtendedKeyUsages.objectIdPath' - - api_field: 'certificateDescription.x509Description.nameConstraints.critical' - - api_field: 'certificateDescription.x509Description.nameConstraints.excludedDnsNames' - - api_field: 'certificateDescription.x509Description.nameConstraints.excludedEmailAddresses' - - api_field: 'certificateDescription.x509Description.nameConstraints.excludedIpRanges' - - api_field: 'certificateDescription.x509Description.nameConstraints.excludedUris' - - api_field: 'certificateDescription.x509Description.nameConstraints.permittedDnsNames' - - api_field: 'certificateDescription.x509Description.nameConstraints.permittedEmailAddresses' - - api_field: 'certificateDescription.x509Description.nameConstraints.permittedIpRanges' - - api_field: 'certificateDescription.x509Description.nameConstraints.permittedUris' - - api_field: 'certificateDescription.x509Description.policyIds.objectIdPath' - - api_field: 'certificateTemplate' - - api_field: 'config.publicKey.format' - - api_field: 'config.publicKey.key' - - api_field: 'config.subjectConfig.subject.commonName' - - api_field: 'config.subjectConfig.subject.countryCode' - - api_field: 'config.subjectConfig.subject.locality' - - api_field: 'config.subjectConfig.subject.organization' - - api_field: 'config.subjectConfig.subject.organizationalUnit' - - api_field: 'config.subjectConfig.subject.postalCode' - - api_field: 'config.subjectConfig.subject.province' - - api_field: 'config.subjectConfig.subject.streetAddress' - - api_field: 'config.subjectConfig.subjectAltName.dnsNames' - - api_field: 'config.subjectConfig.subjectAltName.emailAddresses' - - api_field: 'config.subjectConfig.subjectAltName.ipAddresses' - - api_field: 'config.subjectConfig.subjectAltName.uris' - - api_field: 'config.subjectKeyId.keyId' - - api_field: 'config.x509Config.additionalExtensions.critical' - - api_field: 'config.x509Config.additionalExtensions.objectId.objectIdPath' - - api_field: 'config.x509Config.additionalExtensions.value' - - api_field: 'config.x509Config.aiaOcspServers' - - api_field: 'config.x509Config.caOptions.isCa' - - api_field: 'config.x509Config.caOptions.maxIssuerPathLength' - - field: 'config.x509_config.ca_options.non_ca' - provider_only: true - - field: 'config.x509_config.ca_options.zero_max_issuer_path_length' - provider_only: true - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.certSign' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.contentCommitment' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.crlSign' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.dataEncipherment' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.decipherOnly' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.digitalSignature' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.encipherOnly' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.keyAgreement' - - api_field: 'config.x509Config.keyUsage.baseKeyUsage.keyEncipherment' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.clientAuth' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.codeSigning' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.emailProtection' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.ocspSigning' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.serverAuth' - - api_field: 'config.x509Config.keyUsage.extendedKeyUsage.timeStamping' - - api_field: 'config.x509Config.keyUsage.unknownExtendedKeyUsages.objectIdPath' - - api_field: 'config.x509Config.nameConstraints.critical' - - api_field: 'config.x509Config.nameConstraints.excludedDnsNames' - - api_field: 'config.x509Config.nameConstraints.excludedEmailAddresses' - - api_field: 'config.x509Config.nameConstraints.excludedIpRanges' - - api_field: 'config.x509Config.nameConstraints.excludedUris' - - api_field: 'config.x509Config.nameConstraints.permittedDnsNames' - - api_field: 'config.x509Config.nameConstraints.permittedEmailAddresses' - - api_field: 'config.x509Config.nameConstraints.permittedIpRanges' - - api_field: 'config.x509Config.nameConstraints.permittedUris' - - api_field: 'config.x509Config.policyIds.objectIdPath' - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'issuerCertificateAuthority' - - api_field: 'labels' - - api_field: 'lifetime' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'pemCertificate' - - api_field: 'pemCertificateChain' - - api_field: 'pemCsr' - - field: 'pool' - provider_only: true - - api_field: 'revocationDetails.revocationState' - - api_field: 'revocationDetails.revocationTime' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - field: certificate_authority + provider_only: true + - api_field: certificateDescription.aiaIssuingCertificateUrls + - api_field: certificateDescription.authorityKeyId.keyId + - api_field: certificateDescription.certFingerprint.sha256Hash + - api_field: certificateDescription.crlDistributionPoints + - api_field: certificateDescription.publicKey.format + - api_field: certificateDescription.publicKey.key + - api_field: certificateDescription.subjectDescription.hexSerialNumber + - api_field: certificateDescription.subjectDescription.lifetime + - api_field: certificateDescription.subjectDescription.notAfterTime + - api_field: certificateDescription.subjectDescription.notBeforeTime + - api_field: certificateDescription.subjectDescription.subject.commonName + - api_field: certificateDescription.subjectDescription.subject.countryCode + - api_field: certificateDescription.subjectDescription.subject.locality + - api_field: certificateDescription.subjectDescription.subject.organization + - api_field: certificateDescription.subjectDescription.subject.organizationalUnit + - api_field: certificateDescription.subjectDescription.subject.postalCode + - api_field: certificateDescription.subjectDescription.subject.province + - api_field: certificateDescription.subjectDescription.subject.streetAddress + - api_field: certificateDescription.subjectDescription.subjectAltName.customSans.critical + - api_field: certificateDescription.subjectDescription.subjectAltName.customSans.obectId.objectIdPath + - api_field: certificateDescription.subjectDescription.subjectAltName.customSans.value + - api_field: certificateDescription.subjectDescription.subjectAltName.dnsNames + - api_field: certificateDescription.subjectDescription.subjectAltName.emailAddresses + - api_field: certificateDescription.subjectDescription.subjectAltName.ipAddresses + - api_field: certificateDescription.subjectDescription.subjectAltName.uris + - api_field: certificateDescription.subjectKeyId.keyId + - api_field: certificateDescription.x509Description.additionalExtensions.critical + - api_field: certificateDescription.x509Description.additionalExtensions.objectId.objectIdPath + - api_field: certificateDescription.x509Description.additionalExtensions.value + - api_field: certificateDescription.x509Description.aiaOcspServers + - api_field: certificateDescription.x509Description.caOptions.isCa + - api_field: certificateDescription.x509Description.caOptions.maxIssuerPathLength + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.certSign + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.contentCommitment + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.crlSign + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.dataEncipherment + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.decipherOnly + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.digitalSignature + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.encipherOnly + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.keyAgreement + - api_field: certificateDescription.x509Description.keyUsage.baseKeyUsage.keyEncipherment + - api_field: certificateDescription.x509Description.keyUsage.extendedKeyUsage.clientAuth + - api_field: certificateDescription.x509Description.keyUsage.extendedKeyUsage.codeSigning + - api_field: certificateDescription.x509Description.keyUsage.extendedKeyUsage.emailProtection + - api_field: certificateDescription.x509Description.keyUsage.extendedKeyUsage.ocspSigning + - api_field: certificateDescription.x509Description.keyUsage.extendedKeyUsage.serverAuth + - api_field: certificateDescription.x509Description.keyUsage.extendedKeyUsage.timeStamping + - api_field: certificateDescription.x509Description.keyUsage.unknownExtendedKeyUsages.objectIdPath + - api_field: certificateDescription.x509Description.nameConstraints.critical + - api_field: certificateDescription.x509Description.nameConstraints.excludedDnsNames + - api_field: certificateDescription.x509Description.nameConstraints.excludedEmailAddresses + - api_field: certificateDescription.x509Description.nameConstraints.excludedIpRanges + - api_field: certificateDescription.x509Description.nameConstraints.excludedUris + - api_field: certificateDescription.x509Description.nameConstraints.permittedDnsNames + - api_field: certificateDescription.x509Description.nameConstraints.permittedEmailAddresses + - api_field: certificateDescription.x509Description.nameConstraints.permittedIpRanges + - api_field: certificateDescription.x509Description.nameConstraints.permittedUris + - api_field: certificateDescription.x509Description.policyIds.objectIdPath + - api_field: certificateTemplate + - api_field: config.publicKey.format + - api_field: config.publicKey.key + - api_field: config.subjectConfig.subject.commonName + - api_field: config.subjectConfig.subject.countryCode + - api_field: config.subjectConfig.subject.locality + - api_field: config.subjectConfig.subject.organization + - api_field: config.subjectConfig.subject.organizationalUnit + - api_field: config.subjectConfig.subject.postalCode + - api_field: config.subjectConfig.subject.province + - api_field: config.subjectConfig.subject.streetAddress + - api_field: config.subjectConfig.subjectAltName.dnsNames + - api_field: config.subjectConfig.subjectAltName.emailAddresses + - api_field: config.subjectConfig.subjectAltName.ipAddresses + - api_field: config.subjectConfig.subjectAltName.uris + - api_field: config.subjectKeyId.keyId + - api_field: config.x509Config.additionalExtensions.critical + - api_field: config.x509Config.additionalExtensions.objectId.objectIdPath + - api_field: config.x509Config.additionalExtensions.value + - api_field: config.x509Config.aiaOcspServers + - api_field: config.x509Config.caOptions.isCa + - api_field: config.x509Config.caOptions.maxIssuerPathLength + - field: config.x509_config.ca_options.non_ca + provider_only: true + - field: config.x509_config.ca_options.zero_max_issuer_path_length + provider_only: true + - api_field: config.x509Config.keyUsage.baseKeyUsage.certSign + - api_field: config.x509Config.keyUsage.baseKeyUsage.contentCommitment + - api_field: config.x509Config.keyUsage.baseKeyUsage.crlSign + - api_field: config.x509Config.keyUsage.baseKeyUsage.dataEncipherment + - api_field: config.x509Config.keyUsage.baseKeyUsage.decipherOnly + - api_field: config.x509Config.keyUsage.baseKeyUsage.digitalSignature + - api_field: config.x509Config.keyUsage.baseKeyUsage.encipherOnly + - api_field: config.x509Config.keyUsage.baseKeyUsage.keyAgreement + - api_field: config.x509Config.keyUsage.baseKeyUsage.keyEncipherment + - api_field: config.x509Config.keyUsage.extendedKeyUsage.clientAuth + - api_field: config.x509Config.keyUsage.extendedKeyUsage.codeSigning + - api_field: config.x509Config.keyUsage.extendedKeyUsage.emailProtection + - api_field: config.x509Config.keyUsage.extendedKeyUsage.ocspSigning + - api_field: config.x509Config.keyUsage.extendedKeyUsage.serverAuth + - api_field: config.x509Config.keyUsage.extendedKeyUsage.timeStamping + - api_field: config.x509Config.keyUsage.unknownExtendedKeyUsages.objectIdPath + - api_field: config.x509Config.nameConstraints.critical + - api_field: config.x509Config.nameConstraints.excludedDnsNames + - api_field: config.x509Config.nameConstraints.excludedEmailAddresses + - api_field: config.x509Config.nameConstraints.excludedIpRanges + - api_field: config.x509Config.nameConstraints.excludedUris + - api_field: config.x509Config.nameConstraints.permittedDnsNames + - api_field: config.x509Config.nameConstraints.permittedEmailAddresses + - api_field: config.x509Config.nameConstraints.permittedIpRanges + - api_field: config.x509Config.nameConstraints.permittedUris + - api_field: config.x509Config.policyIds.objectIdPath + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: issuerCertificateAuthority + - api_field: labels + - api_field: lifetime + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: pemCertificate + - api_field: pemCertificateChain + - api_field: pemCsr + - field: pool + provider_only: true + - api_field: revocationDetails.revocationState + - api_field: revocationDetails.revocationTime + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/privateca/resource_privateca_certificate_template_generated_meta.yaml b/google/services/privateca/resource_privateca_certificate_template_generated_meta.yaml index 8effec51783..c61c58cabf9 100644 --- a/google/services/privateca/resource_privateca_certificate_template_generated_meta.yaml +++ b/google/services/privateca/resource_privateca_certificate_template_generated_meta.yaml @@ -1,64 +1,64 @@ -resource: 'google_privateca_certificate_template' -generation_type: 'mmv1' -source_file: 'products/privateca/CertificateTemplate.yaml' -api_service_name: 'privateca.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CertificateTemplate' +resource: google_privateca_certificate_template +generation_type: mmv1 +source_file: products/privateca/CertificateTemplate.yaml +api_service_name: privateca.googleapis.com +api_version: v1 +api_resource_type_kind: CertificateTemplate fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'identityConstraints.allowSubjectAltNamesPassthrough' - - api_field: 'identityConstraints.allowSubjectPassthrough' - - api_field: 'identityConstraints.celExpression.description' - - api_field: 'identityConstraints.celExpression.expression' - - api_field: 'identityConstraints.celExpression.location' - - api_field: 'identityConstraints.celExpression.title' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'maximumLifetime' - - field: 'name' - provider_only: true - - api_field: 'passthroughExtensions.additionalExtensions.objectIdPath' - - api_field: 'passthroughExtensions.knownExtensions' - - api_field: 'predefinedValues.additionalExtensions.critical' - - api_field: 'predefinedValues.additionalExtensions.objectId.objectIdPath' - - api_field: 'predefinedValues.additionalExtensions.value' - - api_field: 'predefinedValues.aiaOcspServers' - - api_field: 'predefinedValues.caOptions.isCa' - - api_field: 'predefinedValues.caOptions.maxIssuerPathLength' - - field: 'predefined_values.ca_options.null_ca' - provider_only: true - - field: 'predefined_values.ca_options.zero_max_issuer_path_length' - provider_only: true - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.certSign' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.contentCommitment' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.crlSign' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.dataEncipherment' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.decipherOnly' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.digitalSignature' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.encipherOnly' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.keyAgreement' - - api_field: 'predefinedValues.keyUsage.baseKeyUsage.keyEncipherment' - - api_field: 'predefinedValues.keyUsage.extendedKeyUsage.clientAuth' - - api_field: 'predefinedValues.keyUsage.extendedKeyUsage.codeSigning' - - api_field: 'predefinedValues.keyUsage.extendedKeyUsage.emailProtection' - - api_field: 'predefinedValues.keyUsage.extendedKeyUsage.ocspSigning' - - api_field: 'predefinedValues.keyUsage.extendedKeyUsage.serverAuth' - - api_field: 'predefinedValues.keyUsage.extendedKeyUsage.timeStamping' - - api_field: 'predefinedValues.keyUsage.unknownExtendedKeyUsages.objectIdPath' - - api_field: 'predefinedValues.nameConstraints.critical' - - api_field: 'predefinedValues.nameConstraints.excludedDnsNames' - - api_field: 'predefinedValues.nameConstraints.excludedEmailAddresses' - - api_field: 'predefinedValues.nameConstraints.excludedIpRanges' - - api_field: 'predefinedValues.nameConstraints.excludedUris' - - api_field: 'predefinedValues.nameConstraints.permittedDnsNames' - - api_field: 'predefinedValues.nameConstraints.permittedEmailAddresses' - - api_field: 'predefinedValues.nameConstraints.permittedIpRanges' - - api_field: 'predefinedValues.nameConstraints.permittedUris' - - api_field: 'predefinedValues.policyIds.objectIdPath' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: identityConstraints.allowSubjectAltNamesPassthrough + - api_field: identityConstraints.allowSubjectPassthrough + - api_field: identityConstraints.celExpression.description + - api_field: identityConstraints.celExpression.expression + - api_field: identityConstraints.celExpression.location + - api_field: identityConstraints.celExpression.title + - api_field: labels + - field: location + provider_only: true + - api_field: maximumLifetime + - field: name + provider_only: true + - api_field: passthroughExtensions.additionalExtensions.objectIdPath + - api_field: passthroughExtensions.knownExtensions + - api_field: predefinedValues.additionalExtensions.critical + - api_field: predefinedValues.additionalExtensions.objectId.objectIdPath + - api_field: predefinedValues.additionalExtensions.value + - api_field: predefinedValues.aiaOcspServers + - api_field: predefinedValues.caOptions.isCa + - api_field: predefinedValues.caOptions.maxIssuerPathLength + - field: predefined_values.ca_options.null_ca + provider_only: true + - field: predefined_values.ca_options.zero_max_issuer_path_length + provider_only: true + - api_field: predefinedValues.keyUsage.baseKeyUsage.certSign + - api_field: predefinedValues.keyUsage.baseKeyUsage.contentCommitment + - api_field: predefinedValues.keyUsage.baseKeyUsage.crlSign + - api_field: predefinedValues.keyUsage.baseKeyUsage.dataEncipherment + - api_field: predefinedValues.keyUsage.baseKeyUsage.decipherOnly + - api_field: predefinedValues.keyUsage.baseKeyUsage.digitalSignature + - api_field: predefinedValues.keyUsage.baseKeyUsage.encipherOnly + - api_field: predefinedValues.keyUsage.baseKeyUsage.keyAgreement + - api_field: predefinedValues.keyUsage.baseKeyUsage.keyEncipherment + - api_field: predefinedValues.keyUsage.extendedKeyUsage.clientAuth + - api_field: predefinedValues.keyUsage.extendedKeyUsage.codeSigning + - api_field: predefinedValues.keyUsage.extendedKeyUsage.emailProtection + - api_field: predefinedValues.keyUsage.extendedKeyUsage.ocspSigning + - api_field: predefinedValues.keyUsage.extendedKeyUsage.serverAuth + - api_field: predefinedValues.keyUsage.extendedKeyUsage.timeStamping + - api_field: predefinedValues.keyUsage.unknownExtendedKeyUsages.objectIdPath + - api_field: predefinedValues.nameConstraints.critical + - api_field: predefinedValues.nameConstraints.excludedDnsNames + - api_field: predefinedValues.nameConstraints.excludedEmailAddresses + - api_field: predefinedValues.nameConstraints.excludedIpRanges + - api_field: predefinedValues.nameConstraints.excludedUris + - api_field: predefinedValues.nameConstraints.permittedDnsNames + - api_field: predefinedValues.nameConstraints.permittedEmailAddresses + - api_field: predefinedValues.nameConstraints.permittedIpRanges + - api_field: predefinedValues.nameConstraints.permittedUris + - api_field: predefinedValues.policyIds.objectIdPath + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/privilegedaccessmanager/resource_privileged_access_manager_entitlement_generated_meta.yaml b/google/services/privilegedaccessmanager/resource_privileged_access_manager_entitlement_generated_meta.yaml index 54741679a72..540efb4722a 100644 --- a/google/services/privilegedaccessmanager/resource_privileged_access_manager_entitlement_generated_meta.yaml +++ b/google/services/privilegedaccessmanager/resource_privileged_access_manager_entitlement_generated_meta.yaml @@ -1,36 +1,36 @@ -resource: 'google_privileged_access_manager_entitlement' -generation_type: 'mmv1' -source_file: 'products/privilegedaccessmanager/Entitlement.yaml' -api_service_name: 'privilegedaccessmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Entitlement' +resource: google_privileged_access_manager_entitlement +generation_type: mmv1 +source_file: products/privilegedaccessmanager/Entitlement.yaml +api_service_name: privilegedaccessmanager.googleapis.com +api_version: v1 +api_resource_type_kind: Entitlement api_variant_patterns: - - 'folders/{folder}/locations/{location}/entitlements/{entitlement}' - - 'organizations/{organization}/locations/{location}/entitlements/{entitlement}' - - 'projects/{project}/locations/{location}/entitlements/{entitlement}' + - folders/{folder}/locations/{location}/entitlements/{entitlement} + - organizations/{organization}/locations/{location}/entitlements/{entitlement} + - projects/{project}/locations/{location}/entitlements/{entitlement} fields: - - api_field: 'additionalNotificationTargets.adminEmailRecipients' - - api_field: 'additionalNotificationTargets.requesterEmailRecipients' - - api_field: 'approvalWorkflow.manualApprovals.requireApproverJustification' - - api_field: 'approvalWorkflow.manualApprovals.steps.approvalsNeeded' - - api_field: 'approvalWorkflow.manualApprovals.steps.approverEmailRecipients' - - api_field: 'approvalWorkflow.manualApprovals.steps.approvers.principals' - - api_field: 'createTime' - - api_field: 'eligibleUsers.principals' - - field: 'entitlement_id' - provider_only: true - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'maxRequestDuration' - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'privilegedAccess.gcpIamAccess.resource' - - api_field: 'privilegedAccess.gcpIamAccess.resourceType' - - api_field: 'privilegedAccess.gcpIamAccess.roleBindings.conditionExpression' - - api_field: 'privilegedAccess.gcpIamAccess.roleBindings.role' - - api_field: 'requesterJustificationConfig.notMandatory' - - api_field: 'requesterJustificationConfig.unstructured' - - api_field: 'state' - - api_field: 'updateTime' + - api_field: additionalNotificationTargets.adminEmailRecipients + - api_field: additionalNotificationTargets.requesterEmailRecipients + - api_field: approvalWorkflow.manualApprovals.requireApproverJustification + - api_field: approvalWorkflow.manualApprovals.steps.approvalsNeeded + - api_field: approvalWorkflow.manualApprovals.steps.approverEmailRecipients + - api_field: approvalWorkflow.manualApprovals.steps.approvers.principals + - api_field: createTime + - api_field: eligibleUsers.principals + - field: entitlement_id + provider_only: true + - api_field: etag + - field: location + provider_only: true + - api_field: maxRequestDuration + - api_field: name + - field: parent + provider_only: true + - api_field: privilegedAccess.gcpIamAccess.resource + - api_field: privilegedAccess.gcpIamAccess.resourceType + - api_field: privilegedAccess.gcpIamAccess.roleBindings.conditionExpression + - api_field: privilegedAccess.gcpIamAccess.roleBindings.role + - api_field: requesterJustificationConfig.notMandatory + - api_field: requesterJustificationConfig.unstructured + - api_field: state + - api_field: updateTime diff --git a/google/services/publicca/resource_public_ca_external_account_key_generated_meta.yaml b/google/services/publicca/resource_public_ca_external_account_key_generated_meta.yaml index cd25fd5783a..d88028a4a41 100644 --- a/google/services/publicca/resource_public_ca_external_account_key_generated_meta.yaml +++ b/google/services/publicca/resource_public_ca_external_account_key_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_public_ca_external_account_key' -generation_type: 'mmv1' -source_file: 'products/publicca/ExternalAccountKey.yaml' -api_service_name: 'publicca.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ExternalAccountKey' +resource: google_public_ca_external_account_key +generation_type: mmv1 +source_file: products/publicca/ExternalAccountKey.yaml +api_service_name: publicca.googleapis.com +api_version: v1 +api_resource_type_kind: ExternalAccountKey fields: - - api_field: 'b64MacKey' - - api_field: 'b64urlMacKey' - - api_field: 'keyId' - - field: 'location' - provider_only: true - - api_field: 'name' + - api_field: b64MacKey + - api_field: b64urlMacKey + - api_field: keyId + - field: location + provider_only: true + - api_field: name diff --git a/google/services/pubsub/iam_pubsub_schema_generated_test.go b/google/services/pubsub/iam_pubsub_schema_generated_test.go index 7fb6b823676..79b90941a27 100644 --- a/google/services/pubsub/iam_pubsub_schema_generated_test.go +++ b/google/services/pubsub/iam_pubsub_schema_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccPubsubSchemaIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_schema_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/schemas/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-schema%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubSchemaIAMBindingStateID("google_pubsub_schema_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccPubsubSchemaIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_schema_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/schemas/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-schema%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubSchemaIAMBindingStateID("google_pubsub_schema_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccPubsubSchemaIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_schema_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/schemas/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-schema%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubSchemaIAMMemberStateID("google_pubsub_schema_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccPubsubSchemaIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_schema_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/schemas/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-schema%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubSchemaIAMPolicyStateID("google_pubsub_schema_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccPubsubSchemaIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_schema_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/schemas/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-schema%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubSchemaIAMPolicyStateID("google_pubsub_schema_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -234,3 +235,54 @@ resource "google_pubsub_schema_iam_binding" "foo" { } `, context) } + +func generatePubsubSchemaIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + schema := tpgresource.GetResourceNameFromSelfLink(rawState["schema"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/schemas/%s", project, schema), "", "", rawState["condition.0.title"]), nil + } +} + +func generatePubsubSchemaIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + schema := tpgresource.GetResourceNameFromSelfLink(rawState["schema"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/schemas/%s", project, schema), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generatePubsubSchemaIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + schema := tpgresource.GetResourceNameFromSelfLink(rawState["schema"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/schemas/%s", project, schema), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/pubsub/iam_pubsub_topic_generated_test.go b/google/services/pubsub/iam_pubsub_topic_generated_test.go index 82cf4d6d40b..2e269108140 100644 --- a/google/services/pubsub/iam_pubsub_topic_generated_test.go +++ b/google/services/pubsub/iam_pubsub_topic_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccPubsubTopicIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_topic_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/topics/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-topic%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubTopicIAMBindingStateID("google_pubsub_topic_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccPubsubTopicIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_topic_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/topics/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-topic%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubTopicIAMBindingStateID("google_pubsub_topic_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccPubsubTopicIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_topic_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/topics/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-topic%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubTopicIAMMemberStateID("google_pubsub_topic_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccPubsubTopicIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_topic_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/topics/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-topic%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubTopicIAMPolicyStateID("google_pubsub_topic_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccPubsubTopicIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_pubsub_topic_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/topics/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("tf-test-example-topic%s", context["random_suffix"])), + ImportStateIdFunc: generatePubsubTopicIAMPolicyStateID("google_pubsub_topic_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -254,3 +255,54 @@ resource "google_pubsub_topic_iam_binding" "foo" { } `, context) } + +func generatePubsubTopicIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + topic := tpgresource.GetResourceNameFromSelfLink(rawState["topic"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/topics/%s", project, topic), "", "", rawState["condition.0.title"]), nil + } +} + +func generatePubsubTopicIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + topic := tpgresource.GetResourceNameFromSelfLink(rawState["topic"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/topics/%s", project, topic), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generatePubsubTopicIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + topic := tpgresource.GetResourceNameFromSelfLink(rawState["topic"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/topics/%s", project, topic), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/pubsub/resource_pubsub_schema_generated_meta.yaml b/google/services/pubsub/resource_pubsub_schema_generated_meta.yaml index f60d341b7c3..243bc84cb64 100644 --- a/google/services/pubsub/resource_pubsub_schema_generated_meta.yaml +++ b/google/services/pubsub/resource_pubsub_schema_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_pubsub_schema' -generation_type: 'mmv1' -source_file: 'products/pubsub/Schema.yaml' -api_service_name: 'pubsub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Schema' +resource: google_pubsub_schema +generation_type: mmv1 +source_file: products/pubsub/Schema.yaml +api_service_name: pubsub.googleapis.com +api_version: v1 +api_resource_type_kind: Schema fields: - - api_field: 'definition' - - api_field: 'name' - - api_field: 'type' + - api_field: definition + - api_field: name + - api_field: type diff --git a/google/services/pubsub/resource_pubsub_subscription_generated_meta.yaml b/google/services/pubsub/resource_pubsub_subscription_generated_meta.yaml index 73aa2685d23..6747c68f7b6 100644 --- a/google/services/pubsub/resource_pubsub_subscription_generated_meta.yaml +++ b/google/services/pubsub/resource_pubsub_subscription_generated_meta.yaml @@ -1,51 +1,51 @@ -resource: 'google_pubsub_subscription' -generation_type: 'mmv1' -source_file: 'products/pubsub/Subscription.yaml' -api_service_name: 'pubsub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Subscription' +resource: google_pubsub_subscription +generation_type: mmv1 +source_file: products/pubsub/Subscription.yaml +api_service_name: pubsub.googleapis.com +api_version: v1 +api_resource_type_kind: Subscription fields: - - api_field: 'ackDeadlineSeconds' - - api_field: 'bigqueryConfig.dropUnknownFields' - - api_field: 'bigqueryConfig.serviceAccountEmail' - - api_field: 'bigqueryConfig.table' - - api_field: 'bigqueryConfig.useTableSchema' - - api_field: 'bigqueryConfig.useTopicSchema' - - api_field: 'bigqueryConfig.writeMetadata' - - api_field: 'cloudStorageConfig.avroConfig.useTopicSchema' - - api_field: 'cloudStorageConfig.avroConfig.writeMetadata' - - api_field: 'cloudStorageConfig.bucket' - - api_field: 'cloudStorageConfig.filenameDatetimeFormat' - - api_field: 'cloudStorageConfig.filenamePrefix' - - api_field: 'cloudStorageConfig.filenameSuffix' - - api_field: 'cloudStorageConfig.maxBytes' - - api_field: 'cloudStorageConfig.maxDuration' - - api_field: 'cloudStorageConfig.maxMessages' - - api_field: 'cloudStorageConfig.serviceAccountEmail' - - api_field: 'cloudStorageConfig.state' - - api_field: 'deadLetterPolicy.deadLetterTopic' - - api_field: 'deadLetterPolicy.maxDeliveryAttempts' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableExactlyOnceDelivery' - - api_field: 'enableMessageOrdering' - - api_field: 'expirationPolicy.ttl' - - api_field: 'filter' - - api_field: 'labels' - - api_field: 'messageRetentionDuration' - - api_field: 'messageTransforms.disabled' - - api_field: 'messageTransforms.javascriptUdf.code' - - api_field: 'messageTransforms.javascriptUdf.functionName' - - api_field: 'name' - - api_field: 'pushConfig.attributes' - - api_field: 'pushConfig.noWrapper.writeMetadata' - - api_field: 'pushConfig.oidcToken.audience' - - api_field: 'pushConfig.oidcToken.serviceAccountEmail' - - api_field: 'pushConfig.pushEndpoint' - - api_field: 'retainAckedMessages' - - api_field: 'retryPolicy.maximumBackoff' - - api_field: 'retryPolicy.minimumBackoff' - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true - - api_field: 'topic' + - api_field: ackDeadlineSeconds + - api_field: bigqueryConfig.dropUnknownFields + - api_field: bigqueryConfig.serviceAccountEmail + - api_field: bigqueryConfig.table + - api_field: bigqueryConfig.useTableSchema + - api_field: bigqueryConfig.useTopicSchema + - api_field: bigqueryConfig.writeMetadata + - api_field: cloudStorageConfig.avroConfig.useTopicSchema + - api_field: cloudStorageConfig.avroConfig.writeMetadata + - api_field: cloudStorageConfig.bucket + - api_field: cloudStorageConfig.filenameDatetimeFormat + - api_field: cloudStorageConfig.filenamePrefix + - api_field: cloudStorageConfig.filenameSuffix + - api_field: cloudStorageConfig.maxBytes + - api_field: cloudStorageConfig.maxDuration + - api_field: cloudStorageConfig.maxMessages + - api_field: cloudStorageConfig.serviceAccountEmail + - api_field: cloudStorageConfig.state + - api_field: deadLetterPolicy.deadLetterTopic + - api_field: deadLetterPolicy.maxDeliveryAttempts + - field: effective_labels + provider_only: true + - api_field: enableExactlyOnceDelivery + - api_field: enableMessageOrdering + - api_field: expirationPolicy.ttl + - api_field: filter + - api_field: labels + - api_field: messageRetentionDuration + - api_field: messageTransforms.disabled + - api_field: messageTransforms.javascriptUdf.code + - api_field: messageTransforms.javascriptUdf.functionName + - api_field: name + - api_field: pushConfig.attributes + - api_field: pushConfig.noWrapper.writeMetadata + - api_field: pushConfig.oidcToken.audience + - api_field: pushConfig.oidcToken.serviceAccountEmail + - api_field: pushConfig.pushEndpoint + - api_field: retainAckedMessages + - api_field: retryPolicy.maximumBackoff + - api_field: retryPolicy.minimumBackoff + - api_field: tags + - field: terraform_labels + provider_only: true + - api_field: topic diff --git a/google/services/pubsub/resource_pubsub_subscription_test.go b/google/services/pubsub/resource_pubsub_subscription_test.go index 29898041b3e..c8d6993a4b7 100644 --- a/google/services/pubsub/resource_pubsub_subscription_test.go +++ b/google/services/pubsub/resource_pubsub_subscription_test.go @@ -256,6 +256,8 @@ func TestAccPubsubSubscriptionBigQuery_serviceAccount(t *testing.T) { table := fmt.Sprintf("tf-test-table-%s", acctest.RandString(t, 10)) topic := fmt.Sprintf("tf-test-topic-%s", acctest.RandString(t, 10)) subscriptionShort := fmt.Sprintf("tf-test-sub-%s", acctest.RandString(t, 10)) + serviceAccount := fmt.Sprintf("bq-test-sa-%s", acctest.RandString(t, 10)) + serviceAccount2 := fmt.Sprintf("bq-test-sa2-%s", acctest.RandString(t, 10)) acctest.BootstrapIamMembers(t, []acctest.IamMember{ { @@ -277,7 +279,7 @@ func TestAccPubsubSubscriptionBigQuery_serviceAccount(t *testing.T) { }, Steps: []resource.TestStep{ { - Config: testAccPubsubSubscriptionBigQuery_basic(dataset, table, topic, subscriptionShort, false, "bq-test-sa"), + Config: testAccPubsubSubscriptionBigQuery_basic(dataset, table, topic, subscriptionShort, false, serviceAccount), }, { ResourceName: "google_pubsub_subscription.foo", @@ -295,7 +297,7 @@ func TestAccPubsubSubscriptionBigQuery_serviceAccount(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPubsubSubscriptionBigQuery_basic(dataset, table, topic, subscriptionShort, true, "bq-test-sa2"), + Config: testAccPubsubSubscriptionBigQuery_basic(dataset, table, topic, subscriptionShort, true, serviceAccount2), }, { ResourceName: "google_pubsub_subscription.foo", @@ -406,6 +408,8 @@ func TestAccPubsubSubscriptionCloudStorage_serviceAccount(t *testing.T) { bucket := fmt.Sprintf("tf-test-bucket-%s", acctest.RandString(t, 10)) topic := fmt.Sprintf("tf-test-topic-%s", acctest.RandString(t, 10)) subscriptionShort := fmt.Sprintf("tf-test-sub-%s", acctest.RandString(t, 10)) + serviceAccount := fmt.Sprintf("gcs-test-sa-%s", acctest.RandString(t, 10)) + serviceAccount2 := fmt.Sprintf("gcs-test-sa2-%s", acctest.RandString(t, 10)) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -413,7 +417,7 @@ func TestAccPubsubSubscriptionCloudStorage_serviceAccount(t *testing.T) { CheckDestroy: testAccCheckPubsubSubscriptionDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccPubsubSubscriptionCloudStorage_basic(bucket, topic, subscriptionShort, "", "", "", 0, "", 0, "gcs-test-sa", "text"), + Config: testAccPubsubSubscriptionCloudStorage_basic(bucket, topic, subscriptionShort, "", "", "", 0, "", 0, serviceAccount, "text"), }, { ResourceName: "google_pubsub_subscription.foo", @@ -431,7 +435,7 @@ func TestAccPubsubSubscriptionCloudStorage_serviceAccount(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccPubsubSubscriptionCloudStorage_basic(bucket, topic, subscriptionShort, "", "", "", 0, "", 0, "gcs-test-sa2", "avro"), + Config: testAccPubsubSubscriptionCloudStorage_basic(bucket, topic, subscriptionShort, "", "", "", 0, "", 0, serviceAccount2, "avro"), }, { ResourceName: "google_pubsub_subscription.foo", diff --git a/google/services/pubsub/resource_pubsub_topic_generated_meta.yaml b/google/services/pubsub/resource_pubsub_topic_generated_meta.yaml index 104c661da9e..a9a3998f104 100644 --- a/google/services/pubsub/resource_pubsub_topic_generated_meta.yaml +++ b/google/services/pubsub/resource_pubsub_topic_generated_meta.yaml @@ -1,50 +1,50 @@ -resource: 'google_pubsub_topic' -generation_type: 'mmv1' -source_file: 'products/pubsub/Topic.yaml' -api_service_name: 'pubsub.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Topic' +resource: google_pubsub_topic +generation_type: mmv1 +source_file: products/pubsub/Topic.yaml +api_service_name: pubsub.googleapis.com +api_version: v1 +api_resource_type_kind: Topic fields: - - field: 'effective_labels' - provider_only: true - - api_field: 'ingestionDataSourceSettings.awsKinesis.awsRoleArn' - - api_field: 'ingestionDataSourceSettings.awsKinesis.consumerArn' - - api_field: 'ingestionDataSourceSettings.awsKinesis.gcpServiceAccount' - - api_field: 'ingestionDataSourceSettings.awsKinesis.streamArn' - - api_field: 'ingestionDataSourceSettings.awsMsk.awsRoleArn' - - api_field: 'ingestionDataSourceSettings.awsMsk.clusterArn' - - api_field: 'ingestionDataSourceSettings.awsMsk.gcpServiceAccount' - - api_field: 'ingestionDataSourceSettings.awsMsk.topic' - - api_field: 'ingestionDataSourceSettings.azureEventHubs.clientId' - - api_field: 'ingestionDataSourceSettings.azureEventHubs.eventHub' - - api_field: 'ingestionDataSourceSettings.azureEventHubs.gcpServiceAccount' - - api_field: 'ingestionDataSourceSettings.azureEventHubs.namespace' - - api_field: 'ingestionDataSourceSettings.azureEventHubs.resourceGroup' - - api_field: 'ingestionDataSourceSettings.azureEventHubs.subscriptionId' - - api_field: 'ingestionDataSourceSettings.azureEventHubs.tenantId' - - api_field: 'ingestionDataSourceSettings.cloudStorage.avroFormat' - - api_field: 'ingestionDataSourceSettings.cloudStorage.bucket' - - api_field: 'ingestionDataSourceSettings.cloudStorage.matchGlob' - - api_field: 'ingestionDataSourceSettings.cloudStorage.minimumObjectCreateTime' - - api_field: 'ingestionDataSourceSettings.cloudStorage.pubsubAvroFormat' - - api_field: 'ingestionDataSourceSettings.cloudStorage.textFormat.delimiter' - - api_field: 'ingestionDataSourceSettings.confluentCloud.bootstrapServer' - - api_field: 'ingestionDataSourceSettings.confluentCloud.clusterId' - - api_field: 'ingestionDataSourceSettings.confluentCloud.gcpServiceAccount' - - api_field: 'ingestionDataSourceSettings.confluentCloud.identityPoolId' - - api_field: 'ingestionDataSourceSettings.confluentCloud.topic' - - api_field: 'ingestionDataSourceSettings.platformLogsSettings.severity' - - api_field: 'kmsKeyName' - - api_field: 'labels' - - api_field: 'messageRetentionDuration' - - api_field: 'messageStoragePolicy.allowedPersistenceRegions' - - api_field: 'messageStoragePolicy.enforceInTransit' - - api_field: 'messageTransforms.disabled' - - api_field: 'messageTransforms.javascriptUdf.code' - - api_field: 'messageTransforms.javascriptUdf.functionName' - - api_field: 'name' - - api_field: 'schemaSettings.encoding' - - api_field: 'schemaSettings.schema' - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true + - field: effective_labels + provider_only: true + - api_field: ingestionDataSourceSettings.awsKinesis.awsRoleArn + - api_field: ingestionDataSourceSettings.awsKinesis.consumerArn + - api_field: ingestionDataSourceSettings.awsKinesis.gcpServiceAccount + - api_field: ingestionDataSourceSettings.awsKinesis.streamArn + - api_field: ingestionDataSourceSettings.awsMsk.awsRoleArn + - api_field: ingestionDataSourceSettings.awsMsk.clusterArn + - api_field: ingestionDataSourceSettings.awsMsk.gcpServiceAccount + - api_field: ingestionDataSourceSettings.awsMsk.topic + - api_field: ingestionDataSourceSettings.azureEventHubs.clientId + - api_field: ingestionDataSourceSettings.azureEventHubs.eventHub + - api_field: ingestionDataSourceSettings.azureEventHubs.gcpServiceAccount + - api_field: ingestionDataSourceSettings.azureEventHubs.namespace + - api_field: ingestionDataSourceSettings.azureEventHubs.resourceGroup + - api_field: ingestionDataSourceSettings.azureEventHubs.subscriptionId + - api_field: ingestionDataSourceSettings.azureEventHubs.tenantId + - api_field: ingestionDataSourceSettings.cloudStorage.avroFormat + - api_field: ingestionDataSourceSettings.cloudStorage.bucket + - api_field: ingestionDataSourceSettings.cloudStorage.matchGlob + - api_field: ingestionDataSourceSettings.cloudStorage.minimumObjectCreateTime + - api_field: ingestionDataSourceSettings.cloudStorage.pubsubAvroFormat + - api_field: ingestionDataSourceSettings.cloudStorage.textFormat.delimiter + - api_field: ingestionDataSourceSettings.confluentCloud.bootstrapServer + - api_field: ingestionDataSourceSettings.confluentCloud.clusterId + - api_field: ingestionDataSourceSettings.confluentCloud.gcpServiceAccount + - api_field: ingestionDataSourceSettings.confluentCloud.identityPoolId + - api_field: ingestionDataSourceSettings.confluentCloud.topic + - api_field: ingestionDataSourceSettings.platformLogsSettings.severity + - api_field: kmsKeyName + - api_field: labels + - api_field: messageRetentionDuration + - api_field: messageStoragePolicy.allowedPersistenceRegions + - api_field: messageStoragePolicy.enforceInTransit + - api_field: messageTransforms.disabled + - api_field: messageTransforms.javascriptUdf.code + - api_field: messageTransforms.javascriptUdf.functionName + - api_field: name + - api_field: schemaSettings.encoding + - api_field: schemaSettings.schema + - api_field: tags + - field: terraform_labels + provider_only: true diff --git a/google/services/pubsublite/resource_pubsub_lite_reservation_generated_meta.yaml b/google/services/pubsublite/resource_pubsub_lite_reservation_generated_meta.yaml index 0ffc6f13efb..c3d0aa97074 100644 --- a/google/services/pubsublite/resource_pubsub_lite_reservation_generated_meta.yaml +++ b/google/services/pubsublite/resource_pubsub_lite_reservation_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_pubsub_lite_reservation' -generation_type: 'mmv1' -source_file: 'products/pubsublite/Reservation.yaml' -api_service_name: 'pubsublite.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Reservation' +resource: google_pubsub_lite_reservation +generation_type: mmv1 +source_file: products/pubsublite/Reservation.yaml +api_service_name: pubsublite.googleapis.com +api_version: v1 +api_resource_type_kind: Reservation fields: - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true - - api_field: 'throughputCapacity' + - field: name + provider_only: true + - field: region + provider_only: true + - api_field: throughputCapacity diff --git a/google/services/pubsublite/resource_pubsub_lite_subscription_generated_meta.yaml b/google/services/pubsublite/resource_pubsub_lite_subscription_generated_meta.yaml index f9a4bf01ee9..b5fee62b592 100644 --- a/google/services/pubsublite/resource_pubsub_lite_subscription_generated_meta.yaml +++ b/google/services/pubsublite/resource_pubsub_lite_subscription_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_pubsub_lite_subscription' -generation_type: 'mmv1' -source_file: 'products/pubsublite/Subscription.yaml' -api_service_name: 'pubsublite.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Subscription' +resource: google_pubsub_lite_subscription +generation_type: mmv1 +source_file: products/pubsublite/Subscription.yaml +api_service_name: pubsublite.googleapis.com +api_version: v1 +api_resource_type_kind: Subscription fields: - - api_field: 'deliveryConfig.deliveryRequirement' - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true - - api_field: 'topic' - - field: 'zone' - provider_only: true + - api_field: deliveryConfig.deliveryRequirement + - field: name + provider_only: true + - field: region + provider_only: true + - api_field: topic + - field: zone + provider_only: true diff --git a/google/services/pubsublite/resource_pubsub_lite_topic_generated_meta.yaml b/google/services/pubsublite/resource_pubsub_lite_topic_generated_meta.yaml index 92fce8f0795..d37bca09dcd 100644 --- a/google/services/pubsublite/resource_pubsub_lite_topic_generated_meta.yaml +++ b/google/services/pubsublite/resource_pubsub_lite_topic_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_pubsub_lite_topic' -generation_type: 'mmv1' -source_file: 'products/pubsublite/Topic.yaml' -api_service_name: 'pubsublite.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Topic' +resource: google_pubsub_lite_topic +generation_type: mmv1 +source_file: products/pubsublite/Topic.yaml +api_service_name: pubsublite.googleapis.com +api_version: v1 +api_resource_type_kind: Topic fields: - - field: 'name' - provider_only: true - - api_field: 'partitionConfig.capacity.publishMibPerSec' - - api_field: 'partitionConfig.capacity.subscribeMibPerSec' - - api_field: 'partitionConfig.count' - - field: 'region' - provider_only: true - - api_field: 'reservationConfig.throughputReservation' - - api_field: 'retentionConfig.perPartitionBytes' - - api_field: 'retentionConfig.period' - - field: 'zone' - provider_only: true + - field: name + provider_only: true + - api_field: partitionConfig.capacity.publishMibPerSec + - api_field: partitionConfig.capacity.subscribeMibPerSec + - api_field: partitionConfig.count + - field: region + provider_only: true + - api_field: reservationConfig.throughputReservation + - api_field: retentionConfig.perPartitionBytes + - api_field: retentionConfig.period + - field: zone + provider_only: true diff --git a/google/services/redis/resource_redis_cluster.go b/google/services/redis/resource_redis_cluster.go index 045efcfa10d..441330253dd 100644 --- a/google/services/redis/resource_redis_cluster.go +++ b/google/services/redis/resource_redis_cluster.go @@ -104,6 +104,7 @@ func ResourceRedisCluster() *schema.Resource { }, CustomizeDiff: customdiff.All( + tpgresource.SetLabelsDiff, tpgresource.DefaultProviderProject, tpgresource.DefaultProviderRegion, ), @@ -344,6 +345,15 @@ Default value is true.`, Optional: true, Description: `The KMS key used to encrypt the at-rest data of the cluster.`, }, + "labels": { + Type: schema.TypeMap, + Optional: true, + Description: `Resource labels to represent user provided metadata. + +**Note**: This field is non-authoritative, and will only manage the labels present in your configuration. +Please refer to the field 'effective_labels' for all of the labels present on the resource.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "maintenance_policy": { Type: schema.TypeList, Optional: true, @@ -677,6 +687,12 @@ projects/{network_project_id}/global/networks/{network_id}.`, }, }, }, + "effective_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "effective_maintenance_version": { Type: schema.TypeString, Computed: true, @@ -836,6 +852,13 @@ resolution and up to nine fractional digits.`, }, }, }, + "terraform_labels": { + Type: schema.TypeMap, + Computed: true, + Description: `The combination of labels configured directly on the resource + and default labels configured on the provider.`, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "uid": { Type: schema.TypeString, Computed: true, @@ -962,6 +985,12 @@ func resourceRedisClusterCreate(d *schema.ResourceData, meta interface{}) error } else if v, ok := d.GetOkExists("kms_key"); !tpgresource.IsEmptyValue(reflect.ValueOf(kmsKeyProp)) && (ok || !reflect.DeepEqual(v, kmsKeyProp)) { obj["kmsKey"] = kmsKeyProp } + effectiveLabelsProp, err := expandRedisClusterEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(effectiveLabelsProp)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } obj, err = resourceRedisClusterEncoder(d, meta, obj) if err != nil { @@ -1107,6 +1136,9 @@ func resourceRedisClusterRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Error reading Cluster: %s", err) } + if err := d.Set("labels", flattenRedisClusterLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Cluster: %s", err) + } if err := d.Set("create_time", flattenRedisClusterCreateTime(res["createTime"], d, config)); err != nil { return fmt.Errorf("Error reading Cluster: %s", err) } @@ -1191,6 +1223,12 @@ func resourceRedisClusterRead(d *schema.ResourceData, meta interface{}) error { if err := d.Set("managed_server_ca", flattenRedisClusterManagedServerCa(res["managedServerCa"], d, config)); err != nil { return fmt.Errorf("Error reading Cluster: %s", err) } + if err := d.Set("terraform_labels", flattenRedisClusterTerraformLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Cluster: %s", err) + } + if err := d.Set("effective_labels", flattenRedisClusterEffectiveLabels(res["labels"], d, config)); err != nil { + return fmt.Errorf("Error reading Cluster: %s", err) + } identity, err := d.Identity() if err == nil && identity != nil { @@ -1328,6 +1366,12 @@ func resourceRedisClusterUpdate(d *schema.ResourceData, meta interface{}) error } else if v, ok := d.GetOkExists("kms_key"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, kmsKeyProp)) { obj["kmsKey"] = kmsKeyProp } + effectiveLabelsProp, err := expandRedisClusterEffectiveLabels(d.Get("effective_labels"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("effective_labels"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, effectiveLabelsProp)) { + obj["labels"] = effectiveLabelsProp + } obj, err = resourceRedisClusterEncoder(d, meta, obj) if err != nil { @@ -1390,6 +1434,10 @@ func resourceRedisClusterUpdate(d *schema.ResourceData, meta interface{}) error if d.HasChange("kms_key") { updateMask = append(updateMask, "kmsKey") } + + if d.HasChange("effective_labels") { + updateMask = append(updateMask, "labels") + } // updateMask is a URL parameter but not present in the schema, so ReplaceVars // won't set it url, err = transport_tpg.AddQueryParams(url, map[string]string{"updateMask": strings.Join(updateMask, ",")}) @@ -1510,6 +1558,21 @@ func resourceRedisClusterImport(d *schema.ResourceData, meta interface{}) ([]*sc return []*schema.ResourceData{d}, nil } +func flattenRedisClusterLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + func flattenRedisClusterCreateTime(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { return v } @@ -2301,6 +2364,25 @@ func flattenRedisClusterManagedServerCaCaCertsCertificates(v interface{}, d *sch return v } +func flattenRedisClusterTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return v + } + + transformed := make(map[string]interface{}) + if l, ok := d.GetOkExists("terraform_labels"); ok { + for k := range l.(map[string]interface{}) { + transformed[k] = v.(map[string]interface{})[k] + } + } + + return transformed +} + +func flattenRedisClusterEffectiveLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func expandRedisClusterGcsSource(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { if v == nil { return nil, nil @@ -3041,6 +3123,17 @@ func expandRedisClusterKmsKey(v interface{}, d tpgresource.TerraformResourceData return v, nil } +func expandRedisClusterEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { + if v == nil { + return map[string]string{}, nil + } + m := make(map[string]string) + for k, val := range v.(map[string]interface{}) { + m[k] = val.(string) + } + return m, nil +} + func resourceRedisClusterEncoder(d *schema.ResourceData, meta interface{}, obj map[string]interface{}) (map[string]interface{}, error) { // if the automated_backup_config is not defined, automatedBackupMode needs to be passed and set to DISABLED in the expand diff --git a/google/services/redis/resource_redis_cluster_generated_meta.yaml b/google/services/redis/resource_redis_cluster_generated_meta.yaml index f4dba27961d..4e220550eb7 100644 --- a/google/services/redis/resource_redis_cluster_generated_meta.yaml +++ b/google/services/redis/resource_redis_cluster_generated_meta.yaml @@ -1,73 +1,78 @@ -resource: 'google_redis_cluster' -generation_type: 'mmv1' -source_file: 'products/redis/Cluster.yaml' -api_service_name: 'redis.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Cluster' +resource: google_redis_cluster +generation_type: mmv1 +source_file: products/redis/Cluster.yaml +api_service_name: redis.googleapis.com +api_version: v1 +api_resource_type_kind: Cluster fields: - - api_field: 'authorizationMode' - - api_field: 'automatedBackupConfig.fixedFrequencySchedule.startTime.hours' - - api_field: 'automatedBackupConfig.retention' - - api_field: 'availableMaintenanceVersions' - - api_field: 'backupCollection' - - api_field: 'createTime' - - api_field: 'crossClusterReplicationConfig.clusterRole' - - api_field: 'crossClusterReplicationConfig.membership.primaryCluster.cluster' - - api_field: 'crossClusterReplicationConfig.membership.primaryCluster.uid' - - api_field: 'crossClusterReplicationConfig.membership.secondaryClusters.cluster' - - api_field: 'crossClusterReplicationConfig.membership.secondaryClusters.uid' - - api_field: 'crossClusterReplicationConfig.primaryCluster.cluster' - - api_field: 'crossClusterReplicationConfig.primaryCluster.uid' - - api_field: 'crossClusterReplicationConfig.secondaryClusters.cluster' - - api_field: 'crossClusterReplicationConfig.secondaryClusters.uid' - - api_field: 'crossClusterReplicationConfig.updateTime' - - api_field: 'deletionProtectionEnabled' - - api_field: 'discoveryEndpoints.address' - - api_field: 'discoveryEndpoints.port' - - api_field: 'discoveryEndpoints.pscConfig.network' - - api_field: 'effectiveMaintenanceVersion' - - api_field: 'gcsSource.uris' - - api_field: 'kmsKey' - - api_field: 'maintenancePolicy.createTime' - - api_field: 'maintenancePolicy.updateTime' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.day' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.duration' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.hours' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds' - - api_field: 'maintenanceSchedule.endTime' - - api_field: 'maintenanceSchedule.scheduleDeadlineTime' - - api_field: 'maintenanceSchedule.startTime' - - api_field: 'maintenanceVersion' - - api_field: 'managedBackupSource.backup' - - api_field: 'managedServerCa.caCerts.certificates' - - field: 'name' - provider_only: true - - api_field: 'nodeType' - - api_field: 'persistenceConfig.aofConfig.appendFsync' - - api_field: 'persistenceConfig.mode' - - api_field: 'persistenceConfig.rdbConfig.rdbSnapshotPeriod' - - api_field: 'persistenceConfig.rdbConfig.rdbSnapshotStartTime' - - api_field: 'preciseSizeGb' - - api_field: 'pscConfigs.network' - - api_field: 'pscConnections.address' - - api_field: 'pscConnections.forwardingRule' - - api_field: 'pscConnections.network' - - api_field: 'pscConnections.projectId' - - api_field: 'pscConnections.pscConnectionId' - - api_field: 'pscServiceAttachments.connectionType' - - api_field: 'pscServiceAttachments.serviceAttachment' - - api_field: 'redisConfigs' - - field: 'region' - provider_only: true - - api_field: 'replicaCount' - - api_field: 'shardCount' - - api_field: 'sizeGb' - - api_field: 'state' - - api_field: 'stateInfo.updateInfo.targetReplicaCount' - - api_field: 'stateInfo.updateInfo.targetShardCount' - - api_field: 'transitEncryptionMode' - - api_field: 'uid' - - api_field: 'zoneDistributionConfig.mode' - - api_field: 'zoneDistributionConfig.zone' + - api_field: authorizationMode + - api_field: automatedBackupConfig.fixedFrequencySchedule.startTime.hours + - api_field: automatedBackupConfig.retention + - api_field: availableMaintenanceVersions + - api_field: backupCollection + - api_field: createTime + - api_field: crossClusterReplicationConfig.clusterRole + - api_field: crossClusterReplicationConfig.membership.primaryCluster.cluster + - api_field: crossClusterReplicationConfig.membership.primaryCluster.uid + - api_field: crossClusterReplicationConfig.membership.secondaryClusters.cluster + - api_field: crossClusterReplicationConfig.membership.secondaryClusters.uid + - api_field: crossClusterReplicationConfig.primaryCluster.cluster + - api_field: crossClusterReplicationConfig.primaryCluster.uid + - api_field: crossClusterReplicationConfig.secondaryClusters.cluster + - api_field: crossClusterReplicationConfig.secondaryClusters.uid + - api_field: crossClusterReplicationConfig.updateTime + - api_field: deletionProtectionEnabled + - api_field: discoveryEndpoints.address + - api_field: discoveryEndpoints.port + - api_field: discoveryEndpoints.pscConfig.network + - field: effective_labels + provider_only: true + - api_field: effectiveMaintenanceVersion + - api_field: gcsSource.uris + - api_field: kmsKey + - api_field: labels + - api_field: maintenancePolicy.createTime + - api_field: maintenancePolicy.updateTime + - api_field: maintenancePolicy.weeklyMaintenanceWindow.day + - api_field: maintenancePolicy.weeklyMaintenanceWindow.duration + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.hours + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds + - api_field: maintenanceSchedule.endTime + - api_field: maintenanceSchedule.scheduleDeadlineTime + - api_field: maintenanceSchedule.startTime + - api_field: maintenanceVersion + - api_field: managedBackupSource.backup + - api_field: managedServerCa.caCerts.certificates + - field: name + provider_only: true + - api_field: nodeType + - api_field: persistenceConfig.aofConfig.appendFsync + - api_field: persistenceConfig.mode + - api_field: persistenceConfig.rdbConfig.rdbSnapshotPeriod + - api_field: persistenceConfig.rdbConfig.rdbSnapshotStartTime + - api_field: preciseSizeGb + - api_field: pscConfigs.network + - api_field: pscConnections.address + - api_field: pscConnections.forwardingRule + - api_field: pscConnections.network + - api_field: pscConnections.projectId + - api_field: pscConnections.pscConnectionId + - api_field: pscServiceAttachments.connectionType + - api_field: pscServiceAttachments.serviceAttachment + - api_field: redisConfigs + - field: region + provider_only: true + - api_field: replicaCount + - api_field: shardCount + - api_field: sizeGb + - api_field: state + - api_field: stateInfo.updateInfo.targetReplicaCount + - api_field: stateInfo.updateInfo.targetShardCount + - field: terraform_labels + provider_only: true + - api_field: transitEncryptionMode + - api_field: uid + - api_field: zoneDistributionConfig.mode + - api_field: zoneDistributionConfig.zone diff --git a/google/services/redis/resource_redis_cluster_generated_test.go b/google/services/redis/resource_redis_cluster_generated_test.go index ef92a56d344..67c03e65efd 100644 --- a/google/services/redis/resource_redis_cluster_generated_test.go +++ b/google/services/redis/resource_redis_cluster_generated_test.go @@ -50,6 +50,104 @@ var ( _ = googleapi.Error{} ) +func TestAccRedisCluster_redisClusterHaWithLabelsExample(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "deletion_protection_enabled": false, + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckRedisClusterDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccRedisCluster_redisClusterHaWithLabelsExample(context), + }, + { + ResourceName: "google_redis_cluster.cluster-ha-with-labels", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, + }, + { + ResourceName: "google_redis_cluster.cluster-ha-with-labels", + RefreshState: true, + ExpectNonEmptyPlan: true, + ImportStateKind: resource.ImportBlockWithResourceIdentity, + }, + }, + }) +} + +func testAccRedisCluster_redisClusterHaWithLabelsExample(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_redis_cluster" "cluster-ha-with-labels" { + name = "tf-test-ha-cluster%{random_suffix}" + shard_count = 3 + labels = { + my_key = "my_val" + other_key = "other_val" + } + psc_configs { + network = google_compute_network.consumer_net.id + } + region = "us-central1" + replica_count = 1 + node_type = "REDIS_SHARED_CORE_NANO" + transit_encryption_mode = "TRANSIT_ENCRYPTION_MODE_DISABLED" + authorization_mode = "AUTH_MODE_DISABLED" + redis_configs = { + maxmemory-policy = "volatile-ttl" + } + deletion_protection_enabled = %{deletion_protection_enabled} + + zone_distribution_config { + mode = "MULTI_ZONE" + } + maintenance_policy { + weekly_maintenance_window { + day = "MONDAY" + start_time { + hours = 1 + minutes = 0 + seconds = 0 + nanos = 0 + } + } + } + depends_on = [ + google_network_connectivity_service_connection_policy.default + ] +} + +resource "google_network_connectivity_service_connection_policy" "default" { + name = "tf-test-my-policy%{random_suffix}" + location = "us-central1" + service_class = "gcp-memorystore-redis" + description = "my basic service connection policy" + network = google_compute_network.consumer_net.id + psc_config { + subnetworks = [google_compute_subnetwork.consumer_subnet.id] + } +} + +resource "google_compute_subnetwork" "consumer_subnet" { + name = "tf-test-my-subnet%{random_suffix}" + ip_cidr_range = "10.0.0.248/29" + region = "us-central1" + network = google_compute_network.consumer_net.id +} + +resource "google_compute_network" "consumer_net" { + name = "tf-test-my-network%{random_suffix}" + auto_create_subnetworks = false +} +`, context) +} + func TestAccRedisCluster_redisClusterHaExample(t *testing.T) { t.Parallel() @@ -70,7 +168,7 @@ func TestAccRedisCluster_redisClusterHaExample(t *testing.T) { ResourceName: "google_redis_cluster.cluster-ha", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"gcs_source", "managed_backup_source", "name", "psc_configs", "region"}, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, }, { ResourceName: "google_redis_cluster.cluster-ha", @@ -164,7 +262,7 @@ func TestAccRedisCluster_redisClusterHaSingleZoneExample(t *testing.T) { ResourceName: "google_redis_cluster.cluster-ha-single-zone", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"gcs_source", "managed_backup_source", "name", "psc_configs", "region"}, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, }, { ResourceName: "google_redis_cluster.cluster-ha-single-zone", @@ -253,7 +351,7 @@ func TestAccRedisCluster_redisClusterSecondaryExample(t *testing.T) { ResourceName: "google_redis_cluster.secondary_cluster", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"gcs_source", "managed_backup_source", "name", "psc_configs", "region"}, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, }, { ResourceName: "google_redis_cluster.secondary_cluster", @@ -441,7 +539,7 @@ func TestAccRedisCluster_redisClusterRdbExample(t *testing.T) { ResourceName: "google_redis_cluster.cluster-rdb", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"gcs_source", "managed_backup_source", "name", "psc_configs", "region"}, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, }, { ResourceName: "google_redis_cluster.cluster-rdb", @@ -542,7 +640,7 @@ func TestAccRedisCluster_redisClusterAofExample(t *testing.T) { ResourceName: "google_redis_cluster.cluster-aof", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"gcs_source", "managed_backup_source", "name", "psc_configs", "region"}, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, }, { ResourceName: "google_redis_cluster.cluster-aof", @@ -648,7 +746,7 @@ func TestAccRedisCluster_redisClusterCmekExample(t *testing.T) { ResourceName: "google_redis_cluster.cluster-cmek", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"gcs_source", "managed_backup_source", "name", "psc_configs", "region"}, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, }, { ResourceName: "google_redis_cluster.cluster-cmek", diff --git a/google/services/redis/resource_redis_cluster_test.go b/google/services/redis/resource_redis_cluster_test.go index a2377444ef5..11ed71070ce 100644 --- a/google/services/redis/resource_redis_cluster_test.go +++ b/google/services/redis/resource_redis_cluster_test.go @@ -1434,3 +1434,104 @@ resource "google_redis_cluster" "cluster-ms" { } `, context) } + +func TestAccRedisCluster_redisClusterHaWithLabelsUpdate(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "deletion_protection_enabled": false, + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckRedisClusterDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccRedisCluster_redisClusterHaWithLabelsExample(context), + }, + { + ResourceName: "google_redis_cluster.cluster-ha-with-labels", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, + }, + { + Config: testAccRedisCluster_redisClusterHaWithLabelsUpdate(context), + }, + { + ResourceName: "google_redis_cluster.cluster-ha-with-labels", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"gcs_source", "labels", "managed_backup_source", "name", "psc_configs", "region", "terraform_labels"}, + }, + }, + }) +} + +func testAccRedisCluster_redisClusterHaWithLabelsUpdate(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_redis_cluster" "cluster-ha-with-labels" { + name = "tf-test-ha-cluster%{random_suffix}" + shard_count = 3 + labels = { + my_key = "my_val" + other_key = "other_val" + } + psc_configs { + network = google_compute_network.consumer_net.id + } + region = "us-central1" + replica_count = 1 + node_type = "REDIS_SHARED_CORE_NANO" + transit_encryption_mode = "TRANSIT_ENCRYPTION_MODE_DISABLED" + authorization_mode = "AUTH_MODE_DISABLED" + redis_configs = { + maxmemory-policy = "volatile-ttl" + } + deletion_protection_enabled = false + + zone_distribution_config { + mode = "MULTI_ZONE" + } + maintenance_policy { + weekly_maintenance_window { + day = "MONDAY" + start_time { + hours = 1 + minutes = 0 + seconds = 0 + nanos = 0 + } + } + } + depends_on = [ + google_network_connectivity_service_connection_policy.default + ] +} + +resource "google_network_connectivity_service_connection_policy" "default" { + name = "tf-test-my-policy%{random_suffix}" + location = "us-central1" + service_class = "gcp-memorystore-redis" + description = "my basic service connection policy" + network = google_compute_network.consumer_net.id + psc_config { + subnetworks = [google_compute_subnetwork.consumer_subnet.id] + } +} + +resource "google_compute_subnetwork" "consumer_subnet" { + name = "tf-test-my-subnet%{random_suffix}" + ip_cidr_range = "10.0.0.248/29" + region = "us-central1" + network = google_compute_network.consumer_net.id +} + +resource "google_compute_network" "consumer_net" { + name = "tf-test-my-network%{random_suffix}" + auto_create_subnetworks = false +} +`, context) +} diff --git a/google/services/redis/resource_redis_cluster_user_created_connections_generated_meta.yaml b/google/services/redis/resource_redis_cluster_user_created_connections_generated_meta.yaml index a38b4eacd30..7f6731c9bfd 100644 --- a/google/services/redis/resource_redis_cluster_user_created_connections_generated_meta.yaml +++ b/google/services/redis/resource_redis_cluster_user_created_connections_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_redis_cluster_user_created_connections' -generation_type: 'mmv1' -source_file: 'products/redis/ClusterUserCreatedConnections.yaml' -api_service_name: 'redis.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Cluster' +resource: google_redis_cluster_user_created_connections +generation_type: mmv1 +source_file: products/redis/ClusterUserCreatedConnections.yaml +api_service_name: redis.googleapis.com +api_version: v1 +api_resource_type_kind: Cluster fields: - - api_field: 'clusterEndpoints.connections.pscConnection.address' - - api_field: 'clusterEndpoints.connections.pscConnection.connectionType' - - api_field: 'clusterEndpoints.connections.pscConnection.forwardingRule' - - api_field: 'clusterEndpoints.connections.pscConnection.network' - - api_field: 'clusterEndpoints.connections.pscConnection.projectId' - - api_field: 'clusterEndpoints.connections.pscConnection.pscConnectionId' - - api_field: 'clusterEndpoints.connections.pscConnection.pscConnectionStatus' - - api_field: 'clusterEndpoints.connections.pscConnection.serviceAttachment' - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true + - api_field: clusterEndpoints.connections.pscConnection.address + - api_field: clusterEndpoints.connections.pscConnection.connectionType + - api_field: clusterEndpoints.connections.pscConnection.forwardingRule + - api_field: clusterEndpoints.connections.pscConnection.network + - api_field: clusterEndpoints.connections.pscConnection.projectId + - api_field: clusterEndpoints.connections.pscConnection.pscConnectionId + - api_field: clusterEndpoints.connections.pscConnection.pscConnectionStatus + - api_field: clusterEndpoints.connections.pscConnection.serviceAttachment + - field: name + provider_only: true + - field: region + provider_only: true diff --git a/google/services/redis/resource_redis_instance_generated_meta.yaml b/google/services/redis/resource_redis_instance_generated_meta.yaml index 76429ade2f6..6e88d7e33f8 100644 --- a/google/services/redis/resource_redis_instance_generated_meta.yaml +++ b/google/services/redis/resource_redis_instance_generated_meta.yaml @@ -1,66 +1,66 @@ -resource: 'google_redis_instance' -generation_type: 'mmv1' -source_file: 'products/redis/Instance.yaml' -api_service_name: 'redis.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_redis_instance +generation_type: mmv1 +source_file: products/redis/Instance.yaml +api_service_name: redis.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'alternativeLocationId' - - api_field: 'authEnabled' - - api_field: 'authorizedNetwork' - - api_field: 'connectMode' - - api_field: 'createTime' - - api_field: 'currentLocationId' - - api_field: 'customerManagedKey' - - field: 'deletion_protection' - provider_only: true - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'reservedIpRange' - field: 'effective_reserved_ip_range' - - api_field: 'host' - - api_field: 'labels' - - api_field: 'locationId' - - api_field: 'maintenancePolicy.createTime' - - api_field: 'maintenancePolicy.description' - - api_field: 'maintenancePolicy.updateTime' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.day' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.duration' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.hours' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos' - - api_field: 'maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds' - - api_field: 'maintenanceSchedule.endTime' - - api_field: 'maintenanceSchedule.scheduleDeadlineTime' - - api_field: 'maintenanceSchedule.startTime' - - api_field: 'maintenanceVersion' - - api_field: 'memorySizeGb' - - api_field: 'name' - - api_field: 'nodes.id' - - api_field: 'nodes.zone' - - api_field: 'persistenceConfig.persistenceMode' - - api_field: 'persistenceConfig.rdbNextSnapshotTime' - - api_field: 'persistenceConfig.rdbSnapshotPeriod' - - api_field: 'persistenceConfig.rdbSnapshotStartTime' - - api_field: 'persistenceIamIdentity' - - api_field: 'port' - - api_field: 'readEndpoint' - - api_field: 'readEndpointPort' - - api_field: 'readReplicasMode' - - api_field: 'redisConfigs' - - api_field: 'redisVersion' - - field: 'region' - provider_only: true - - api_field: 'replicaCount' - - api_field: 'reservedIpRange' - - api_field: 'secondaryIpRange' - - api_field: 'serverCaCerts.cert' - - api_field: 'serverCaCerts.createTime' - - api_field: 'serverCaCerts.expireTime' - - api_field: 'serverCaCerts.serialNumber' - - api_field: 'serverCaCerts.sha1Fingerprint' - - field: 'terraform_labels' - provider_only: true - - api_field: 'tier' - - api_field: 'transitEncryptionMode' + - api_field: alternativeLocationId + - api_field: authEnabled + - api_field: authorizedNetwork + - api_field: connectMode + - api_field: createTime + - api_field: currentLocationId + - api_field: customerManagedKey + - field: deletion_protection + provider_only: true + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: reservedIpRange + field: effective_reserved_ip_range + - api_field: host + - api_field: labels + - api_field: locationId + - api_field: maintenancePolicy.createTime + - api_field: maintenancePolicy.description + - api_field: maintenancePolicy.updateTime + - api_field: maintenancePolicy.weeklyMaintenanceWindow.day + - api_field: maintenancePolicy.weeklyMaintenanceWindow.duration + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.hours + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.minutes + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.nanos + - api_field: maintenancePolicy.weeklyMaintenanceWindow.startTime.seconds + - api_field: maintenanceSchedule.endTime + - api_field: maintenanceSchedule.scheduleDeadlineTime + - api_field: maintenanceSchedule.startTime + - api_field: maintenanceVersion + - api_field: memorySizeGb + - api_field: name + - api_field: nodes.id + - api_field: nodes.zone + - api_field: persistenceConfig.persistenceMode + - api_field: persistenceConfig.rdbNextSnapshotTime + - api_field: persistenceConfig.rdbSnapshotPeriod + - api_field: persistenceConfig.rdbSnapshotStartTime + - api_field: persistenceIamIdentity + - api_field: port + - api_field: readEndpoint + - api_field: readEndpointPort + - api_field: readReplicasMode + - api_field: redisConfigs + - api_field: redisVersion + - field: region + provider_only: true + - api_field: replicaCount + - api_field: reservedIpRange + - api_field: secondaryIpRange + - api_field: serverCaCerts.cert + - api_field: serverCaCerts.createTime + - api_field: serverCaCerts.expireTime + - api_field: serverCaCerts.serialNumber + - api_field: serverCaCerts.sha1Fingerprint + - field: terraform_labels + provider_only: true + - api_field: tier + - api_field: transitEncryptionMode diff --git a/google/services/resourcemanager/resource_resource_manager_lien_generated_meta.yaml b/google/services/resourcemanager/resource_resource_manager_lien_generated_meta.yaml index 278e42c9600..6fc94821742 100644 --- a/google/services/resourcemanager/resource_resource_manager_lien_generated_meta.yaml +++ b/google/services/resourcemanager/resource_resource_manager_lien_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_resource_manager_lien' -generation_type: 'mmv1' -source_file: 'products/resourcemanager/Lien.yaml' -api_service_name: 'cloudresourcemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Lien' +resource: google_resource_manager_lien +generation_type: mmv1 +source_file: products/resourcemanager/Lien.yaml +api_service_name: cloudresourcemanager.googleapis.com +api_version: v1 +api_resource_type_kind: Lien fields: - - api_field: 'createTime' - - api_field: 'name' - - api_field: 'origin' - - api_field: 'parent' - - api_field: 'reason' - - api_field: 'restrictions' + - api_field: createTime + - api_field: name + - api_field: origin + - api_field: parent + - api_field: reason + - api_field: restrictions diff --git a/google/services/resourcemanager3/resource_resource_manager_capability_generated_meta.yaml b/google/services/resourcemanager3/resource_resource_manager_capability_generated_meta.yaml index cc6dd71957b..762582cb84f 100644 --- a/google/services/resourcemanager3/resource_resource_manager_capability_generated_meta.yaml +++ b/google/services/resourcemanager3/resource_resource_manager_capability_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_resource_manager_capability' -generation_type: 'mmv1' -source_file: 'products/resourcemanager3/Capability.yaml' -api_service_name: 'cloudresourcemanager.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'Capability' +resource: google_resource_manager_capability +generation_type: mmv1 +source_file: products/resourcemanager3/Capability.yaml +api_service_name: cloudresourcemanager.googleapis.com +api_version: v3 +api_resource_type_kind: Capability fields: - - field: 'capability_name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'value' + - field: capability_name + provider_only: true + - field: parent + provider_only: true + - api_field: value diff --git a/google/services/secretmanager/iam_secret_manager_secret_generated_test.go b/google/services/secretmanager/iam_secret_manager_secret_generated_test.go index 927e1242518..e03f3a9811a 100644 --- a/google/services/secretmanager/iam_secret_manager_secret_generated_test.go +++ b/google/services/secretmanager/iam_secret_manager_secret_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccSecretManagerSecretIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMBindingStateID("google_secret_manager_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccSecretManagerSecretIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMBindingStateID("google_secret_manager_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccSecretManagerSecretIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMMemberStateID("google_secret_manager_secret_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccSecretManagerSecretIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMPolicyStateID("google_secret_manager_secret_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccSecretManagerSecretIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMPolicyStateID("google_secret_manager_secret_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccSecretManagerSecretIamBindingGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerSecretIAMBindingStateID("google_secret_manager_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccSecretManagerSecretIamBindingGenerated_withAndWithoutCondition(t *te }, { ResourceName: "google_secret_manager_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMBindingStateID("google_secret_manager_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_secret_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerSecretIAMBindingStateID("google_secret_manager_secret_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_secret_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateSecretManagerSecretIAMBindingStateID("google_secret_manager_secret_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccSecretManagerSecretIamMemberGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerSecretIAMMemberStateID("google_secret_manager_secret_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccSecretManagerSecretIamMemberGenerated_withAndWithoutCondition(t *tes }, { ResourceName: "google_secret_manager_secret_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMMemberStateID("google_secret_manager_secret_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_secret_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerSecretIAMMemberStateID("google_secret_manager_secret_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_secret_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateSecretManagerSecretIAMMemberStateID("google_secret_manager_secret_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccSecretManagerSecretIamPolicyGenerated_withCondition(t *testing.T) { }, { ResourceName: "google_secret_manager_secret_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/secrets/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerSecretIAMPolicyStateID("google_secret_manager_secret_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -743,3 +744,53 @@ resource "google_secret_manager_secret_iam_policy" "foo" { } `, context) } +func generateSecretManagerSecretIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + secret_id := tpgresource.GetResourceNameFromSelfLink(rawState["secret_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/secrets/%s", project, secret_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateSecretManagerSecretIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + secret_id := tpgresource.GetResourceNameFromSelfLink(rawState["secret_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/secrets/%s", project, secret_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateSecretManagerSecretIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + secret_id := tpgresource.GetResourceNameFromSelfLink(rawState["secret_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/secrets/%s", project, secret_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/secretmanager/resource_secret_manager_secret_generated_meta.yaml b/google/services/secretmanager/resource_secret_manager_secret_generated_meta.yaml index f83aed60740..82ad5648d24 100644 --- a/google/services/secretmanager/resource_secret_manager_secret_generated_meta.yaml +++ b/google/services/secretmanager/resource_secret_manager_secret_generated_meta.yaml @@ -1,35 +1,35 @@ -resource: 'google_secret_manager_secret' -generation_type: 'mmv1' -source_file: 'products/secretmanager/Secret.yaml' -api_service_name: 'secretmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Secret' +resource: google_secret_manager_secret +generation_type: mmv1 +source_file: products/secretmanager/Secret.yaml +api_service_name: secretmanager.googleapis.com +api_version: v1 +api_resource_type_kind: Secret api_variant_patterns: - - 'projects/{project}/secrets/{secret}' + - projects/{project}/secrets/{secret} fields: - - api_field: 'annotations' - - api_field: 'createTime' - - field: 'deletion_protection' - provider_only: true - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'expireTime' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'replication.automatic.customerManagedEncryption.kmsKeyName' - field: 'replication.auto.customer_managed_encryption.kms_key_name' - - api_field: 'replication.userManaged.replicas.customerManagedEncryption.kmsKeyName' - - api_field: 'replication.userManaged.replicas.location' - - api_field: 'rotation.nextRotationTime' - - api_field: 'rotation.rotationPeriod' - - field: 'secret_id' - provider_only: true - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true - - api_field: 'topics.name' - - api_field: 'ttl' - - api_field: 'versionAliases' - - api_field: 'versionDestroyTtl' + - api_field: annotations + - api_field: createTime + - field: deletion_protection + provider_only: true + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: expireTime + - api_field: labels + - api_field: name + - api_field: replication.automatic.customerManagedEncryption.kmsKeyName + field: replication.auto.customer_managed_encryption.kms_key_name + - api_field: replication.userManaged.replicas.customerManagedEncryption.kmsKeyName + - api_field: replication.userManaged.replicas.location + - api_field: rotation.nextRotationTime + - api_field: rotation.rotationPeriod + - field: secret_id + provider_only: true + - api_field: tags + - field: terraform_labels + provider_only: true + - api_field: topics.name + - api_field: ttl + - api_field: versionAliases + - api_field: versionDestroyTtl diff --git a/google/services/secretmanager/resource_secret_manager_secret_version_generated_meta.yaml b/google/services/secretmanager/resource_secret_manager_secret_version_generated_meta.yaml index ae700138305..5b07cf9059e 100644 --- a/google/services/secretmanager/resource_secret_manager_secret_version_generated_meta.yaml +++ b/google/services/secretmanager/resource_secret_manager_secret_version_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_secret_manager_secret_version' -generation_type: 'mmv1' -source_file: 'products/secretmanager/SecretVersion.yaml' -api_service_name: 'secretmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecretVersion' -cai_asset_name_format: '//secretmanager.googleapis.com/{{secret}}/versions/{{version}}' +resource: google_secret_manager_secret_version +generation_type: mmv1 +source_file: products/secretmanager/SecretVersion.yaml +api_service_name: secretmanager.googleapis.com +api_version: v1 +api_resource_type_kind: SecretVersion +cai_asset_name_format: //secretmanager.googleapis.com/{{secret}}/versions/{{version}} api_variant_patterns: - - 'projects/{project}/secrets/{secret}/versions/{version}' + - projects/{project}/secrets/{secret}/versions/{version} fields: - - api_field: 'createTime' - - field: 'deletion_policy' - provider_only: true - - api_field: 'destroyTime' - - api_field: 'state' - field: 'enabled' - - field: 'is_secret_data_base64' - provider_only: true - - api_field: 'name' - - field: 'project' - provider_only: true - - field: 'secret' - provider_only: true - - api_field: 'payload.data' - field: 'secret_data' - - api_field: 'payload.data' - field: 'secret_data_wo' - - field: 'secret_data_wo_version' - provider_only: true - - api_field: 'version' + - api_field: createTime + - field: deletion_policy + provider_only: true + - api_field: destroyTime + - api_field: state + field: enabled + - field: is_secret_data_base64 + provider_only: true + - api_field: name + - field: project + provider_only: true + - field: secret + provider_only: true + - api_field: payload.data + field: secret_data + - api_field: payload.data + field: secret_data_wo + - field: secret_data_wo_version + provider_only: true + - api_field: version diff --git a/google/services/secretmanagerregional/iam_secret_manager_regional_secret_generated_test.go b/google/services/secretmanagerregional/iam_secret_manager_regional_secret_generated_test.go index da63854fcee..bdd49a78a0a 100644 --- a/google/services/secretmanagerregional/iam_secret_manager_regional_secret_generated_test.go +++ b/google/services/secretmanagerregional/iam_secret_manager_regional_secret_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -60,7 +61,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamBindingGenerated(t *testing.T) }, { ResourceName: "google_secret_manager_regional_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMBindingStateID("google_secret_manager_regional_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -70,7 +71,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamBindingGenerated(t *testing.T) }, { ResourceName: "google_secret_manager_regional_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMBindingStateID("google_secret_manager_regional_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -101,7 +102,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamMemberGenerated(t *testing.T) }, { ResourceName: "google_secret_manager_regional_secret_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMMemberStateID("google_secret_manager_regional_secret_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamPolicyGenerated(t *testing.T) }, { ResourceName: "google_secret_manager_regional_secret_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMPolicyStateID("google_secret_manager_regional_secret_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -141,7 +142,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamPolicyGenerated(t *testing.T) }, { ResourceName: "google_secret_manager_regional_secret_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMPolicyStateID("google_secret_manager_regional_secret_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -171,7 +172,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamBindingGenerated_withCondition }, { ResourceName: "google_secret_manager_regional_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMBindingStateID("google_secret_manager_regional_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -203,19 +204,19 @@ func TestAccSecretManagerRegionalRegionalSecretIamBindingGenerated_withAndWithou }, { ResourceName: "google_secret_manager_regional_secret_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMBindingStateID("google_secret_manager_regional_secret_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_regional_secret_iam_binding.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMBindingStateID("google_secret_manager_regional_secret_iam_binding.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_regional_secret_iam_binding.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMBindingStateID("google_secret_manager_regional_secret_iam_binding.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -245,7 +246,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamMemberGenerated_withCondition( }, { ResourceName: "google_secret_manager_regional_secret_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMMemberStateID("google_secret_manager_regional_secret_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -277,19 +278,19 @@ func TestAccSecretManagerRegionalRegionalSecretIamMemberGenerated_withAndWithout }, { ResourceName: "google_secret_manager_regional_secret_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMMemberStateID("google_secret_manager_regional_secret_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_regional_secret_iam_member.foo2", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"]), context["condition_title"]), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMMemberStateID("google_secret_manager_regional_secret_iam_member.foo2"), ImportState: true, ImportStateVerify: true, }, { ResourceName: "google_secret_manager_regional_secret_iam_member.foo3", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s roles/secretmanager.secretAccessor user:admin@hashicorptest.com %s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"]), context["condition_title_no_desc"]), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMMemberStateID("google_secret_manager_regional_secret_iam_member.foo3"), ImportState: true, ImportStateVerify: true, }, @@ -329,7 +330,7 @@ func TestAccSecretManagerRegionalRegionalSecretIamPolicyGenerated_withCondition( }, { ResourceName: "google_secret_manager_regional_secret_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/secrets/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-tf-reg-secret%s", context["random_suffix"])), + ImportStateIdFunc: generateSecretManagerRegionalRegionalSecretIAMPolicyStateID("google_secret_manager_regional_secret_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -718,3 +719,56 @@ resource "google_secret_manager_regional_secret_iam_policy" "foo" { } `, context) } +func generateSecretManagerRegionalRegionalSecretIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + secret_id := tpgresource.GetResourceNameFromSelfLink(rawState["secret_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/secrets/%s", project, location, secret_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateSecretManagerRegionalRegionalSecretIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + secret_id := tpgresource.GetResourceNameFromSelfLink(rawState["secret_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/secrets/%s", project, location, secret_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateSecretManagerRegionalRegionalSecretIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + secret_id := tpgresource.GetResourceNameFromSelfLink(rawState["secret_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/secrets/%s", project, location, secret_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/secretmanagerregional/resource_secret_manager_regional_secret_generated_meta.yaml b/google/services/secretmanagerregional/resource_secret_manager_regional_secret_generated_meta.yaml index 19f4bd4f900..df2dcb1dd01 100644 --- a/google/services/secretmanagerregional/resource_secret_manager_regional_secret_generated_meta.yaml +++ b/google/services/secretmanagerregional/resource_secret_manager_regional_secret_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_secret_manager_regional_secret' -generation_type: 'mmv1' -source_file: 'products/secretmanagerregional/RegionalSecret.yaml' -api_service_name: 'secretmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Secret' +resource: google_secret_manager_regional_secret +generation_type: mmv1 +source_file: products/secretmanagerregional/RegionalSecret.yaml +api_service_name: secretmanager.googleapis.com +api_version: v1 +api_resource_type_kind: Secret fields: - - api_field: 'annotations' - - api_field: 'createTime' - - api_field: 'customerManagedEncryption.kmsKeyName' - - field: 'deletion_protection' - provider_only: true - - field: 'effective_annotations' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'expireTime' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'rotation.nextRotationTime' - - api_field: 'rotation.rotationPeriod' - - field: 'secret_id' - provider_only: true - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true - - api_field: 'topics.name' - - api_field: 'ttl' - - api_field: 'versionAliases' - - api_field: 'versionDestroyTtl' + - api_field: annotations + - api_field: createTime + - api_field: customerManagedEncryption.kmsKeyName + - field: deletion_protection + provider_only: true + - field: effective_annotations + provider_only: true + - field: effective_labels + provider_only: true + - api_field: expireTime + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: rotation.nextRotationTime + - api_field: rotation.rotationPeriod + - field: secret_id + provider_only: true + - api_field: tags + - field: terraform_labels + provider_only: true + - api_field: topics.name + - api_field: ttl + - api_field: versionAliases + - api_field: versionDestroyTtl diff --git a/google/services/secretmanagerregional/resource_secret_manager_regional_secret_version_generated_meta.yaml b/google/services/secretmanagerregional/resource_secret_manager_regional_secret_version_generated_meta.yaml index aca07630069..7b8537a4402 100644 --- a/google/services/secretmanagerregional/resource_secret_manager_regional_secret_version_generated_meta.yaml +++ b/google/services/secretmanagerregional/resource_secret_manager_regional_secret_version_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_secret_manager_regional_secret_version' -generation_type: 'mmv1' -source_file: 'products/secretmanagerregional/RegionalSecretVersion.yaml' -api_service_name: 'secretmanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecretVersion' -cai_asset_name_format: '//secretmanager.googleapis.com/{{secret}}/versions/{{version}}' +resource: google_secret_manager_regional_secret_version +generation_type: mmv1 +source_file: products/secretmanagerregional/RegionalSecretVersion.yaml +api_service_name: secretmanager.googleapis.com +api_version: v1 +api_resource_type_kind: SecretVersion +cai_asset_name_format: //secretmanager.googleapis.com/{{secret}}/versions/{{version}} fields: - - api_field: 'createTime' - - api_field: 'customerManagedEncryption.kmsKeyVersionName' - - field: 'deletion_policy' - provider_only: true - - api_field: 'destroyTime' - - api_field: 'state' - field: 'enabled' - - field: 'is_secret_data_base64' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'secret' - provider_only: true - - api_field: 'payload.data' - field: 'secret_data' - - api_field: 'version' + - api_field: createTime + - api_field: customerManagedEncryption.kmsKeyVersionName + - field: deletion_policy + provider_only: true + - api_field: destroyTime + - api_field: state + field: enabled + - field: is_secret_data_base64 + provider_only: true + - field: location + provider_only: true + - api_field: name + - field: secret + provider_only: true + - api_field: payload.data + field: secret_data + - api_field: version diff --git a/google/services/securesourcemanager/iam_secure_source_manager_instance_generated_test.go b/google/services/securesourcemanager/iam_secure_source_manager_instance_generated_test.go index 9bc44c774e9..e42b48d3a98 100644 --- a/google/services/securesourcemanager/iam_secure_source_manager_instance_generated_test.go +++ b/google/services/securesourcemanager/iam_secure_source_manager_instance_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -57,7 +58,7 @@ func TestAccSecureSourceManagerInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/securesourcemanager.instanceManager", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerInstanceIAMBindingStateID("google_secure_source_manager_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -67,7 +68,7 @@ func TestAccSecureSourceManagerInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/securesourcemanager.instanceManager", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerInstanceIAMBindingStateID("google_secure_source_manager_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -95,7 +96,7 @@ func TestAccSecureSourceManagerInstanceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/securesourcemanager.instanceManager user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerInstanceIAMMemberStateID("google_secure_source_manager_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccSecureSourceManagerInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerInstanceIAMPolicyStateID("google_secure_source_manager_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -135,7 +136,7 @@ func TestAccSecureSourceManagerInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerInstanceIAMPolicyStateID("google_secure_source_manager_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -278,3 +279,57 @@ resource "google_secure_source_manager_instance_iam_binding" "foo" { } `, context) } + +func generateSecureSourceManagerInstanceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + instance_id := tpgresource.GetResourceNameFromSelfLink(rawState["instance_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, instance_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateSecureSourceManagerInstanceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + instance_id := tpgresource.GetResourceNameFromSelfLink(rawState["instance_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, instance_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateSecureSourceManagerInstanceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + instance_id := tpgresource.GetResourceNameFromSelfLink(rawState["instance_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, instance_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/securesourcemanager/iam_secure_source_manager_repository_generated_test.go b/google/services/securesourcemanager/iam_secure_source_manager_repository_generated_test.go index 9bf5cad9694..c9dc7157513 100644 --- a/google/services/securesourcemanager/iam_secure_source_manager_repository_generated_test.go +++ b/google/services/securesourcemanager/iam_secure_source_manager_repository_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccSecureSourceManagerRepositoryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_repository_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s roles/securesourcemanager.repoAdmin", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerRepositoryIAMBindingStateID("google_secure_source_manager_repository_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccSecureSourceManagerRepositoryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_repository_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s roles/securesourcemanager.repoAdmin", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerRepositoryIAMBindingStateID("google_secure_source_manager_repository_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccSecureSourceManagerRepositoryIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_repository_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s roles/securesourcemanager.repoAdmin user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerRepositoryIAMMemberStateID("google_secure_source_manager_repository_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccSecureSourceManagerRepositoryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_repository_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerRepositoryIAMPolicyStateID("google_secure_source_manager_repository_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccSecureSourceManagerRepositoryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_secure_source_manager_repository_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/repositories/%s", envvar.GetTestProjectFromEnv(), envvar.GetTestRegionFromEnv(), fmt.Sprintf("tf-test-my-repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSecureSourceManagerRepositoryIAMPolicyStateID("google_secure_source_manager_repository_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -298,3 +299,57 @@ resource "google_secure_source_manager_repository_iam_binding" "foo" { } `, context) } + +func generateSecureSourceManagerRepositoryIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + repository_id := tpgresource.GetResourceNameFromSelfLink(rawState["repository_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/repositories/%s", project, location, repository_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateSecureSourceManagerRepositoryIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + repository_id := tpgresource.GetResourceNameFromSelfLink(rawState["repository_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/repositories/%s", project, location, repository_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateSecureSourceManagerRepositoryIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + repository_id := tpgresource.GetResourceNameFromSelfLink(rawState["repository_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/repositories/%s", project, location, repository_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/securesourcemanager/resource_secure_source_manager_branch_rule_generated_meta.yaml b/google/services/securesourcemanager/resource_secure_source_manager_branch_rule_generated_meta.yaml index dd5997552ff..02b6b6ddc29 100644 --- a/google/services/securesourcemanager/resource_secure_source_manager_branch_rule_generated_meta.yaml +++ b/google/services/securesourcemanager/resource_secure_source_manager_branch_rule_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_secure_source_manager_branch_rule' -generation_type: 'mmv1' -source_file: 'products/securesourcemanager/BranchRule.yaml' -api_service_name: 'securesourcemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BranchRule' +resource: google_secure_source_manager_branch_rule +generation_type: mmv1 +source_file: products/securesourcemanager/BranchRule.yaml +api_service_name: securesourcemanager.googleapis.com +api_version: v1 +api_resource_type_kind: BranchRule fields: - - api_field: 'allowStaleReviews' - - field: 'branch_rule_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'disabled' - - api_field: 'includePattern' - - field: 'location' - provider_only: true - - api_field: 'minimumApprovalsCount' - - api_field: 'minimumReviewsCount' - - api_field: 'name' - - field: 'repository_id' - provider_only: true - - api_field: 'requireCommentsResolved' - - api_field: 'requireLinearHistory' - - api_field: 'requirePullRequest' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: allowStaleReviews + - field: branch_rule_id + provider_only: true + - api_field: createTime + - api_field: disabled + - api_field: includePattern + - field: location + provider_only: true + - api_field: minimumApprovalsCount + - api_field: minimumReviewsCount + - api_field: name + - field: repository_id + provider_only: true + - api_field: requireCommentsResolved + - api_field: requireLinearHistory + - api_field: requirePullRequest + - api_field: uid + - api_field: updateTime diff --git a/google/services/securesourcemanager/resource_secure_source_manager_hook_generated_meta.yaml b/google/services/securesourcemanager/resource_secure_source_manager_hook_generated_meta.yaml index 03af7827ab9..5fd2c03e5d7 100644 --- a/google/services/securesourcemanager/resource_secure_source_manager_hook_generated_meta.yaml +++ b/google/services/securesourcemanager/resource_secure_source_manager_hook_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_secure_source_manager_hook' -generation_type: 'mmv1' -source_file: 'products/securesourcemanager/Hook.yaml' -api_service_name: 'securesourcemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Hook' +resource: google_secure_source_manager_hook +generation_type: mmv1 +source_file: products/securesourcemanager/Hook.yaml +api_service_name: securesourcemanager.googleapis.com +api_version: v1 +api_resource_type_kind: Hook fields: - - api_field: 'createTime' - - api_field: 'disabled' - - api_field: 'events' - - field: 'hook_id' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'pushOption.branchFilter' - - field: 'repository_id' - provider_only: true - - api_field: 'sensitiveQueryString' - - api_field: 'targetUri' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: disabled + - api_field: events + - field: hook_id + provider_only: true + - field: location + provider_only: true + - api_field: name + - api_field: pushOption.branchFilter + - field: repository_id + provider_only: true + - api_field: sensitiveQueryString + - api_field: targetUri + - api_field: uid + - api_field: updateTime diff --git a/google/services/securesourcemanager/resource_secure_source_manager_instance_generated_meta.yaml b/google/services/securesourcemanager/resource_secure_source_manager_instance_generated_meta.yaml index 51d862cc4b4..dacc3ec3cbc 100644 --- a/google/services/securesourcemanager/resource_secure_source_manager_instance_generated_meta.yaml +++ b/google/services/securesourcemanager/resource_secure_source_manager_instance_generated_meta.yaml @@ -1,33 +1,33 @@ -resource: 'google_secure_source_manager_instance' -generation_type: 'mmv1' -source_file: 'products/securesourcemanager/Instance.yaml' -api_service_name: 'securesourcemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' +resource: google_secure_source_manager_instance +generation_type: mmv1 +source_file: products/securesourcemanager/Instance.yaml +api_service_name: securesourcemanager.googleapis.com +api_version: v1 +api_resource_type_kind: Instance fields: - - api_field: 'createTime' - - field: 'deletion_policy' - provider_only: true - - field: 'effective_labels' - provider_only: true - - api_field: 'hostConfig.api' - - api_field: 'hostConfig.gitHttp' - - api_field: 'hostConfig.gitSsh' - - api_field: 'hostConfig.html' - - field: 'instance_id' - provider_only: true - - api_field: 'kmsKey' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'privateConfig.caPool' - - api_field: 'privateConfig.httpServiceAttachment' - - api_field: 'privateConfig.isPrivate' - - api_field: 'privateConfig.sshServiceAttachment' - - api_field: 'state' - - api_field: 'stateNote' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'workforceIdentityFederationConfig.enabled' + - api_field: createTime + - field: deletion_policy + provider_only: true + - field: effective_labels + provider_only: true + - api_field: hostConfig.api + - api_field: hostConfig.gitHttp + - api_field: hostConfig.gitSsh + - api_field: hostConfig.html + - field: instance_id + provider_only: true + - api_field: kmsKey + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: privateConfig.caPool + - api_field: privateConfig.httpServiceAttachment + - api_field: privateConfig.isPrivate + - api_field: privateConfig.sshServiceAttachment + - api_field: state + - api_field: stateNote + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: workforceIdentityFederationConfig.enabled diff --git a/google/services/securesourcemanager/resource_secure_source_manager_repository_generated_meta.yaml b/google/services/securesourcemanager/resource_secure_source_manager_repository_generated_meta.yaml index a85e874fdba..7fbd44512fe 100644 --- a/google/services/securesourcemanager/resource_secure_source_manager_repository_generated_meta.yaml +++ b/google/services/securesourcemanager/resource_secure_source_manager_repository_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_secure_source_manager_repository' -generation_type: 'mmv1' -source_file: 'products/securesourcemanager/Repository.yaml' -api_service_name: 'securesourcemanager.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Repository' +resource: google_secure_source_manager_repository +generation_type: mmv1 +source_file: products/securesourcemanager/Repository.yaml +api_service_name: securesourcemanager.googleapis.com +api_version: v1 +api_resource_type_kind: Repository fields: - - api_field: 'createTime' - - field: 'deletion_policy' - provider_only: true - - api_field: 'description' - - api_field: 'initialConfig.defaultBranch' - - api_field: 'initialConfig.gitignores' - - api_field: 'initialConfig.license' - - api_field: 'initialConfig.readme' - - api_field: 'instance' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'repository_id' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'uris.api' - - api_field: 'uris.gitHttps' - - api_field: 'uris.html' + - api_field: createTime + - field: deletion_policy + provider_only: true + - api_field: description + - api_field: initialConfig.defaultBranch + - api_field: initialConfig.gitignores + - api_field: initialConfig.license + - api_field: initialConfig.readme + - api_field: instance + - field: location + provider_only: true + - api_field: name + - field: repository_id + provider_only: true + - api_field: uid + - api_field: updateTime + - api_field: uris.api + - api_field: uris.gitHttps + - api_field: uris.html diff --git a/google/services/securitycenter/resource_scc_event_threat_detection_custom_module_generated_meta.yaml b/google/services/securitycenter/resource_scc_event_threat_detection_custom_module_generated_meta.yaml index fa93dd20009..2992541771c 100644 --- a/google/services/securitycenter/resource_scc_event_threat_detection_custom_module_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_event_threat_detection_custom_module_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_scc_event_threat_detection_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycenter/EventThreatDetectionCustomModule.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EventThreatDetectionCustomModule' +resource: google_scc_event_threat_detection_custom_module +generation_type: mmv1 +source_file: products/securitycenter/EventThreatDetectionCustomModule.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: EventThreatDetectionCustomModule api_variant_patterns: - - 'organizations/{organization}/eventThreatDetectionSettings/customModules/{customModule}' + - organizations/{organization}/eventThreatDetectionSettings/customModules/{customModule} fields: - - api_field: 'config' - json: true - - api_field: 'displayName' - - api_field: 'enablementState' - - api_field: 'lastEditor' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - api_field: config + json: true + - api_field: displayName + - api_field: enablementState + - api_field: lastEditor + - api_field: name + - field: organization + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_folder_custom_module_generated_meta.yaml b/google/services/securitycenter/resource_scc_folder_custom_module_generated_meta.yaml index 23e91462c41..fdf0bbdd401 100644 --- a/google/services/securitycenter/resource_scc_folder_custom_module_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_folder_custom_module_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_scc_folder_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycenter/FolderCustomModule.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityHealthAnalyticsCustomModule' +resource: google_scc_folder_custom_module +generation_type: mmv1 +source_file: products/securitycenter/FolderCustomModule.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityHealthAnalyticsCustomModule api_variant_patterns: - - 'folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}' + - folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule} fields: - - api_field: 'ancestorModule' - - api_field: 'customConfig.customOutput.properties.name' - - api_field: 'customConfig.customOutput.properties.valueExpression.description' - - api_field: 'customConfig.customOutput.properties.valueExpression.expression' - - api_field: 'customConfig.customOutput.properties.valueExpression.location' - - api_field: 'customConfig.customOutput.properties.valueExpression.title' - - api_field: 'customConfig.description' - - api_field: 'customConfig.predicate.description' - - api_field: 'customConfig.predicate.expression' - - api_field: 'customConfig.predicate.location' - - api_field: 'customConfig.predicate.title' - - api_field: 'customConfig.recommendation' - - api_field: 'customConfig.resourceSelector.resourceTypes' - - api_field: 'customConfig.severity' - - api_field: 'displayName' - - api_field: 'enablementState' - - field: 'folder' - provider_only: true - - api_field: 'lastEditor' - - api_field: 'name' - - api_field: 'updateTime' + - api_field: ancestorModule + - api_field: customConfig.customOutput.properties.name + - api_field: customConfig.customOutput.properties.valueExpression.description + - api_field: customConfig.customOutput.properties.valueExpression.expression + - api_field: customConfig.customOutput.properties.valueExpression.location + - api_field: customConfig.customOutput.properties.valueExpression.title + - api_field: customConfig.description + - api_field: customConfig.predicate.description + - api_field: customConfig.predicate.expression + - api_field: customConfig.predicate.location + - api_field: customConfig.predicate.title + - api_field: customConfig.recommendation + - api_field: customConfig.resourceSelector.resourceTypes + - api_field: customConfig.severity + - api_field: displayName + - api_field: enablementState + - field: folder + provider_only: true + - api_field: lastEditor + - api_field: name + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_folder_notification_config_generated_meta.yaml b/google/services/securitycenter/resource_scc_folder_notification_config_generated_meta.yaml index 734c346b013..58a644a0c06 100644 --- a/google/services/securitycenter/resource_scc_folder_notification_config_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_folder_notification_config_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_scc_folder_notification_config' -generation_type: 'mmv1' -source_file: 'products/securitycenter/FolderNotificationConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NotificationConfig' +resource: google_scc_folder_notification_config +generation_type: mmv1 +source_file: products/securitycenter/FolderNotificationConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: NotificationConfig api_variant_patterns: - - 'folders/{folder}/notificationConfigs/{notificationConfig}' + - folders/{folder}/notificationConfigs/{notificationConfig} fields: - - field: 'config_id' - provider_only: true - - api_field: 'description' - - field: 'folder' - provider_only: true - - api_field: 'name' - - api_field: 'pubsubTopic' - - api_field: 'serviceAccount' - - api_field: 'streamingConfig.filter' + - field: config_id + provider_only: true + - api_field: description + - field: folder + provider_only: true + - api_field: name + - api_field: pubsubTopic + - api_field: serviceAccount + - api_field: streamingConfig.filter diff --git a/google/services/securitycenter/resource_scc_folder_scc_big_query_export_generated_meta.yaml b/google/services/securitycenter/resource_scc_folder_scc_big_query_export_generated_meta.yaml index 3b351adf397..10316b48dad 100644 --- a/google/services/securitycenter/resource_scc_folder_scc_big_query_export_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_folder_scc_big_query_export_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_scc_folder_scc_big_query_export' -generation_type: 'mmv1' -source_file: 'products/securitycenter/FolderSccBigQueryExport.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BigQueryExport' +resource: google_scc_folder_scc_big_query_export +generation_type: mmv1 +source_file: products/securitycenter/FolderSccBigQueryExport.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: BigQueryExport api_variant_patterns: - - 'folders/{folder}/bigQueryExports/{bigQueryExport}' + - folders/{folder}/bigQueryExports/{bigQueryExport} fields: - - field: 'big_query_export_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataset' - - api_field: 'description' - - api_field: 'filter' - - field: 'folder' - provider_only: true - - api_field: 'mostRecentEditor' - - api_field: 'name' - - api_field: 'principal' - - api_field: 'updateTime' + - field: big_query_export_id + provider_only: true + - api_field: createTime + - api_field: dataset + - api_field: description + - api_field: filter + - field: folder + provider_only: true + - api_field: mostRecentEditor + - api_field: name + - api_field: principal + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_mute_config_generated_meta.yaml b/google/services/securitycenter/resource_scc_mute_config_generated_meta.yaml index ccb70479d19..19de64cdf29 100644 --- a/google/services/securitycenter/resource_scc_mute_config_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_mute_config_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_scc_mute_config' -generation_type: 'mmv1' -source_file: 'products/securitycenter/MuteConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'MuteConfig' +resource: google_scc_mute_config +generation_type: mmv1 +source_file: products/securitycenter/MuteConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: MuteConfig api_variant_patterns: - - 'folders/{folder}/muteConfigs/{muteConfig}' - - 'organizations/{organization}/muteConfigs/{muteConfig}' - - 'projects/{project}/muteConfigs/{muteConfig}' + - folders/{folder}/muteConfigs/{muteConfig} + - organizations/{organization}/muteConfigs/{muteConfig} + - projects/{project}/muteConfigs/{muteConfig} fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'expiryTime' - - api_field: 'filter' - - api_field: 'mostRecentEditor' - - field: 'mute_config_id' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: expiryTime + - api_field: filter + - api_field: mostRecentEditor + - field: mute_config_id + provider_only: true + - api_field: name + - field: parent + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_notification_config_generated_meta.yaml b/google/services/securitycenter/resource_scc_notification_config_generated_meta.yaml index df1084f8b39..7a4058f13dc 100644 --- a/google/services/securitycenter/resource_scc_notification_config_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_notification_config_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_scc_notification_config' -generation_type: 'mmv1' -source_file: 'products/securitycenter/NotificationConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NotificationConfig' +resource: google_scc_notification_config +generation_type: mmv1 +source_file: products/securitycenter/NotificationConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: NotificationConfig api_variant_patterns: - - 'organizations/{organization}/notificationConfigs/{notificationConfig}' + - organizations/{organization}/notificationConfigs/{notificationConfig} fields: - - field: 'config_id' - provider_only: true - - api_field: 'description' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'pubsubTopic' - - api_field: 'serviceAccount' - - api_field: 'streamingConfig.filter' + - field: config_id + provider_only: true + - api_field: description + - api_field: name + - field: organization + provider_only: true + - api_field: pubsubTopic + - api_field: serviceAccount + - api_field: streamingConfig.filter diff --git a/google/services/securitycenter/resource_scc_organization_custom_module_generated_meta.yaml b/google/services/securitycenter/resource_scc_organization_custom_module_generated_meta.yaml index 8a2372e9d6a..246281e342f 100644 --- a/google/services/securitycenter/resource_scc_organization_custom_module_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_organization_custom_module_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_scc_organization_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycenter/OrganizationCustomModule.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityHealthAnalyticsCustomModule' +resource: google_scc_organization_custom_module +generation_type: mmv1 +source_file: products/securitycenter/OrganizationCustomModule.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityHealthAnalyticsCustomModule api_variant_patterns: - - 'organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}' + - organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule} fields: - - api_field: 'ancestorModule' - - api_field: 'customConfig.customOutput.properties.name' - - api_field: 'customConfig.customOutput.properties.valueExpression.description' - - api_field: 'customConfig.customOutput.properties.valueExpression.expression' - - api_field: 'customConfig.customOutput.properties.valueExpression.location' - - api_field: 'customConfig.customOutput.properties.valueExpression.title' - - api_field: 'customConfig.description' - - api_field: 'customConfig.predicate.description' - - api_field: 'customConfig.predicate.expression' - - api_field: 'customConfig.predicate.location' - - api_field: 'customConfig.predicate.title' - - api_field: 'customConfig.recommendation' - - api_field: 'customConfig.resourceSelector.resourceTypes' - - api_field: 'customConfig.severity' - - api_field: 'displayName' - - api_field: 'enablementState' - - api_field: 'lastEditor' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'updateTime' + - api_field: ancestorModule + - api_field: customConfig.customOutput.properties.name + - api_field: customConfig.customOutput.properties.valueExpression.description + - api_field: customConfig.customOutput.properties.valueExpression.expression + - api_field: customConfig.customOutput.properties.valueExpression.location + - api_field: customConfig.customOutput.properties.valueExpression.title + - api_field: customConfig.description + - api_field: customConfig.predicate.description + - api_field: customConfig.predicate.expression + - api_field: customConfig.predicate.location + - api_field: customConfig.predicate.title + - api_field: customConfig.recommendation + - api_field: customConfig.resourceSelector.resourceTypes + - api_field: customConfig.severity + - api_field: displayName + - api_field: enablementState + - api_field: lastEditor + - api_field: name + - field: organization + provider_only: true + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_organization_scc_big_query_export_generated_meta.yaml b/google/services/securitycenter/resource_scc_organization_scc_big_query_export_generated_meta.yaml index 67d73178d8b..d8d250e8ea0 100644 --- a/google/services/securitycenter/resource_scc_organization_scc_big_query_export_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_organization_scc_big_query_export_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_scc_organization_scc_big_query_export' -generation_type: 'mmv1' -source_file: 'products/securitycenter/OrganizationSccBigQueryExport.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BigQueryExport' +resource: google_scc_organization_scc_big_query_export +generation_type: mmv1 +source_file: products/securitycenter/OrganizationSccBigQueryExport.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: BigQueryExport api_variant_patterns: - - 'organizations/{organization}/bigQueryExports/{bigQueryExport}' + - organizations/{organization}/bigQueryExports/{bigQueryExport} fields: - - field: 'big_query_export_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataset' - - api_field: 'description' - - api_field: 'filter' - - api_field: 'mostRecentEditor' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'principal' - - api_field: 'updateTime' + - field: big_query_export_id + provider_only: true + - api_field: createTime + - api_field: dataset + - api_field: description + - api_field: filter + - api_field: mostRecentEditor + - api_field: name + - field: organization + provider_only: true + - api_field: principal + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_project_custom_module_generated_meta.yaml b/google/services/securitycenter/resource_scc_project_custom_module_generated_meta.yaml index d17d44ba8cc..447705543fb 100644 --- a/google/services/securitycenter/resource_scc_project_custom_module_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_project_custom_module_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_scc_project_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycenter/ProjectCustomModule.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityHealthAnalyticsCustomModule' +resource: google_scc_project_custom_module +generation_type: mmv1 +source_file: products/securitycenter/ProjectCustomModule.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityHealthAnalyticsCustomModule api_variant_patterns: - - 'projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}' + - projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule} fields: - - api_field: 'ancestorModule' - - api_field: 'customConfig.customOutput.properties.name' - - api_field: 'customConfig.customOutput.properties.valueExpression.description' - - api_field: 'customConfig.customOutput.properties.valueExpression.expression' - - api_field: 'customConfig.customOutput.properties.valueExpression.location' - - api_field: 'customConfig.customOutput.properties.valueExpression.title' - - api_field: 'customConfig.description' - - api_field: 'customConfig.predicate.description' - - api_field: 'customConfig.predicate.expression' - - api_field: 'customConfig.predicate.location' - - api_field: 'customConfig.predicate.title' - - api_field: 'customConfig.recommendation' - - api_field: 'customConfig.resourceSelector.resourceTypes' - - api_field: 'customConfig.severity' - - api_field: 'displayName' - - api_field: 'enablementState' - - api_field: 'lastEditor' - - api_field: 'name' - - api_field: 'updateTime' + - api_field: ancestorModule + - api_field: customConfig.customOutput.properties.name + - api_field: customConfig.customOutput.properties.valueExpression.description + - api_field: customConfig.customOutput.properties.valueExpression.expression + - api_field: customConfig.customOutput.properties.valueExpression.location + - api_field: customConfig.customOutput.properties.valueExpression.title + - api_field: customConfig.description + - api_field: customConfig.predicate.description + - api_field: customConfig.predicate.expression + - api_field: customConfig.predicate.location + - api_field: customConfig.predicate.title + - api_field: customConfig.recommendation + - api_field: customConfig.resourceSelector.resourceTypes + - api_field: customConfig.severity + - api_field: displayName + - api_field: enablementState + - api_field: lastEditor + - api_field: name + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_project_notification_config_generated_meta.yaml b/google/services/securitycenter/resource_scc_project_notification_config_generated_meta.yaml index 7471fdeb86d..2eb905c73db 100644 --- a/google/services/securitycenter/resource_scc_project_notification_config_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_project_notification_config_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_scc_project_notification_config' -generation_type: 'mmv1' -source_file: 'products/securitycenter/ProjectNotificationConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NotificationConfig' +resource: google_scc_project_notification_config +generation_type: mmv1 +source_file: products/securitycenter/ProjectNotificationConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: NotificationConfig api_variant_patterns: - - 'projects/{project}/notificationConfigs/{notificationConfig}' + - projects/{project}/notificationConfigs/{notificationConfig} fields: - - field: 'config_id' - provider_only: true - - api_field: 'description' - - api_field: 'name' - - api_field: 'pubsubTopic' - - api_field: 'serviceAccount' - - api_field: 'streamingConfig.filter' + - field: config_id + provider_only: true + - api_field: description + - api_field: name + - api_field: pubsubTopic + - api_field: serviceAccount + - api_field: streamingConfig.filter diff --git a/google/services/securitycenter/resource_scc_project_scc_big_query_export_generated_meta.yaml b/google/services/securitycenter/resource_scc_project_scc_big_query_export_generated_meta.yaml index 24d3d1bb885..868eddace80 100644 --- a/google/services/securitycenter/resource_scc_project_scc_big_query_export_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_project_scc_big_query_export_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_scc_project_scc_big_query_export' -generation_type: 'mmv1' -source_file: 'products/securitycenter/ProjectSccBigQueryExport.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BigQueryExport' +resource: google_scc_project_scc_big_query_export +generation_type: mmv1 +source_file: products/securitycenter/ProjectSccBigQueryExport.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: BigQueryExport api_variant_patterns: - - 'projects/{project}/bigQueryExports/{bigQueryExport}' + - projects/{project}/bigQueryExports/{bigQueryExport} fields: - - field: 'big_query_export_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataset' - - api_field: 'description' - - api_field: 'filter' - - api_field: 'mostRecentEditor' - - api_field: 'name' - - api_field: 'principal' - - api_field: 'updateTime' + - field: big_query_export_id + provider_only: true + - api_field: createTime + - api_field: dataset + - api_field: description + - api_field: filter + - api_field: mostRecentEditor + - api_field: name + - api_field: principal + - api_field: updateTime diff --git a/google/services/securitycenter/resource_scc_source_generated_meta.yaml b/google/services/securitycenter/resource_scc_source_generated_meta.yaml index 5689c69959b..82b3c6d0caf 100644 --- a/google/services/securitycenter/resource_scc_source_generated_meta.yaml +++ b/google/services/securitycenter/resource_scc_source_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_scc_source' -generation_type: 'mmv1' -source_file: 'products/securitycenter/Source.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Source' +resource: google_scc_source +generation_type: mmv1 +source_file: products/securitycenter/Source.yaml +api_service_name: securitycenter.googleapis.com +api_version: v1 +api_resource_type_kind: Source api_variant_patterns: - - 'organizations/{organization}/sources/{source}' + - organizations/{organization}/sources/{source} fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'name' - - field: 'organization' - provider_only: true + - api_field: description + - api_field: displayName + - api_field: name + - field: organization + provider_only: true diff --git a/google/services/securitycentermanagement/resource_scc_management_folder_security_health_analytics_custom_module_generated_meta.yaml b/google/services/securitycentermanagement/resource_scc_management_folder_security_health_analytics_custom_module_generated_meta.yaml index 2b3ba6a2252..6169c0a1007 100644 --- a/google/services/securitycentermanagement/resource_scc_management_folder_security_health_analytics_custom_module_generated_meta.yaml +++ b/google/services/securitycentermanagement/resource_scc_management_folder_security_health_analytics_custom_module_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_scc_management_folder_security_health_analytics_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycentermanagement/FolderSecurityHealthAnalyticsCustomModule.yaml' -api_service_name: 'securitycentermanagement.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityHealthAnalyticsCustomModule' +resource: google_scc_management_folder_security_health_analytics_custom_module +generation_type: mmv1 +source_file: products/securitycentermanagement/FolderSecurityHealthAnalyticsCustomModule.yaml +api_service_name: securitycentermanagement.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityHealthAnalyticsCustomModule api_variant_patterns: - - 'folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule}' + - folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule} fields: - - api_field: 'ancestorModule' - - api_field: 'customConfig.customOutput.properties.name' - - api_field: 'customConfig.customOutput.properties.valueExpression.description' - - api_field: 'customConfig.customOutput.properties.valueExpression.expression' - - api_field: 'customConfig.customOutput.properties.valueExpression.location' - - api_field: 'customConfig.customOutput.properties.valueExpression.title' - - api_field: 'customConfig.description' - - api_field: 'customConfig.predicate.description' - - api_field: 'customConfig.predicate.expression' - - api_field: 'customConfig.predicate.location' - - api_field: 'customConfig.predicate.title' - - api_field: 'customConfig.recommendation' - - api_field: 'customConfig.resourceSelector.resourceTypes' - - api_field: 'customConfig.severity' - - api_field: 'displayName' - - api_field: 'enablementState' - - field: 'folder' - provider_only: true - - api_field: 'lastEditor' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' + - api_field: ancestorModule + - api_field: customConfig.customOutput.properties.name + - api_field: customConfig.customOutput.properties.valueExpression.description + - api_field: customConfig.customOutput.properties.valueExpression.expression + - api_field: customConfig.customOutput.properties.valueExpression.location + - api_field: customConfig.customOutput.properties.valueExpression.title + - api_field: customConfig.description + - api_field: customConfig.predicate.description + - api_field: customConfig.predicate.expression + - api_field: customConfig.predicate.location + - api_field: customConfig.predicate.title + - api_field: customConfig.recommendation + - api_field: customConfig.resourceSelector.resourceTypes + - api_field: customConfig.severity + - api_field: displayName + - api_field: enablementState + - field: folder + provider_only: true + - api_field: lastEditor + - field: location + provider_only: true + - api_field: name + - api_field: updateTime diff --git a/google/services/securitycentermanagement/resource_scc_management_organization_event_threat_detection_custom_module_generated_meta.yaml b/google/services/securitycentermanagement/resource_scc_management_organization_event_threat_detection_custom_module_generated_meta.yaml index 57d78ff3cf3..02f5cebc6c4 100644 --- a/google/services/securitycentermanagement/resource_scc_management_organization_event_threat_detection_custom_module_generated_meta.yaml +++ b/google/services/securitycentermanagement/resource_scc_management_organization_event_threat_detection_custom_module_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_scc_management_organization_event_threat_detection_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycentermanagement/OrganizationEventThreatDetectionCustomModule.yaml' -api_service_name: 'securitycentermanagement.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EventThreatDetectionCustomModule' +resource: google_scc_management_organization_event_threat_detection_custom_module +generation_type: mmv1 +source_file: products/securitycentermanagement/OrganizationEventThreatDetectionCustomModule.yaml +api_service_name: securitycentermanagement.googleapis.com +api_version: v1 +api_resource_type_kind: EventThreatDetectionCustomModule api_variant_patterns: - - 'organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{eventThreatDetectionCustomModule}' + - organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{eventThreatDetectionCustomModule} fields: - - api_field: 'config' - json: true - - api_field: 'displayName' - - api_field: 'enablementState' - - api_field: 'lastEditor' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - api_field: config + json: true + - api_field: displayName + - api_field: enablementState + - api_field: lastEditor + - field: location + provider_only: true + - api_field: name + - field: organization + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/securitycentermanagement/resource_scc_management_organization_security_health_analytics_custom_module_generated_meta.yaml b/google/services/securitycentermanagement/resource_scc_management_organization_security_health_analytics_custom_module_generated_meta.yaml index f1d3d9e1265..839a4f836bf 100644 --- a/google/services/securitycentermanagement/resource_scc_management_organization_security_health_analytics_custom_module_generated_meta.yaml +++ b/google/services/securitycentermanagement/resource_scc_management_organization_security_health_analytics_custom_module_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_scc_management_organization_security_health_analytics_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycentermanagement/OrganizationSecurityHealthAnalyticsCustomModule.yaml' -api_service_name: 'securitycentermanagement.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityHealthAnalyticsCustomModule' +resource: google_scc_management_organization_security_health_analytics_custom_module +generation_type: mmv1 +source_file: products/securitycentermanagement/OrganizationSecurityHealthAnalyticsCustomModule.yaml +api_service_name: securitycentermanagement.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityHealthAnalyticsCustomModule api_variant_patterns: - - 'organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule}' + - organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule} fields: - - api_field: 'ancestorModule' - - api_field: 'customConfig.customOutput.properties.name' - - api_field: 'customConfig.customOutput.properties.valueExpression.description' - - api_field: 'customConfig.customOutput.properties.valueExpression.expression' - - api_field: 'customConfig.customOutput.properties.valueExpression.location' - - api_field: 'customConfig.customOutput.properties.valueExpression.title' - - api_field: 'customConfig.description' - - api_field: 'customConfig.predicate.description' - - api_field: 'customConfig.predicate.expression' - - api_field: 'customConfig.predicate.location' - - api_field: 'customConfig.predicate.title' - - api_field: 'customConfig.recommendation' - - api_field: 'customConfig.resourceSelector.resourceTypes' - - api_field: 'customConfig.severity' - - api_field: 'displayName' - - api_field: 'enablementState' - - api_field: 'lastEditor' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'updateTime' + - api_field: ancestorModule + - api_field: customConfig.customOutput.properties.name + - api_field: customConfig.customOutput.properties.valueExpression.description + - api_field: customConfig.customOutput.properties.valueExpression.expression + - api_field: customConfig.customOutput.properties.valueExpression.location + - api_field: customConfig.customOutput.properties.valueExpression.title + - api_field: customConfig.description + - api_field: customConfig.predicate.description + - api_field: customConfig.predicate.expression + - api_field: customConfig.predicate.location + - api_field: customConfig.predicate.title + - api_field: customConfig.recommendation + - api_field: customConfig.resourceSelector.resourceTypes + - api_field: customConfig.severity + - api_field: displayName + - api_field: enablementState + - api_field: lastEditor + - field: location + provider_only: true + - api_field: name + - field: organization + provider_only: true + - api_field: updateTime diff --git a/google/services/securitycentermanagement/resource_scc_management_project_security_health_analytics_custom_module_generated_meta.yaml b/google/services/securitycentermanagement/resource_scc_management_project_security_health_analytics_custom_module_generated_meta.yaml index e8e687df859..a239b0b0d18 100644 --- a/google/services/securitycentermanagement/resource_scc_management_project_security_health_analytics_custom_module_generated_meta.yaml +++ b/google/services/securitycentermanagement/resource_scc_management_project_security_health_analytics_custom_module_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_scc_management_project_security_health_analytics_custom_module' -generation_type: 'mmv1' -source_file: 'products/securitycentermanagement/ProjectSecurityHealthAnalyticsCustomModule.yaml' -api_service_name: 'securitycentermanagement.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'SecurityHealthAnalyticsCustomModule' +resource: google_scc_management_project_security_health_analytics_custom_module +generation_type: mmv1 +source_file: products/securitycentermanagement/ProjectSecurityHealthAnalyticsCustomModule.yaml +api_service_name: securitycentermanagement.googleapis.com +api_version: v1 +api_resource_type_kind: SecurityHealthAnalyticsCustomModule api_variant_patterns: - - 'projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule}' + - projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{securityHealthAnalyticsCustomModule} fields: - - api_field: 'ancestorModule' - - api_field: 'customConfig.customOutput.properties.name' - - api_field: 'customConfig.customOutput.properties.valueExpression.description' - - api_field: 'customConfig.customOutput.properties.valueExpression.expression' - - api_field: 'customConfig.customOutput.properties.valueExpression.location' - - api_field: 'customConfig.customOutput.properties.valueExpression.title' - - api_field: 'customConfig.description' - - api_field: 'customConfig.predicate.description' - - api_field: 'customConfig.predicate.expression' - - api_field: 'customConfig.predicate.location' - - api_field: 'customConfig.predicate.title' - - api_field: 'customConfig.recommendation' - - api_field: 'customConfig.resourceSelector.resourceTypes' - - api_field: 'customConfig.severity' - - api_field: 'displayName' - - api_field: 'enablementState' - - api_field: 'lastEditor' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'updateTime' + - api_field: ancestorModule + - api_field: customConfig.customOutput.properties.name + - api_field: customConfig.customOutput.properties.valueExpression.description + - api_field: customConfig.customOutput.properties.valueExpression.expression + - api_field: customConfig.customOutput.properties.valueExpression.location + - api_field: customConfig.customOutput.properties.valueExpression.title + - api_field: customConfig.description + - api_field: customConfig.predicate.description + - api_field: customConfig.predicate.expression + - api_field: customConfig.predicate.location + - api_field: customConfig.predicate.title + - api_field: customConfig.recommendation + - api_field: customConfig.resourceSelector.resourceTypes + - api_field: customConfig.severity + - api_field: displayName + - api_field: enablementState + - api_field: lastEditor + - field: location + provider_only: true + - api_field: name + - api_field: updateTime diff --git a/google/services/securitycenterv2/resource_scc_v2_folder_mute_config_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_folder_mute_config_generated_meta.yaml index 985876b735e..5675fb06950 100644 --- a/google/services/securitycenterv2/resource_scc_v2_folder_mute_config_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_folder_mute_config_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_scc_v2_folder_mute_config' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/FolderMuteConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'MuteConfig' +resource: google_scc_v2_folder_mute_config +generation_type: mmv1 +source_file: products/securitycenterv2/FolderMuteConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: MuteConfig api_variant_patterns: - - 'folders/{folder}/locations/{location}/muteConfigs/{muteConfig}' + - folders/{folder}/locations/{location}/muteConfigs/{muteConfig} fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'filter' - - field: 'folder' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'mostRecentEditor' - - field: 'mute_config_id' - provider_only: true - - api_field: 'name' - - api_field: 'type' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: filter + - field: folder + provider_only: true + - field: location + provider_only: true + - api_field: mostRecentEditor + - field: mute_config_id + provider_only: true + - api_field: name + - api_field: type + - api_field: updateTime diff --git a/google/services/securitycenterv2/resource_scc_v2_folder_notification_config_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_folder_notification_config_generated_meta.yaml index 69c51bcd0f0..7543fbdc7cf 100644 --- a/google/services/securitycenterv2/resource_scc_v2_folder_notification_config_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_folder_notification_config_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_scc_v2_folder_notification_config' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/FolderNotificationConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'NotificationConfig' +resource: google_scc_v2_folder_notification_config +generation_type: mmv1 +source_file: products/securitycenterv2/FolderNotificationConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: NotificationConfig api_variant_patterns: - - 'folders/{folder}/locations/{location}/notificationConfigs/{notificationConfig}' + - folders/{folder}/locations/{location}/notificationConfigs/{notificationConfig} fields: - - field: 'config_id' - provider_only: true - - api_field: 'description' - - field: 'folder' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'pubsubTopic' - - api_field: 'serviceAccount' - - api_field: 'streamingConfig.filter' + - field: config_id + provider_only: true + - api_field: description + - field: folder + provider_only: true + - field: location + provider_only: true + - api_field: name + - api_field: pubsubTopic + - api_field: serviceAccount + - api_field: streamingConfig.filter diff --git a/google/services/securitycenterv2/resource_scc_v2_folder_scc_big_query_export_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_folder_scc_big_query_export_generated_meta.yaml index 94200dc2445..0f8b9bc7383 100644 --- a/google/services/securitycenterv2/resource_scc_v2_folder_scc_big_query_export_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_folder_scc_big_query_export_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_scc_v2_folder_scc_big_query_export' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/FolderSccBigQueryExport.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'BigQueryExport' +resource: google_scc_v2_folder_scc_big_query_export +generation_type: mmv1 +source_file: products/securitycenterv2/FolderSccBigQueryExport.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: BigQueryExport api_variant_patterns: - - 'folders/{folder}/locations/{location}/bigQueryExports/{bigQueryExport}' + - folders/{folder}/locations/{location}/bigQueryExports/{bigQueryExport} fields: - - field: 'big_query_export_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataset' - - api_field: 'description' - - api_field: 'filter' - - field: 'folder' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'mostRecentEditor' - - api_field: 'name' - - api_field: 'principal' - - api_field: 'updateTime' + - field: big_query_export_id + provider_only: true + - api_field: createTime + - api_field: dataset + - api_field: description + - api_field: filter + - field: folder + provider_only: true + - field: location + provider_only: true + - api_field: mostRecentEditor + - api_field: name + - api_field: principal + - api_field: updateTime diff --git a/google/services/securitycenterv2/resource_scc_v2_organization_mute_config_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_organization_mute_config_generated_meta.yaml index 395040d03b8..d6e67a5c5a5 100644 --- a/google/services/securitycenterv2/resource_scc_v2_organization_mute_config_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_organization_mute_config_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_scc_v2_organization_mute_config' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/OrganizationMuteConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'MuteConfig' +resource: google_scc_v2_organization_mute_config +generation_type: mmv1 +source_file: products/securitycenterv2/OrganizationMuteConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: MuteConfig api_variant_patterns: - - 'organizations/{organization}/locations/{location}/muteConfigs/{muteConfig}' + - organizations/{organization}/locations/{location}/muteConfigs/{muteConfig} fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'filter' - - field: 'location' - provider_only: true - - api_field: 'mostRecentEditor' - - field: 'mute_config_id' - provider_only: true - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'type' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: filter + - field: location + provider_only: true + - api_field: mostRecentEditor + - field: mute_config_id + provider_only: true + - api_field: name + - field: organization + provider_only: true + - api_field: type + - api_field: updateTime diff --git a/google/services/securitycenterv2/resource_scc_v2_organization_notification_config_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_organization_notification_config_generated_meta.yaml index 69ec62c8865..78b56541f64 100644 --- a/google/services/securitycenterv2/resource_scc_v2_organization_notification_config_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_organization_notification_config_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_scc_v2_organization_notification_config' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/OrganizationNotificationConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'NotificationConfig' +resource: google_scc_v2_organization_notification_config +generation_type: mmv1 +source_file: products/securitycenterv2/OrganizationNotificationConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: NotificationConfig api_variant_patterns: - - 'organizations/{organization}/locations/{location}/notificationConfigs/{notificationConfig}' + - organizations/{organization}/locations/{location}/notificationConfigs/{notificationConfig} fields: - - field: 'config_id' - provider_only: true - - api_field: 'description' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'pubsubTopic' - - api_field: 'serviceAccount' - - api_field: 'streamingConfig.filter' + - field: config_id + provider_only: true + - api_field: description + - field: location + provider_only: true + - api_field: name + - field: organization + provider_only: true + - api_field: pubsubTopic + - api_field: serviceAccount + - api_field: streamingConfig.filter diff --git a/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_export_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_export_generated_meta.yaml index d951b555aff..81d8a9c09cc 100644 --- a/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_export_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_export_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_scc_v2_organization_scc_big_query_export' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/OrganizationSccBigQueryExport.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'BigQueryExport' +resource: google_scc_v2_organization_scc_big_query_export +generation_type: mmv1 +source_file: products/securitycenterv2/OrganizationSccBigQueryExport.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: BigQueryExport api_variant_patterns: - - 'organizations/{organization}/locations/{location}/bigQueryExports/{bigQueryExport}' + - organizations/{organization}/locations/{location}/bigQueryExports/{bigQueryExport} fields: - - field: 'big_query_export_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataset' - - api_field: 'description' - - api_field: 'filter' - - field: 'location' - provider_only: true - - api_field: 'mostRecentEditor' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'principal' - - api_field: 'updateTime' + - field: big_query_export_id + provider_only: true + - api_field: createTime + - api_field: dataset + - api_field: description + - api_field: filter + - field: location + provider_only: true + - api_field: mostRecentEditor + - api_field: name + - field: organization + provider_only: true + - api_field: principal + - api_field: updateTime diff --git a/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_exports_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_exports_generated_meta.yaml index 1215fa890b2..fed37d473b6 100644 --- a/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_exports_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_organization_scc_big_query_exports_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_scc_v2_organization_scc_big_query_exports' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/OrganizationSccBigQueryExports.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'BigQueryExport' +resource: google_scc_v2_organization_scc_big_query_exports +generation_type: mmv1 +source_file: products/securitycenterv2/OrganizationSccBigQueryExports.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: BigQueryExport api_variant_patterns: - - 'organizations/{organization}/locations/{location}/bigQueryExports/{bigQueryExport}' + - organizations/{organization}/locations/{location}/bigQueryExports/{bigQueryExport} fields: - - field: 'big_query_export_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataset' - - api_field: 'description' - - api_field: 'filter' - - field: 'location' - provider_only: true - - api_field: 'mostRecentEditor' - - api_field: 'name' - - field: 'organization' - provider_only: true - - api_field: 'principal' - - api_field: 'updateTime' + - field: big_query_export_id + provider_only: true + - api_field: createTime + - api_field: dataset + - api_field: description + - api_field: filter + - field: location + provider_only: true + - api_field: mostRecentEditor + - api_field: name + - field: organization + provider_only: true + - api_field: principal + - api_field: updateTime diff --git a/google/services/securitycenterv2/resource_scc_v2_organization_source_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_organization_source_generated_meta.yaml index 2bf2eaffdef..eedadb443d1 100644 --- a/google/services/securitycenterv2/resource_scc_v2_organization_source_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_organization_source_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_scc_v2_organization_source' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/OrganizationSource.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Source' +resource: google_scc_v2_organization_source +generation_type: mmv1 +source_file: products/securitycenterv2/OrganizationSource.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: Source api_variant_patterns: - - 'organizations/{organization}/sources/{source}' + - organizations/{organization}/sources/{source} fields: - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'name' - - field: 'organization' - provider_only: true + - api_field: description + - api_field: displayName + - api_field: name + - field: organization + provider_only: true diff --git a/google/services/securitycenterv2/resource_scc_v2_project_mute_config_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_project_mute_config_generated_meta.yaml index d368d21b78e..dcee5fbd84b 100644 --- a/google/services/securitycenterv2/resource_scc_v2_project_mute_config_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_project_mute_config_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_scc_v2_project_mute_config' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/ProjectMuteConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'MuteConfig' +resource: google_scc_v2_project_mute_config +generation_type: mmv1 +source_file: products/securitycenterv2/ProjectMuteConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: MuteConfig api_variant_patterns: - - 'projects/{project}/locations/{location}/muteConfigs/{muteConfig}' + - projects/{project}/locations/{location}/muteConfigs/{muteConfig} fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'filter' - - field: 'location' - provider_only: true - - api_field: 'mostRecentEditor' - - field: 'mute_config_id' - provider_only: true - - api_field: 'name' - - api_field: 'type' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: filter + - field: location + provider_only: true + - api_field: mostRecentEditor + - field: mute_config_id + provider_only: true + - api_field: name + - api_field: type + - api_field: updateTime diff --git a/google/services/securitycenterv2/resource_scc_v2_project_notification_config.go b/google/services/securitycenterv2/resource_scc_v2_project_notification_config.go index 53f7aeead96..7eb324c2cd7 100644 --- a/google/services/securitycenterv2/resource_scc_v2_project_notification_config.go +++ b/google/services/securitycenterv2/resource_scc_v2_project_notification_config.go @@ -182,7 +182,7 @@ for information on how to write a filter.`, Type: schema.TypeString, Optional: true, ForceNew: true, - Description: `Location ID of the parent organization. Only global is supported at the moment.`, + Description: `Location ID for the parent project. Defaults to 'global' if location is not provided.`, Default: "global", }, "pubsub_topic": { @@ -560,7 +560,6 @@ func resourceSecurityCenterV2ProjectNotificationConfigDelete(d *schema.ResourceD } func resourceSecurityCenterV2ProjectNotificationConfigImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - config := meta.(*transport_tpg.Config) // current import_formats can't import fields with forward slashes in their value @@ -569,9 +568,9 @@ func resourceSecurityCenterV2ProjectNotificationConfigImport(d *schema.ResourceD } stringParts := strings.Split(d.Get("name").(string), "/") - if len(stringParts) < 2 { + if len(stringParts) != 6 { return nil, fmt.Errorf( - "Could not split project from name: %s", + "Unexpected format of ID (%s), expected projects/{{project}}/locations/{{location}}/notificationConfigs/{{config_id}}", d.Get("name"), ) } @@ -579,6 +578,15 @@ func resourceSecurityCenterV2ProjectNotificationConfigImport(d *schema.ResourceD if err := d.Set("project", stringParts[1]); err != nil { return nil, fmt.Errorf("Error setting project: %s", err) } + + if err := d.Set("location", stringParts[3]); err != nil { + return nil, fmt.Errorf("Error setting location: %s", err) + } + + if err := d.Set("config_id", stringParts[5]); err != nil { + return nil, fmt.Errorf("Error setting config_id: %s", err) + } + return []*schema.ResourceData{d}, nil } diff --git a/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_meta.yaml index 8991a7bc648..6ad4a48834b 100644 --- a/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_scc_v2_project_notification_config' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/ProjectNotificationConfig.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'NotificationConfig' +resource: google_scc_v2_project_notification_config +generation_type: mmv1 +source_file: products/securitycenterv2/ProjectNotificationConfig.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: NotificationConfig api_variant_patterns: - - 'projects/{project}/locations/{location}/notificationConfigs/{notificationConfig}' + - projects/{project}/locations/{location}/notificationConfigs/{notificationConfig} fields: - - field: 'config_id' - provider_only: true - - api_field: 'description' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'pubsubTopic' - - api_field: 'serviceAccount' - - api_field: 'streamingConfig.filter' + - field: config_id + provider_only: true + - api_field: description + - field: location + provider_only: true + - api_field: name + - api_field: pubsubTopic + - api_field: serviceAccount + - api_field: streamingConfig.filter diff --git a/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_test.go b/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_test.go index 2c9642ca362..b6dfde7b2a8 100644 --- a/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_test.go +++ b/google/services/securitycenterv2/resource_scc_v2_project_notification_config_generated_test.go @@ -70,7 +70,7 @@ func TestAccSecurityCenterV2ProjectNotificationConfig_sccV2ProjectNotificationCo ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"config_id", "location", "location", "project"}, + ImportStateVerifyIgnore: []string{"config_id", "location", "project"}, }, { ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", @@ -91,7 +91,6 @@ resource "google_pubsub_topic" "scc_v2_project_notification" { resource "google_scc_v2_project_notification_config" "custom_notification_config" { config_id = "tf-test-my-config%{random_suffix}" project = "%{project}" - location = "global" description = "My custom Cloud Security Command Center Finding Notification Configuration" pubsub_topic = google_pubsub_topic.scc_v2_project_notification.id diff --git a/google/services/securitycenterv2/resource_scc_v2_project_notification_config_test.go b/google/services/securitycenterv2/resource_scc_v2_project_notification_config_test.go index 7b1a819b3c2..79a23570a66 100644 --- a/google/services/securitycenterv2/resource_scc_v2_project_notification_config_test.go +++ b/google/services/securitycenterv2/resource_scc_v2_project_notification_config_test.go @@ -2,18 +2,22 @@ // SPDX-License-Identifier: MPL-2.0 // ---------------------------------------------------------------------------- // -// *** AUTO GENERATED CODE *** Type: Handwritten *** +// *** AUTO GENERATED CODE *** Type: Handwritten *** // // ---------------------------------------------------------------------------- // -// This code is generated by Magic Modules using the following: +// This code is generated by Magic Modules using the following: // -// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/securitycenterv2/resource_scc_v2_project_notification_config_test.go +// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/securitycenterv2/resource_scc_v2_project_notification_config_test.go // -// DO NOT EDIT this file directly. Any changes made to this file will be -// overwritten during the next generation cycle. +// DO NOT EDIT this file directly. Any changes made to this file will be +// overwritten during the next generation cycle. // // ---------------------------------------------------------------------------- +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +// Modified 2025 by Deutsche Telekom AG + package securitycenterv2_test import ( @@ -82,7 +86,7 @@ resource "google_scc_v2_project_notification_config" "custom_notification_config project = "%{project}" description = "My custom Cloud Security Command Center Finding Notification Configuration" pubsub_topic = google_pubsub_topic.scc_v2_project_notification.id - location = "global" + location = "%{location}" streaming_config { filter = "category = \"OPEN_FIREWALL\"" @@ -102,7 +106,7 @@ resource "google_scc_v2_project_notification_config" "custom_notification_config project = "%{project}" description = "My custom Cloud Security Command Center Finding Notification Configuration" pubsub_topic = google_pubsub_topic.scc_v2_project_notification.id - location = "global" + location = "%{location}" streaming_config { filter = "" @@ -110,3 +114,113 @@ resource "google_scc_v2_project_notification_config" "custom_notification_config } `, context) } + +func testAccSecurityCenterV2ProjectNotificationConfig_withLocation(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_pubsub_topic" "scc_v2_project_notification" { + name = "tf-test-my-topic%{random_suffix}" +} + +resource "google_scc_v2_project_notification_config" "custom_notification_config" { + config_id = "tf-test-my-config%{random_suffix}" + project = "%{project}" + location = "%{location}" + description = "My custom Cloud Security Command Center Finding Notification Configuration" + pubsub_topic = google_pubsub_topic.scc_v2_project_notification.id + + streaming_config { + filter = "category = \"OPEN_FIREWALL\"" + } +} +`, context) +} + +func TestAccSecurityCenterV2ProjectNotificationConfig_locationEu(t *testing.T) { + t.Skip("Skipping: CI project does not support data residency for other locations. This has to be setup during SCC Initalization") + t.Parallel() + + context := map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "location": "eu", + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccSecurityCenterV2ProjectNotificationConfig_withLocation(context), + }, + { + ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"project", "location", "config_id"}, + }, + { + Config: testAccSecurityCenterV2ProjectNotificationConfig_updateStreamingConfigFilter(context), + }, + { + ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"project", "location", "config_id"}, + }, + { + Config: testAccSecurityCenterV2ProjectNotificationConfig_emptyStreamingConfigFilter(context), + }, + { + ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"project", "location", "config_id"}, + }, + }, + }) +} + +func TestAccSecurityCenterV2ProjectNotificationConfig_locationUs(t *testing.T) { + t.Skip("Skipping: CI project does not support data residency for other locations. This has to be setup during SCC Initalization") + t.Parallel() + + context := map[string]interface{}{ + "project": envvar.GetTestProjectFromEnv(), + "location": "us", + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testAccSecurityCenterV2ProjectNotificationConfig_withLocation(context), + }, + { + ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"project", "location", "config_id"}, + }, + { + Config: testAccSecurityCenterV2ProjectNotificationConfig_updateStreamingConfigFilter(context), + }, + { + ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"project", "location", "config_id"}, + }, + { + Config: testAccSecurityCenterV2ProjectNotificationConfig_emptyStreamingConfigFilter(context), + }, + { + ResourceName: "google_scc_v2_project_notification_config.custom_notification_config", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"project", "location", "config_id"}, + }, + }, + }) +} diff --git a/google/services/securitycenterv2/resource_scc_v2_project_scc_big_query_export_generated_meta.yaml b/google/services/securitycenterv2/resource_scc_v2_project_scc_big_query_export_generated_meta.yaml index 68c125c30e4..cf94c531e6c 100644 --- a/google/services/securitycenterv2/resource_scc_v2_project_scc_big_query_export_generated_meta.yaml +++ b/google/services/securitycenterv2/resource_scc_v2_project_scc_big_query_export_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_scc_v2_project_scc_big_query_export' -generation_type: 'mmv1' -source_file: 'products/securitycenterv2/ProjectSccBigQueryExport.yaml' -api_service_name: 'securitycenter.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'BigQueryExport' +resource: google_scc_v2_project_scc_big_query_export +generation_type: mmv1 +source_file: products/securitycenterv2/ProjectSccBigQueryExport.yaml +api_service_name: securitycenter.googleapis.com +api_version: v2 +api_resource_type_kind: BigQueryExport api_variant_patterns: - - 'projects/{project}/locations/{location}/bigQueryExports/{bigQueryExport}' + - projects/{project}/locations/{location}/bigQueryExports/{bigQueryExport} fields: - - field: 'big_query_export_id' - provider_only: true - - api_field: 'createTime' - - api_field: 'dataset' - - api_field: 'description' - - api_field: 'filter' - - field: 'location' - provider_only: true - - api_field: 'mostRecentEditor' - - api_field: 'name' - - api_field: 'principal' - - api_field: 'updateTime' + - field: big_query_export_id + provider_only: true + - api_field: createTime + - api_field: dataset + - api_field: description + - api_field: filter + - field: location + provider_only: true + - api_field: mostRecentEditor + - api_field: name + - api_field: principal + - api_field: updateTime diff --git a/google/services/securityposture/resource_securityposture_posture_deployment_generated_meta.yaml b/google/services/securityposture/resource_securityposture_posture_deployment_generated_meta.yaml index 58046b55f38..bdf66f73ff4 100644 --- a/google/services/securityposture/resource_securityposture_posture_deployment_generated_meta.yaml +++ b/google/services/securityposture/resource_securityposture_posture_deployment_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_securityposture_posture_deployment' -generation_type: 'mmv1' -source_file: 'products/securityposture/PostureDeployment.yaml' -api_service_name: 'securityposture.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PostureDeployment' +resource: google_securityposture_posture_deployment +generation_type: mmv1 +source_file: products/securityposture/PostureDeployment.yaml +api_service_name: securityposture.googleapis.com +api_version: v1 +api_resource_type_kind: PostureDeployment api_variant_patterns: - - 'folders/{folder}/locations/{location}/postureDeployments/{postureDeployment}' - - 'organizations/{organization}/locations/{location}/postureDeployments/{postureDeployment}' - - 'projects/{project}/locations/{location}/postureDeployments/{postureDeployment}' + - folders/{folder}/locations/{location}/postureDeployments/{postureDeployment} + - organizations/{organization}/locations/{location}/postureDeployments/{postureDeployment} + - projects/{project}/locations/{location}/postureDeployments/{postureDeployment} fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'desiredPostureId' - - api_field: 'desiredPostureRevisionId' - - api_field: 'etag' - - api_field: 'failureMessage' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true - - field: 'posture_deployment_id' - provider_only: true - - api_field: 'postureId' - - api_field: 'postureRevisionId' - - api_field: 'reconciling' - - api_field: 'state' - - api_field: 'targetResource' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: desiredPostureId + - api_field: desiredPostureRevisionId + - api_field: etag + - api_field: failureMessage + - field: location + provider_only: true + - api_field: name + - field: parent + provider_only: true + - field: posture_deployment_id + provider_only: true + - api_field: postureId + - api_field: postureRevisionId + - api_field: reconciling + - api_field: state + - api_field: targetResource + - api_field: updateTime diff --git a/google/services/securityposture/resource_securityposture_posture_generated_meta.yaml b/google/services/securityposture/resource_securityposture_posture_generated_meta.yaml index 64898dc8c6f..c918af1a1c4 100644 --- a/google/services/securityposture/resource_securityposture_posture_generated_meta.yaml +++ b/google/services/securityposture/resource_securityposture_posture_generated_meta.yaml @@ -1,71 +1,71 @@ -resource: 'google_securityposture_posture' -generation_type: 'mmv1' -source_file: 'products/securityposture/Posture.yaml' -api_service_name: 'securityposture.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Posture' +resource: google_securityposture_posture +generation_type: mmv1 +source_file: products/securityposture/Posture.yaml +api_service_name: securityposture.googleapis.com +api_version: v1 +api_resource_type_kind: Posture fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'etag' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'parent' - provider_only: true - - api_field: 'policySets.description' - - api_field: 'policySets.policies.complianceStandards.control' - - api_field: 'policySets.policies.complianceStandards.standard' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.cannedConstraintId' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.allowAll' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.description' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.expression' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.location' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.title' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.denyAll' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.enforce' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.values.allowedValues' - - api_field: 'policySets.policies.constraint.orgPolicyConstraint.policyRules.values.deniedValues' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.actionType' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.condition' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.description' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.displayName' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.methodTypes' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.name' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.resourceTypes' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.allowAll' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.description' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.expression' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.location' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.title' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.denyAll' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.enforce' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.values.allowedValues' - - api_field: 'policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.values.deniedValues' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.name' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.description' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.expression' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.location' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.title' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.description' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.description' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.expression' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.location' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.title' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.recommendation' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.resourceSelector.resourceTypes' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.severity' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.displayName' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.id' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsCustomModule.moduleEnablementState' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsModule.moduleEnablementState' - - api_field: 'policySets.policies.constraint.securityHealthAnalyticsModule.moduleName' - - api_field: 'policySets.policies.description' - - api_field: 'policySets.policies.policyId' - - api_field: 'policySets.policySetId' - - field: 'posture_id' - provider_only: true - - api_field: 'reconciling' - - api_field: 'revisionId' - - api_field: 'state' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: etag + - field: location + provider_only: true + - api_field: name + - field: parent + provider_only: true + - api_field: policySets.description + - api_field: policySets.policies.complianceStandards.control + - api_field: policySets.policies.complianceStandards.standard + - api_field: policySets.policies.constraint.orgPolicyConstraint.cannedConstraintId + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.allowAll + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.description + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.expression + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.location + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.condition.title + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.denyAll + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.enforce + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.values.allowedValues + - api_field: policySets.policies.constraint.orgPolicyConstraint.policyRules.values.deniedValues + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.actionType + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.condition + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.description + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.displayName + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.methodTypes + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.name + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.customConstraint.resourceTypes + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.allowAll + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.description + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.expression + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.location + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.condition.title + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.denyAll + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.enforce + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.values.allowedValues + - api_field: policySets.policies.constraint.orgPolicyConstraintCustom.policyRules.values.deniedValues + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.name + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.description + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.expression + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.location + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.customOutput.properties.valueExpression.title + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.description + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.description + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.expression + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.location + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.predicate.title + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.recommendation + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.resourceSelector.resourceTypes + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.config.severity + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.displayName + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.id + - api_field: policySets.policies.constraint.securityHealthAnalyticsCustomModule.moduleEnablementState + - api_field: policySets.policies.constraint.securityHealthAnalyticsModule.moduleEnablementState + - api_field: policySets.policies.constraint.securityHealthAnalyticsModule.moduleName + - api_field: policySets.policies.description + - api_field: policySets.policies.policyId + - api_field: policySets.policySetId + - field: posture_id + provider_only: true + - api_field: reconciling + - api_field: revisionId + - api_field: state + - api_field: updateTime diff --git a/google/services/servicedirectory/iam_service_directory_namespace_generated_test.go b/google/services/servicedirectory/iam_service_directory_namespace_generated_test.go index fccc6c35a47..1ac13609e3e 100644 --- a/google/services/servicedirectory/iam_service_directory_namespace_generated_test.go +++ b/google/services/servicedirectory/iam_service_directory_namespace_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -218,3 +219,57 @@ resource "google_service_directory_namespace_iam_binding" "foo" { } `, context) } + +func generateServiceDirectoryNamespaceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + namespace_id := tpgresource.GetResourceNameFromSelfLink(rawState["namespace_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/namespaces/%s", project, location, namespace_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateServiceDirectoryNamespaceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + namespace_id := tpgresource.GetResourceNameFromSelfLink(rawState["namespace_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/namespaces/%s", project, location, namespace_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateServiceDirectoryNamespaceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + namespace_id := tpgresource.GetResourceNameFromSelfLink(rawState["namespace_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/namespaces/%s", project, location, namespace_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/servicedirectory/iam_service_directory_service_generated_test.go b/google/services/servicedirectory/iam_service_directory_service_generated_test.go index 23cf2cfe1b1..fee756bce88 100644 --- a/google/services/servicedirectory/iam_service_directory_service_generated_test.go +++ b/google/services/servicedirectory/iam_service_directory_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -243,3 +244,60 @@ resource "google_service_directory_service_iam_binding" "foo" { } `, context) } + +func generateServiceDirectoryServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + namespace_id := tpgresource.GetResourceNameFromSelfLink(rawState["namespace_id"]) + service_id := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/namespaces/%s/services/%s", project, location, namespace_id, service_id), "", "", rawState["condition.0.title"]), nil + } +} + +func generateServiceDirectoryServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + namespace_id := tpgresource.GetResourceNameFromSelfLink(rawState["namespace_id"]) + service_id := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/namespaces/%s/services/%s", project, location, namespace_id, service_id), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateServiceDirectoryServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + namespace_id := tpgresource.GetResourceNameFromSelfLink(rawState["namespace_id"]) + service_id := tpgresource.GetResourceNameFromSelfLink(rawState["service_id"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/namespaces/%s/services/%s", project, location, namespace_id, service_id), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/servicedirectory/resource_service_directory_endpoint.go b/google/services/servicedirectory/resource_service_directory_endpoint.go index de427b168b2..75c6a5d5823 100644 --- a/google/services/servicedirectory/resource_service_directory_endpoint.go +++ b/google/services/servicedirectory/resource_service_directory_endpoint.go @@ -617,7 +617,7 @@ func expandServiceDirectoryEndpointNetwork(v interface{}, d tpgresource.Terrafor func resourceServiceDirectoryEndpointEncoder(d *schema.ResourceData, meta interface{}, obj map[string]interface{}) (map[string]interface{}, error) { if obj["metadata"] == nil { - return nil, nil + return obj, nil } obj["annotations"] = obj["metadata"].(map[string]string) diff --git a/google/services/servicedirectory/resource_service_directory_endpoint_generated_meta.yaml b/google/services/servicedirectory/resource_service_directory_endpoint_generated_meta.yaml index 9094a70eda1..08ac582ed24 100644 --- a/google/services/servicedirectory/resource_service_directory_endpoint_generated_meta.yaml +++ b/google/services/servicedirectory/resource_service_directory_endpoint_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_service_directory_endpoint' -generation_type: 'mmv1' -source_file: 'products/servicedirectory/Endpoint.yaml' -api_service_name: 'servicedirectory.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Endpoint' +resource: google_service_directory_endpoint +generation_type: mmv1 +source_file: products/servicedirectory/Endpoint.yaml +api_service_name: servicedirectory.googleapis.com +api_version: v1 +api_resource_type_kind: Endpoint fields: - - api_field: 'address' - - field: 'endpoint_id' - provider_only: true - - api_field: 'metadata' - - api_field: 'name' - - api_field: 'network' - - api_field: 'port' - - field: 'service' - provider_only: true + - api_field: address + - field: endpoint_id + provider_only: true + - api_field: metadata + - api_field: name + - api_field: network + - api_field: port + - field: service + provider_only: true diff --git a/google/services/servicedirectory/resource_service_directory_endpoint_test.go b/google/services/servicedirectory/resource_service_directory_endpoint_test.go index 863b64195ea..88b2ad98288 100644 --- a/google/services/servicedirectory/resource_service_directory_endpoint_test.go +++ b/google/services/servicedirectory/resource_service_directory_endpoint_test.go @@ -107,11 +107,6 @@ resource "google_service_directory_endpoint" "example" { endpoint_id = "%s" service = google_service_directory_service.example.id - metadata = { - stage = "prod" - region = "us-central1" - } - address = "1.2.3.4" port = 5353 } diff --git a/google/services/servicedirectory/resource_service_directory_namespace_generated_meta.yaml b/google/services/servicedirectory/resource_service_directory_namespace_generated_meta.yaml index f7a2b98db83..d47edb3532f 100644 --- a/google/services/servicedirectory/resource_service_directory_namespace_generated_meta.yaml +++ b/google/services/servicedirectory/resource_service_directory_namespace_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_service_directory_namespace' -generation_type: 'mmv1' -source_file: 'products/servicedirectory/Namespace.yaml' -api_service_name: 'servicedirectory.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Namespace' +resource: google_service_directory_namespace +generation_type: mmv1 +source_file: products/servicedirectory/Namespace.yaml +api_service_name: servicedirectory.googleapis.com +api_version: v1 +api_resource_type_kind: Namespace fields: - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'namespace_id' - provider_only: true - - field: 'terraform_labels' - provider_only: true + - field: effective_labels + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: namespace_id + provider_only: true + - field: terraform_labels + provider_only: true diff --git a/google/services/servicedirectory/resource_service_directory_service.go b/google/services/servicedirectory/resource_service_directory_service.go index 285ac178ba3..0d14e2b0d47 100644 --- a/google/services/servicedirectory/resource_service_directory_service.go +++ b/google/services/servicedirectory/resource_service_directory_service.go @@ -514,7 +514,7 @@ func expandServiceDirectoryServiceMetadata(v interface{}, d tpgresource.Terrafor func resourceServiceDirectoryServiceEncoder(d *schema.ResourceData, meta interface{}, obj map[string]interface{}) (map[string]interface{}, error) { if obj["metadata"] == nil { - return nil, nil + return obj, nil } obj["annotations"] = obj["metadata"].(map[string]string) diff --git a/google/services/servicedirectory/resource_service_directory_service_generated_meta.yaml b/google/services/servicedirectory/resource_service_directory_service_generated_meta.yaml index c52369bf5a4..12f24abea8d 100644 --- a/google/services/servicedirectory/resource_service_directory_service_generated_meta.yaml +++ b/google/services/servicedirectory/resource_service_directory_service_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_service_directory_service' -generation_type: 'mmv1' -source_file: 'products/servicedirectory/Service.yaml' -api_service_name: 'servicedirectory.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Service' +resource: google_service_directory_service +generation_type: mmv1 +source_file: products/servicedirectory/Service.yaml +api_service_name: servicedirectory.googleapis.com +api_version: v1 +api_resource_type_kind: Service fields: - - api_field: 'metadata' - - api_field: 'name' - - field: 'namespace' - provider_only: true - - field: 'service_id' - provider_only: true + - api_field: metadata + - api_field: name + - field: namespace + provider_only: true + - field: service_id + provider_only: true diff --git a/google/services/servicemanagement/iam_endpoints_service_consumers_generated_test.go b/google/services/servicemanagement/iam_endpoints_service_consumers_generated_test.go index cbebe1cd09f..b4de8ffaf2f 100644 --- a/google/services/servicemanagement/iam_endpoints_service_consumers_generated_test.go +++ b/google/services/servicemanagement/iam_endpoints_service_consumers_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -57,7 +58,7 @@ func TestAccServiceManagementServiceConsumersIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_consumers_iam_binding.foo", - ImportStateId: fmt.Sprintf("services/%s/consumers/%s roles/servicemanagement.serviceController", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"]), context["project_name"]), + ImportStateIdFunc: generateServiceManagementServiceConsumersIAMBindingStateID("google_endpoints_service_consumers_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -67,7 +68,7 @@ func TestAccServiceManagementServiceConsumersIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_consumers_iam_binding.foo", - ImportStateId: fmt.Sprintf("services/%s/consumers/%s roles/servicemanagement.serviceController", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"]), context["project_name"]), + ImportStateIdFunc: generateServiceManagementServiceConsumersIAMBindingStateID("google_endpoints_service_consumers_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -95,7 +96,7 @@ func TestAccServiceManagementServiceConsumersIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_consumers_iam_member.foo", - ImportStateId: fmt.Sprintf("services/%s/consumers/%s roles/servicemanagement.serviceController user:admin@hashicorptest.com", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"]), context["project_name"]), + ImportStateIdFunc: generateServiceManagementServiceConsumersIAMMemberStateID("google_endpoints_service_consumers_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -123,7 +124,7 @@ func TestAccServiceManagementServiceConsumersIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_consumers_iam_policy.foo", - ImportStateId: fmt.Sprintf("services/%s/consumers/%s", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"]), context["project_name"]), + ImportStateIdFunc: generateServiceManagementServiceConsumersIAMPolicyStateID("google_endpoints_service_consumers_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -132,7 +133,7 @@ func TestAccServiceManagementServiceConsumersIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_consumers_iam_policy.foo", - ImportStateId: fmt.Sprintf("services/%s/consumers/%s", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"]), context["project_name"]), + ImportStateIdFunc: generateServiceManagementServiceConsumersIAMPolicyStateID("google_endpoints_service_consumers_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -285,3 +286,54 @@ resource "google_endpoints_service_consumers_iam_binding" "foo" { } `, context) } + +func generateServiceManagementServiceConsumersIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + service_name := tpgresource.GetResourceNameFromSelfLink(rawState["service_name"]) + consumer_project := tpgresource.GetResourceNameFromSelfLink(rawState["consumer_project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("services/%s/consumers/%s", service_name, consumer_project), "", "", rawState["condition.0.title"]), nil + } +} + +func generateServiceManagementServiceConsumersIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + service_name := tpgresource.GetResourceNameFromSelfLink(rawState["service_name"]) + consumer_project := tpgresource.GetResourceNameFromSelfLink(rawState["consumer_project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("services/%s/consumers/%s", service_name, consumer_project), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateServiceManagementServiceConsumersIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + service_name := tpgresource.GetResourceNameFromSelfLink(rawState["service_name"]) + consumer_project := tpgresource.GetResourceNameFromSelfLink(rawState["consumer_project"]) + return acctest.BuildIAMImportId(fmt.Sprintf("services/%s/consumers/%s", service_name, consumer_project), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/servicemanagement/iam_endpoints_service_generated_test.go b/google/services/servicemanagement/iam_endpoints_service_generated_test.go index 994bc975555..3274a560f42 100644 --- a/google/services/servicemanagement/iam_endpoints_service_generated_test.go +++ b/google/services/servicemanagement/iam_endpoints_service_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -56,7 +57,7 @@ func TestAccServiceManagementServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("services/%s roles/viewer", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"])), + ImportStateIdFunc: generateServiceManagementServiceIAMBindingStateID("google_endpoints_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -66,7 +67,7 @@ func TestAccServiceManagementServiceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_iam_binding.foo", - ImportStateId: fmt.Sprintf("services/%s roles/viewer", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"])), + ImportStateIdFunc: generateServiceManagementServiceIAMBindingStateID("google_endpoints_service_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -93,7 +94,7 @@ func TestAccServiceManagementServiceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_iam_member.foo", - ImportStateId: fmt.Sprintf("services/%s roles/viewer user:admin@hashicorptest.com", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"])), + ImportStateIdFunc: generateServiceManagementServiceIAMMemberStateID("google_endpoints_service_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -120,7 +121,7 @@ func TestAccServiceManagementServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("services/%s", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"])), + ImportStateIdFunc: generateServiceManagementServiceIAMPolicyStateID("google_endpoints_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -129,7 +130,7 @@ func TestAccServiceManagementServiceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_endpoints_service_iam_policy.foo", - ImportStateId: fmt.Sprintf("services/%s", fmt.Sprintf("endpoint%s.endpoints.%s.cloud.goog", context["random_suffix"], context["project_name"])), + ImportStateIdFunc: generateServiceManagementServiceIAMPolicyStateID("google_endpoints_service_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -276,3 +277,51 @@ resource "google_endpoints_service_iam_binding" "foo" { } `, context) } + +func generateServiceManagementServiceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + service_name := tpgresource.GetResourceNameFromSelfLink(rawState["service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("services/%s", service_name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateServiceManagementServiceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + service_name := tpgresource.GetResourceNameFromSelfLink(rawState["service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("services/%s", service_name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateServiceManagementServiceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + service_name := tpgresource.GetResourceNameFromSelfLink(rawState["service_name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("services/%s", service_name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/servicenetworking/resource_service_networking_vpc_service_controls_generated_meta.yaml b/google/services/servicenetworking/resource_service_networking_vpc_service_controls_generated_meta.yaml index dcaff6acf03..bba5e3a8c43 100644 --- a/google/services/servicenetworking/resource_service_networking_vpc_service_controls_generated_meta.yaml +++ b/google/services/servicenetworking/resource_service_networking_vpc_service_controls_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_service_networking_vpc_service_controls' -generation_type: 'mmv1' -source_file: 'products/servicenetworking/VPCServiceControls.yaml' -api_service_name: 'servicenetworking.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VpcServiceControls' +resource: google_service_networking_vpc_service_controls +generation_type: mmv1 +source_file: products/servicenetworking/VPCServiceControls.yaml +api_service_name: servicenetworking.googleapis.com +api_version: v1 +api_resource_type_kind: VpcServiceControls fields: - - api_field: 'enabled' - - field: 'network' - provider_only: true - - api_field: 'project' - - field: 'service' - provider_only: true + - api_field: enabled + - field: network + provider_only: true + - api_field: project + - field: service + provider_only: true diff --git a/google/services/siteverification/resource_site_verification_web_resource_generated_meta.yaml b/google/services/siteverification/resource_site_verification_web_resource_generated_meta.yaml index de53b0d3717..dcecda8252b 100644 --- a/google/services/siteverification/resource_site_verification_web_resource_generated_meta.yaml +++ b/google/services/siteverification/resource_site_verification_web_resource_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_site_verification_web_resource' -generation_type: 'mmv1' -source_file: 'products/siteverification/WebResource.yaml' -api_service_name: 'siteverification.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'WebResource' +resource: google_site_verification_web_resource +generation_type: mmv1 +source_file: products/siteverification/WebResource.yaml +api_service_name: siteverification.googleapis.com +api_version: v1 +api_resource_type_kind: WebResource fields: - - api_field: 'owners' - - api_field: 'site.identifier' - - api_field: 'site.type' - - field: 'verification_method' - provider_only: true - - api_field: 'id' - field: 'web_resource_id' + - api_field: owners + - api_field: site.identifier + - api_field: site.type + - field: verification_method + provider_only: true + - api_field: id + field: web_resource_id diff --git a/google/services/sourcerepo/iam_sourcerepo_repository_generated_test.go b/google/services/sourcerepo/iam_sourcerepo_repository_generated_test.go index ddbe2a5bd02..c5d6c6a4928 100644 --- a/google/services/sourcerepo/iam_sourcerepo_repository_generated_test.go +++ b/google/services/sourcerepo/iam_sourcerepo_repository_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccSourceRepoRepositoryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_sourcerepo_repository_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("my/repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSourceRepoRepositoryIAMBindingStateID("google_sourcerepo_repository_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccSourceRepoRepositoryIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_sourcerepo_repository_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer", envvar.GetTestProjectFromEnv(), fmt.Sprintf("my/repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSourceRepoRepositoryIAMBindingStateID("google_sourcerepo_repository_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccSourceRepoRepositoryIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_sourcerepo_repository_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/repos/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), fmt.Sprintf("my/repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSourceRepoRepositoryIAMMemberStateID("google_sourcerepo_repository_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccSourceRepoRepositoryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_sourcerepo_repository_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/repos/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("my/repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSourceRepoRepositoryIAMPolicyStateID("google_sourcerepo_repository_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccSourceRepoRepositoryIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_sourcerepo_repository_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/repos/%s", envvar.GetTestProjectFromEnv(), fmt.Sprintf("my/repository%s", context["random_suffix"])), + ImportStateIdFunc: generateSourceRepoRepositoryIAMPolicyStateID("google_sourcerepo_repository_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -224,3 +225,62 @@ resource "google_sourcerepo_repository_iam_binding" "foo" { } `, context) } + +func generateSourceRepoRepositoryIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + repository := repositoryShortName(rawState["repository"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/repos/%s", project, repository), "", "", rawState["condition.0.title"]), nil + } +} + +func generateSourceRepoRepositoryIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + repository := repositoryShortName(rawState["repository"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/repos/%s", project, repository), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateSourceRepoRepositoryIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + repository := repositoryShortName(rawState["repository"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/repos/%s", project, repository), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} + +func repositoryShortName(repository string) string { + repositoryParts := strings.SplitN(repository, "/repos/", 2) + if len(repositoryParts) == 2 { + return repositoryParts[1] + } + return repository +} diff --git a/google/services/sourcerepo/resource_sourcerepo_repository_generated_meta.yaml b/google/services/sourcerepo/resource_sourcerepo_repository_generated_meta.yaml index 35199c171ce..16c89e1ade2 100644 --- a/google/services/sourcerepo/resource_sourcerepo_repository_generated_meta.yaml +++ b/google/services/sourcerepo/resource_sourcerepo_repository_generated_meta.yaml @@ -1,12 +1,16 @@ -resource: 'google_sourcerepo_repository' -generation_type: 'mmv1' -source_file: 'products/sourcerepo/Repository.yaml' -api_service_name: 'sourcerepo.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Repo' +resource: google_sourcerepo_repository +generation_type: mmv1 +source_file: products/sourcerepo/Repository.yaml +api_service_name: sourcerepo.googleapis.com +api_version: v1 +api_resource_type_kind: Repo fields: - - api_field: 'name' - - api_field: 'pubsubConfigs.pubsubConfig.messageFormat' - - api_field: 'pubsubConfigs.pubsubConfig.serviceAccountEmail' - - api_field: 'size' - - api_field: 'url' + - api_field: name + - api_field: pubsubConfigs.key + field: pubsub_configs.topic + - api_field: pubsubConfigs.value.messageFormat + field: pubsub_configs.message_format + - api_field: pubsubConfigs.value.serviceAccountEmail + field: pubsub_configs.service_account_email + - api_field: size + - api_field: url diff --git a/google/services/spanner/resource_spanner_backup_schedule_generated_meta.yaml b/google/services/spanner/resource_spanner_backup_schedule_generated_meta.yaml index d7d783ac452..6dd4000529c 100644 --- a/google/services/spanner/resource_spanner_backup_schedule_generated_meta.yaml +++ b/google/services/spanner/resource_spanner_backup_schedule_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_spanner_backup_schedule' -generation_type: 'mmv1' -source_file: 'products/spanner/BackupSchedule.yaml' -api_service_name: 'spanner.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BackupSchedule' +resource: google_spanner_backup_schedule +generation_type: mmv1 +source_file: products/spanner/BackupSchedule.yaml +api_service_name: spanner.googleapis.com +api_version: v1 +api_resource_type_kind: BackupSchedule fields: - - field: 'database' - provider_only: true - - api_field: 'encryptionConfig.encryptionType' - - api_field: 'encryptionConfig.kmsKeyName' - - api_field: 'encryptionConfig.kmsKeyNames' - - api_field: 'fullBackupSpec' - - api_field: 'incrementalBackupSpec' - - field: 'instance' - provider_only: true - - api_field: 'name' - - api_field: 'retentionDuration' - - api_field: 'spec.cronSpec.text' + - field: database + provider_only: true + - api_field: encryptionConfig.encryptionType + - api_field: encryptionConfig.kmsKeyName + - api_field: encryptionConfig.kmsKeyNames + - api_field: fullBackupSpec + - api_field: incrementalBackupSpec + - field: instance + provider_only: true + - api_field: name + - api_field: retentionDuration + - api_field: spec.cronSpec.text diff --git a/google/services/spanner/resource_spanner_database_generated_meta.yaml b/google/services/spanner/resource_spanner_database_generated_meta.yaml index b23d562ab80..00c917d96a1 100644 --- a/google/services/spanner/resource_spanner_database_generated_meta.yaml +++ b/google/services/spanner/resource_spanner_database_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_spanner_database' -generation_type: 'mmv1' -source_file: 'products/spanner/Database.yaml' -api_service_name: 'spanner.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Database' -cai_asset_name_format: '//spanner.googleapis.com/projects/{{project}}/instances/{{instance}}/databases/{{name}}' +resource: google_spanner_database +generation_type: mmv1 +source_file: products/spanner/Database.yaml +api_service_name: spanner.googleapis.com +api_version: v1 +api_resource_type_kind: Database +cai_asset_name_format: //spanner.googleapis.com/projects/{{project}}/instances/{{instance}}/databases/{{name}} fields: - - api_field: 'databaseDialect' - - api_field: 'extraStatements' - field: 'ddl' - - field: 'default_time_zone' - provider_only: true - - field: 'deletion_protection' - provider_only: true - - api_field: 'enableDropProtection' - - api_field: 'encryptionConfig.kmsKeyName' - - api_field: 'encryptionConfig.kmsKeyNames' - - api_field: 'instance' - - api_field: 'name' - - api_field: 'state' - - api_field: 'versionRetentionPeriod' + - api_field: databaseDialect + - api_field: extraStatements + field: ddl + - field: default_time_zone + provider_only: true + - field: deletion_protection + provider_only: true + - api_field: enableDropProtection + - api_field: encryptionConfig.kmsKeyName + - api_field: encryptionConfig.kmsKeyNames + - api_field: instance + - api_field: name + - api_field: state + - api_field: versionRetentionPeriod diff --git a/google/services/spanner/resource_spanner_instance.go b/google/services/spanner/resource_spanner_instance.go index 27e0c02066f..67f2c4a36a0 100644 --- a/google/services/spanner/resource_spanner_instance.go +++ b/google/services/spanner/resource_spanner_instance.go @@ -333,6 +333,14 @@ This number is on a scale from 0 (no utilization) to 100 (full utilization)..`, should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization).`, }, + "total_cpu_utilization_percent": { + Type: schema.TypeInt, + Optional: true, + Description: `The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. +This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. +If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. +The value should be higher than high_priority_cpu_utilization_percent if present.`, + }, }, }, }, @@ -1160,6 +1168,8 @@ func flattenSpannerInstanceAutoscalingConfigAutoscalingTargets(v interface{}, d flattenSpannerInstanceAutoscalingConfigAutoscalingTargetsHighPriorityCpuUtilizationPercent(original["highPriorityCpuUtilizationPercent"], d, config) transformed["storage_utilization_percent"] = flattenSpannerInstanceAutoscalingConfigAutoscalingTargetsStorageUtilizationPercent(original["storageUtilizationPercent"], d, config) + transformed["total_cpu_utilization_percent"] = + flattenSpannerInstanceAutoscalingConfigAutoscalingTargetsTotalCpuUtilizationPercent(original["totalCpuUtilizationPercent"], d, config) return []interface{}{transformed} } func flattenSpannerInstanceAutoscalingConfigAutoscalingTargetsHighPriorityCpuUtilizationPercent(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { @@ -1196,6 +1206,23 @@ func flattenSpannerInstanceAutoscalingConfigAutoscalingTargetsStorageUtilization return v // let terraform core handle it otherwise } +func flattenSpannerInstanceAutoscalingConfigAutoscalingTargetsTotalCpuUtilizationPercent(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + func flattenSpannerInstanceAutoscalingConfigAsymmetricAutoscalingOptions(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v @@ -1476,6 +1503,13 @@ func expandSpannerInstanceAutoscalingConfigAutoscalingTargets(v interface{}, d t transformed["storageUtilizationPercent"] = transformedStorageUtilizationPercent } + transformedTotalCpuUtilizationPercent, err := expandSpannerInstanceAutoscalingConfigAutoscalingTargetsTotalCpuUtilizationPercent(original["total_cpu_utilization_percent"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedTotalCpuUtilizationPercent); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["totalCpuUtilizationPercent"] = transformedTotalCpuUtilizationPercent + } + return transformed, nil } @@ -1487,6 +1521,10 @@ func expandSpannerInstanceAutoscalingConfigAutoscalingTargetsStorageUtilizationP return v, nil } +func expandSpannerInstanceAutoscalingConfigAutoscalingTargetsTotalCpuUtilizationPercent(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandSpannerInstanceAutoscalingConfigAsymmetricAutoscalingOptions(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { if v == nil { return nil, nil @@ -1709,6 +1747,9 @@ func resourceSpannerInstanceUpdateEncoder(d *schema.ResourceData, meta interface if d.HasChange("autoscaling_config.0.autoscaling_targets.0.storage_utilization_percent") { updateMask = append(updateMask, "autoscalingConfig.autoscalingTargets.storageUtilizationPercent") } + if d.HasChange("autoscaling_config.0.autoscaling_targets.0.total_cpu_utilization_percent") { + updateMask = append(updateMask, "autoscalingConfig.autoscalingTargets.totalCpuUtilizationPercent") + } if d.HasChange("autoscaling_config.0.asymmetric_autoscaling_options") { updateMask = append(updateMask, "autoscalingConfig.asymmetricAutoscalingOptions") } diff --git a/google/services/spanner/resource_spanner_instance_config_generated_meta.yaml b/google/services/spanner/resource_spanner_instance_config_generated_meta.yaml index 74c123e6a64..58112476e29 100644 --- a/google/services/spanner/resource_spanner_instance_config_generated_meta.yaml +++ b/google/services/spanner/resource_spanner_instance_config_generated_meta.yaml @@ -1,19 +1,19 @@ -resource: 'google_spanner_instance_config' -generation_type: 'mmv1' -source_file: 'products/spanner/InstanceConfig.yaml' -api_service_name: 'spanner.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstanceConfig' +resource: google_spanner_instance_config +generation_type: mmv1 +source_file: products/spanner/InstanceConfig.yaml +api_service_name: spanner.googleapis.com +api_version: v1 +api_resource_type_kind: InstanceConfig fields: - - api_field: 'baseConfig' - - api_field: 'configType' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'labels' - - api_field: 'name' - - api_field: 'replicas.defaultLeaderLocation' - - api_field: 'replicas.location' - - api_field: 'replicas.type' - - field: 'terraform_labels' - provider_only: true + - api_field: baseConfig + - api_field: configType + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: labels + - api_field: name + - api_field: replicas.defaultLeaderLocation + - api_field: replicas.location + - api_field: replicas.type + - field: terraform_labels + provider_only: true diff --git a/google/services/spanner/resource_spanner_instance_generated_meta.yaml b/google/services/spanner/resource_spanner_instance_generated_meta.yaml index 13c6ace764c..571d2bac223 100644 --- a/google/services/spanner/resource_spanner_instance_generated_meta.yaml +++ b/google/services/spanner/resource_spanner_instance_generated_meta.yaml @@ -1,34 +1,35 @@ -resource: 'google_spanner_instance' -generation_type: 'mmv1' -source_file: 'products/spanner/Instance.yaml' -api_service_name: 'spanner.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Instance' -cai_asset_name_format: '//spanner.googleapis.com/projects/{{project}}/instances/{{name}}' +resource: google_spanner_instance +generation_type: mmv1 +source_file: products/spanner/Instance.yaml +api_service_name: spanner.googleapis.com +api_version: v1 +api_resource_type_kind: Instance +cai_asset_name_format: //spanner.googleapis.com/projects/{{project}}/instances/{{name}} fields: - - api_field: 'autoscalingConfig.asymmetricAutoscalingOptions.overrides.autoscalingLimits.maxNodes' - - api_field: 'autoscalingConfig.asymmetricAutoscalingOptions.overrides.autoscalingLimits.minNodes' - - api_field: 'autoscalingConfig.asymmetricAutoscalingOptions.replicaSelection.location' - - api_field: 'autoscalingConfig.autoscalingLimits.maxNodes' - - api_field: 'autoscalingConfig.autoscalingLimits.maxProcessingUnits' - - api_field: 'autoscalingConfig.autoscalingLimits.minNodes' - - api_field: 'autoscalingConfig.autoscalingLimits.minProcessingUnits' - - api_field: 'autoscalingConfig.autoscalingTargets.highPriorityCpuUtilizationPercent' - - api_field: 'autoscalingConfig.autoscalingTargets.storageUtilizationPercent' - - api_field: 'config' - - api_field: 'defaultBackupScheduleType' - - api_field: 'displayName' - - api_field: 'edition' - - field: 'effective_labels' - provider_only: true - - field: 'force_destroy' - provider_only: true - - api_field: 'instanceType' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'nodeCount' - field: 'num_nodes' - - api_field: 'processingUnits' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true + - api_field: autoscalingConfig.asymmetricAutoscalingOptions.overrides.autoscalingLimits.maxNodes + - api_field: autoscalingConfig.asymmetricAutoscalingOptions.overrides.autoscalingLimits.minNodes + - api_field: autoscalingConfig.asymmetricAutoscalingOptions.replicaSelection.location + - api_field: autoscalingConfig.autoscalingLimits.maxNodes + - api_field: autoscalingConfig.autoscalingLimits.maxProcessingUnits + - api_field: autoscalingConfig.autoscalingLimits.minNodes + - api_field: autoscalingConfig.autoscalingLimits.minProcessingUnits + - api_field: autoscalingConfig.autoscalingTargets.highPriorityCpuUtilizationPercent + - api_field: autoscalingConfig.autoscalingTargets.storageUtilizationPercent + - api_field: autoscalingConfig.autoscalingTargets.totalCpuUtilizationPercent + - api_field: config + - api_field: defaultBackupScheduleType + - api_field: displayName + - api_field: edition + - field: effective_labels + provider_only: true + - field: force_destroy + provider_only: true + - api_field: instanceType + - api_field: labels + - api_field: name + - api_field: nodeCount + field: num_nodes + - api_field: processingUnits + - api_field: state + - field: terraform_labels + provider_only: true diff --git a/google/services/spanner/resource_spanner_instance_partition_generated_meta.yaml b/google/services/spanner/resource_spanner_instance_partition_generated_meta.yaml index 44090e29f16..5113d5b4958 100644 --- a/google/services/spanner/resource_spanner_instance_partition_generated_meta.yaml +++ b/google/services/spanner/resource_spanner_instance_partition_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_spanner_instance_partition' -generation_type: 'mmv1' -source_file: 'products/spanner/InstancePartition.yaml' -api_service_name: 'spanner.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'InstancePartition' +resource: google_spanner_instance_partition +generation_type: mmv1 +source_file: products/spanner/InstancePartition.yaml +api_service_name: spanner.googleapis.com +api_version: v1 +api_resource_type_kind: InstancePartition fields: - - api_field: 'config' - - api_field: 'displayName' - - field: 'instance' - provider_only: true - - api_field: 'name' - - api_field: 'nodeCount' - - api_field: 'processingUnits' - - api_field: 'state' + - api_field: config + - api_field: displayName + - field: instance + provider_only: true + - api_field: name + - api_field: nodeCount + - api_field: processingUnits + - api_field: state diff --git a/google/services/spanner/resource_spanner_instance_test.go b/google/services/spanner/resource_spanner_instance_test.go index d346d43c47f..b0cc6dfbae4 100644 --- a/google/services/spanner/resource_spanner_instance_test.go +++ b/google/services/spanner/resource_spanner_instance_test.go @@ -559,6 +559,45 @@ func TestAccSpannerInstance_freeInstanceBasicUpdate(t *testing.T) { }) } +func TestAccSpannerInstance_autoscalingWithTotalCPUUtilizationPercent(t *testing.T) { + t.Parallel() + + displayName := fmt.Sprintf("tf-test-%s", acctest.RandString(t, 10)) + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckSpannerInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccSpannerInstance_autoscalingWithTotalCPUUtilizationPercent(displayName, 2000, 4000, 65, 85, 95), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("google_spanner_instance.test", "state"), + resource.TestCheckResourceAttr("google_spanner_instance.test", "autoscaling_config.0.autoscaling_targets.0.total_cpu_utilization_percent", "85"), + ), + }, + { + ResourceName: "google_spanner_instance.test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "terraform_labels"}, + }, + { + Config: testAccSpannerInstance_autoscalingWithTotalCPUUtilizationPercent(displayName, 3000, 5000, 75, 90, 95), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("google_spanner_instance.test", "state"), + resource.TestCheckResourceAttr("google_spanner_instance.test", "autoscaling_config.0.autoscaling_targets.0.total_cpu_utilization_percent", "90"), + ), + }, + { + ResourceName: "google_spanner_instance.test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"labels", "terraform_labels"}, + }, + }, + }) +} + func testAccSpannerInstance_basic(name string) string { return fmt.Sprintf(` resource "google_spanner_instance" "basic" { @@ -717,6 +756,7 @@ resource "google_spanner_instance" "basic" { } autoscaling_targets { high_priority_cpu_utilization_percent = %v + total_cpu_utilization_percent = 85 storage_utilization_percent = %v } } @@ -921,3 +961,25 @@ resource "google_spanner_instance" "main" { } `, context) } + +func testAccSpannerInstance_autoscalingWithTotalCPUUtilizationPercent(name string, minProcessingUnits, maxProcessingUnits, highPriorityCPU, totalCPU, storageUtilization int) string { + return fmt.Sprintf(` +resource "google_spanner_instance" "test" { + name = "%s" + config = "regional-us-central1" + display_name = "%s" + autoscaling_config { + autoscaling_limits { + max_processing_units = %d + min_processing_units = %d + } + autoscaling_targets { + high_priority_cpu_utilization_percent = %d + total_cpu_utilization_percent = %d + storage_utilization_percent = %d + } + } + edition = "ENTERPRISE" +} +`, name, name, maxProcessingUnits, minProcessingUnits, highPriorityCPU, totalCPU, storageUtilization) +} diff --git a/google/services/sql/data_source_sql_database_instances.go b/google/services/sql/data_source_sql_database_instances.go index d23b7a2baf6..3af4392d32f 100644 --- a/google/services/sql/data_source_sql_database_instances.go +++ b/google/services/sql/data_source_sql_database_instances.go @@ -195,6 +195,7 @@ func flattenDatasourceGoogleDatabaseInstancesList(fetchedInstances []*sqladmin.D instance["master_instance_name"] = strings.TrimPrefix(rawInstance.MasterInstanceName, project+":") instance["project"] = project instance["self_link"] = rawInstance.SelfLink + instance["psc_service_attachment_link"] = rawInstance.PscServiceAttachmentLink instances = append(instances, instance) } diff --git a/google/services/sql/resource_sql_database_generated_meta.yaml b/google/services/sql/resource_sql_database_generated_meta.yaml index aac54f30842..9c8a2f2716e 100644 --- a/google/services/sql/resource_sql_database_generated_meta.yaml +++ b/google/services/sql/resource_sql_database_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_sql_database' -generation_type: 'mmv1' -source_file: 'products/sql/Database.yaml' -api_service_name: 'sqladmin.googleapis.com' -api_version: 'v1beta4' -api_resource_type_kind: 'Database' +resource: google_sql_database +generation_type: mmv1 +source_file: products/sql/Database.yaml +api_service_name: sqladmin.googleapis.com +api_version: v1beta4 +api_resource_type_kind: Database fields: - - api_field: 'charset' - - api_field: 'collation' - - field: 'deletion_policy' - provider_only: true - - api_field: 'instance' - - api_field: 'name' - - api_field: 'selfLink' + - api_field: charset + - api_field: collation + - field: deletion_policy + provider_only: true + - api_field: instance + - api_field: name + - api_field: selfLink diff --git a/google/services/sql/resource_sql_database_instance.go b/google/services/sql/resource_sql_database_instance.go index 5676a2c09fc..6ce5089ce8c 100644 --- a/google/services/sql/resource_sql_database_instance.go +++ b/google/services/sql/resource_sql_database_instance.go @@ -86,6 +86,7 @@ var ( "settings.0.backup_configuration.0.point_in_time_recovery_enabled", "settings.0.backup_configuration.0.backup_retention_settings", "settings.0.backup_configuration.0.transaction_log_retention_days", + "settings.0.backup_configuration.0.backup_tier", } connectionPoolConfigKeys = []string{ @@ -426,24 +427,27 @@ API (for read pools, effective_availability_type may differ from availability_ty Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "binary_log_enabled": { - Type: schema.TypeBool, - Optional: true, - AtLeastOneOf: backupConfigurationKeys, - Description: `True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL.`, + Type: schema.TypeBool, + Optional: true, + AtLeastOneOf: backupConfigurationKeys, + DiffSuppressFunc: EnhancedBackupManagerDiffSuppressFunc, + Description: `True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL.`, }, "enabled": { - Type: schema.TypeBool, - Optional: true, - AtLeastOneOf: backupConfigurationKeys, - Description: `True if backup configuration is enabled.`, + Type: schema.TypeBool, + Optional: true, + AtLeastOneOf: backupConfigurationKeys, + DiffSuppressFunc: EnhancedBackupManagerDiffSuppressFunc, + Description: `True if backup configuration is enabled.`, }, "start_time": { Type: schema.TypeString, Optional: true, // start_time is randomly assigned if not set - Computed: true, - AtLeastOneOf: backupConfigurationKeys, - Description: `HH:MM format time indicating when backup configuration starts.`, + Computed: true, + AtLeastOneOf: backupConfigurationKeys, + DiffSuppressFunc: EnhancedBackupManagerDiffSuppressFunc, + Description: `HH:MM format time indicating when backup configuration starts.`, }, "location": { Type: schema.TypeString, @@ -452,24 +456,27 @@ API (for read pools, effective_availability_type may differ from availability_ty Description: `Location of the backup configuration.`, }, "point_in_time_recovery_enabled": { - Type: schema.TypeBool, - Optional: true, - AtLeastOneOf: backupConfigurationKeys, - Description: `True if Point-in-time recovery is enabled.`, + Type: schema.TypeBool, + Optional: true, + AtLeastOneOf: backupConfigurationKeys, + DiffSuppressFunc: EnhancedBackupManagerDiffSuppressFunc, + Description: `True if Point-in-time recovery is enabled.`, }, "transaction_log_retention_days": { - Type: schema.TypeInt, - Computed: true, - Optional: true, - AtLeastOneOf: backupConfigurationKeys, - Description: `The number of days of transaction logs we retain for point in time restore, from 1-7. (For PostgreSQL Enterprise Plus instances, from 1 to 35.)`, + Type: schema.TypeInt, + Computed: true, + Optional: true, + AtLeastOneOf: backupConfigurationKeys, + DiffSuppressFunc: EnhancedBackupManagerDiffSuppressFunc, + Description: `The number of days of transaction logs we retain for point in time restore, from 1-7. (For PostgreSQL Enterprise Plus instances, from 1 to 35.)`, }, "backup_retention_settings": { - Type: schema.TypeList, - Optional: true, - AtLeastOneOf: backupConfigurationKeys, - Computed: true, - MaxItems: 1, + Type: schema.TypeList, + Optional: true, + AtLeastOneOf: backupConfigurationKeys, + Computed: true, + DiffSuppressFunc: EnhancedBackupManagerDiffSuppressFunc, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "retained_backups": { @@ -486,6 +493,11 @@ API (for read pools, effective_availability_type may differ from availability_ty }, }, }, + "backup_tier": { + Type: schema.TypeString, + Computed: true, + Description: `Backup tier that manages the backups for the instance.`, + }, }, }, }, @@ -1212,6 +1224,7 @@ API (for read pools, effective_availability_type may differ from availability_ty "psa_write_endpoint": { Type: schema.TypeString, Optional: true, + Computed: true, Description: fmt.Sprintf(`If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted.`), }, "failover_dr_replica_name": { @@ -1227,7 +1240,7 @@ API (for read pools, effective_availability_type may differ from availability_ty }, }, }, - Description: "A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created.", + Description: "A primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set if the primary has psa_write_endpoint set or both the primary and replica are created.", }, "server_ca_cert": { Type: schema.TypeList, @@ -1529,7 +1542,6 @@ func resourceSqlDatabaseInstanceCreate(d *schema.ResourceData, meta interface{}) if _, ok := d.GetOk("node_count"); ok { instance.NodeCount = int64(d.Get("node_count").(int)) } - if _, ok := d.GetOk("root_password_wo_version"); ok { instance.RootPassword = tpgresource.GetRawConfigAttributeAsString(d, "root_password_wo") } else if _, ok := d.GetOk("root_password"); ok { @@ -1978,6 +1990,7 @@ func expandBackupConfiguration(configured []interface{}) *sqladmin.BackupConfigu Location: _backupConfiguration["location"].(string), TransactionLogRetentionDays: int64(_backupConfiguration["transaction_log_retention_days"].(int)), PointInTimeRecoveryEnabled: _backupConfiguration["point_in_time_recovery_enabled"].(bool), + BackupTier: _backupConfiguration["backup_tier"].(string), ForceSendFields: []string{"BinaryLogEnabled", "Enabled", "PointInTimeRecoveryEnabled"}, } } @@ -2179,6 +2192,9 @@ func resourceSqlDatabaseInstanceRead(d *schema.ResourceData, meta interface{}) e if err := d.Set("maintenance_version", instance.MaintenanceVersion); err != nil { return fmt.Errorf("Error setting maintenance_version: %s", err) } + if err := d.Set("psc_service_attachment_link", instance.PscServiceAttachmentLink); err != nil { + return fmt.Errorf("Error setting psc_service_attachment_link: %s", err) + } if err := d.Set("available_maintenance_versions", instance.AvailableMaintenanceVersions); err != nil { return fmt.Errorf("Error setting available_maintenance_version: %s", err) } @@ -2566,15 +2582,31 @@ func resourceSqlDatabaseInstanceUpdate(d *schema.ResourceData, meta interface{}) instance.NodeCount = int64(d.Get("node_count").(int)) } + if _, ok := d.GetOk("psc_service_attachment_link"); ok { + instance.PscServiceAttachmentLink = d.Get("psc_service_attachment_link").(string) + } + // Database Version is required for all calls with Google ML integration enabled or it will be rejected by the API. if d.Get("settings.0.enable_google_ml_integration").(bool) || len(_settings["connection_pool_config"].(*schema.Set).List()) > 0 { instance.DatabaseVersion = databaseVersion } failoverDrReplicaName := d.Get("replication_cluster.0.failover_dr_replica_name").(string) - if failoverDrReplicaName != "" { - instance.ReplicationCluster = &sqladmin.ReplicationCluster{ - FailoverDrReplicaName: failoverDrReplicaName, + psaWriteEndpoint := d.Get("replication_cluster.0.psa_write_endpoint").(string) + if failoverDrReplicaName != "" || psaWriteEndpoint != "" { + if failoverDrReplicaName != "" && psaWriteEndpoint != "" { + instance.ReplicationCluster = &sqladmin.ReplicationCluster{ + FailoverDrReplicaName: failoverDrReplicaName, + PsaWriteEndpoint: psaWriteEndpoint, + } + } else if failoverDrReplicaName != "" { + instance.ReplicationCluster = &sqladmin.ReplicationCluster{ + FailoverDrReplicaName: failoverDrReplicaName, + } + } else { + instance.ReplicationCluster = &sqladmin.ReplicationCluster{ + PsaWriteEndpoint: psaWriteEndpoint, + } } } @@ -2650,6 +2682,25 @@ func maintenanceVersionDiffSuppress(_, old, new string, _ *schema.ResourceData) } } +// enhancedBackupManagerDiffSuppressFunc suppresses diff changes to settings.backup_configuration +// when the SQL instance is managed by Google Cloud Backup and Disaster Recovery (DR) Service. +func EnhancedBackupManagerDiffSuppressFunc(k, old, new string, d *schema.ResourceData) bool { + // If the API marks this instance as ENHANCED-managed, suppress diffs for backup config fields. + tier, _ := d.Get("settings.0.backup_configuration.0.backup_tier").(string) + if tier == "" { + return false + } + if strings.EqualFold(tier, "ENHANCED") { + log.Printf( + "[INFO] Instance %s is managed by Google Cloud Backup and Disaster Recovery (BackupDR). "+ + "Terraform will not manage the '%s' field. "+ + "Any changes to this field in your Terraform configuration will be ignored.", d.Get("name"), k, + ) + return true + } + return false +} + func databaseVersionDiffSuppress(_, oldVersion, newVersion string, _ *schema.ResourceData) bool { // Suppress diff when newVersion is MYSQL_8_0 and oldVersion is >= MYSQL_8_0_35 for MySQL version auto-upgrade cases. if newVersion == "MYSQL_8_0" && strings.HasPrefix(oldVersion, "MYSQL_8_0_") { @@ -2882,6 +2933,7 @@ func flattenBackupConfiguration(backupConfiguration *sqladmin.BackupConfiguratio "point_in_time_recovery_enabled": backupConfiguration.PointInTimeRecoveryEnabled, "backup_retention_settings": flattenBackupRetentionSettings(backupConfiguration.BackupRetentionSettings), "transaction_log_retention_days": backupConfiguration.TransactionLogRetentionDays, + "backup_tier": backupConfiguration.BackupTier, } return []map[string]interface{}{data} diff --git a/google/services/sql/resource_sql_database_instance_meta.yaml b/google/services/sql/resource_sql_database_instance_meta.yaml index 63a191c1e17..826d5143b73 100644 --- a/google/services/sql/resource_sql_database_instance_meta.yaml +++ b/google/services/sql/resource_sql_database_instance_meta.yaml @@ -79,6 +79,10 @@ fields: - field: 'restore_backup_context.instance_id' - field: 'restore_backup_context.project' - api_field: 'rootPassword' + - api_field: 'rootPassword' + field: 'root_password_wo' + - field: 'root_password_wo_version' + provider_only: true - api_field: 'selfLink' - api_field: 'serverCaCert.cert' - api_field: 'serverCaCert.commonName' @@ -94,6 +98,7 @@ fields: field: 'settings.effective_availability_type' - api_field: 'settings.backupConfiguration.backupRetentionSettings.retainedBackups' - api_field: 'settings.backupConfiguration.backupRetentionSettings.retentionUnit' + - api_field: 'settings.backupConfiguration.backupTier' - api_field: 'settings.backupConfiguration.binaryLogEnabled' - api_field: 'settings.backupConfiguration.enabled' - api_field: 'settings.backupConfiguration.location' diff --git a/google/services/sql/resource_sql_database_instance_test.go b/google/services/sql/resource_sql_database_instance_test.go index f1b6857a39a..af5224dbebb 100644 --- a/google/services/sql/resource_sql_database_instance_test.go +++ b/google/services/sql/resource_sql_database_instance_test.go @@ -28,6 +28,7 @@ import ( "github.com/hashicorp/terraform-provider-google/google/envvar" "github.com/hashicorp/terraform-provider-google/google/services/sql" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-testing/helper/resource" "github.com/hashicorp/terraform-plugin-testing/terraform" sqladmin "google.golang.org/api/sqladmin/v1beta4" @@ -2677,6 +2678,10 @@ func TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate(t *testing.T) { func TestAccSqlDatabaseInstance_activationPolicy(t *testing.T) { t.Parallel() + // Skip in VCR until the test issue is resolved + // https://github.com/hashicorp/terraform-provider-google/issues/24593 + acctest.SkipIfVcr(t) + instanceName := "tf-test-" + acctest.RandString(t, 10) acctest.VcrTest(t, resource.TestCase{ @@ -3036,6 +3041,84 @@ func TestAccSqlDatabaseInstance_SwitchoverSuccess(t *testing.T) { }) } +func TestAccSqlDatabaseInstance_MysqlEplusWithFailoverReplicaSetupWithPrivateNetwork(t *testing.T) { + t.Parallel() + + primaryName := "tf-test-mysql-primary-" + acctest.RandString(t, 10) + replicaName := "tf-test-mysql-replica-" + acctest.RandString(t, 10) + networkName := acctest.BootstrapSharedServiceNetworkingConnection(t, "endpoint") + projectId := envvar.GetTestProjectFromEnv() + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testGoogleSqlDatabaseInstance_mySqlEplusPrimaryReplicaSetupWithPrivateNetwork(projectId, primaryName, replicaName, networkName, "MYSQL_8_0"), + Check: resource.ComposeTestCheckFunc(verifyCreateOperationOnEplusWithPrivateNetwork("google_sql_database_instance.primary")), + }, + { + ResourceName: "google_sql_database_instance.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateIdPrefix: fmt.Sprintf("%s/", projectId), + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + { + ResourceName: "google_sql_database_instance.replica", + ImportState: true, + ImportStateVerify: true, + ImportStateIdPrefix: fmt.Sprintf("%s/", projectId), + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + { + Config: testGoogleSqlDatabaseInstance_setMySqlFailoverReplicaEplusWithPrivateNetwork(projectId, primaryName, replicaName, networkName, "MYSQL_8_0"), + Check: resource.ComposeTestCheckFunc(verifyCreateOperationOnEplusWithPrivateNetwork("google_sql_database_instance.primary")), + }, + }, + }) +} + +func TestAccSqlDatabaseInstance_PostgresEplusWithFailoverReplicaSetupWithPrivateNetwork(t *testing.T) { + t.Parallel() + + primaryName := "tf-test-postgres-primary-" + acctest.RandString(t, 10) + replicaName := "tf-test-postgres-replica-" + acctest.RandString(t, 10) + networkName := acctest.BootstrapSharedServiceNetworkingConnection(t, "endpoint") + projectId := envvar.GetTestProjectFromEnv() + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testGoogleSqlDatabaseInstance_postgresEplusPrimaryReplicaSetupWithPrivateNetwork(projectId, primaryName, replicaName, networkName, "POSTGRES_12"), + Check: resource.ComposeTestCheckFunc(verifyCreateOperationOnEplusWithPrivateNetwork("google_sql_database_instance.primary")), + }, + { + ResourceName: "google_sql_database_instance.primary", + ImportState: true, + ImportStateVerify: true, + ImportStateIdPrefix: fmt.Sprintf("%s/", projectId), + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + { + ResourceName: "google_sql_database_instance.replica", + ImportState: true, + ImportStateVerify: true, + ImportStateIdPrefix: fmt.Sprintf("%s/", projectId), + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + { + Config: testGoogleSqlDatabaseInstance_setPostgresFailoverReplicaEplusWithPrivateNetwork(projectId, primaryName, replicaName, networkName, "POSTGRES_12"), + Check: resource.ComposeTestCheckFunc(verifyCreateOperationOnEplusWithPrivateNetwork("google_sql_database_instance.primary")), + }, + }, + }) +} + func TestAccSqlDatabaseInstance_MysqlEplusWithPrivateNetwork(t *testing.T) { t.Parallel() @@ -3843,57 +3926,517 @@ func TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithoutDiskSize(t *testing.T) }) } -func TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize(t *testing.T) { - t.Parallel() +func TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize(t *testing.T) { + t.Parallel() + + project := envvar.GetTestProjectFromEnv() + databaseName := "tf-test-" + acctest.RandString(t, 10) + + trueVar := true + falseVar := false + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + // Create DB with disk size 12gb with auto resize enabled + Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 12, 100, nil, false, false), + // Add additional 2gb outside of TF to simulate increase in disk size + Check: testGoogleSqlDatabaseInstanceResizeDisk(t, databaseName, 2), + }, + { + // Disk size is now 14gb - requested (original value) 12gb and auto resize enable - should not trigger resize, no errors. + Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 12, 101, nil, false, false), + Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 14), + }, + { + // Disk size is now 14gb - requested 13gb in configuration, still less - should not trigger resize, no errors. + Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 13, 102, &trueVar, false, false), + Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 14), + }, + { + // Disk size is now 14gb - requested 15gb in configuration, that's an additional increase should trigger resize to 15gb. + Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 15, 103, nil, false, false), + Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 15), + }, + { + // Disk size is now 15gb - requested 14gb, but disabled auto resize - should error because it can't be deleted for replacement. + Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 14, 104, &falseVar, false, false), + ExpectError: regexp.MustCompile("Instance cannot be destroyed"), + }, + { + // Disk size is now 15gb - requested 14gb, but ignore changes is set - so should ignore the configuration change. + Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 14, 105, &falseVar, true, false), + Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 15), + }, + { + // Allow destroy + Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 14, 105, &falseVar, true, true), + }, + }, + }) +} + +func TestEnhancedBackupManagerDiffSuppressFunc(t *testing.T) { + cases := map[string]struct { + key string + old string + new string + backupTier string + expectSuppress bool + description string + }{ + "suppress enabled diff when backup tier is enhanced": { + key: "settings.0.backup_configuration.0.enabled", + old: "true", + new: "false", + backupTier: "ENHANCED", + expectSuppress: true, + description: "enabled should be suppressed when ENHANCED", + }, + "suppress start_time diff when backup tier is enhanced": { + key: "settings.0.backup_configuration.0.start_time", + old: "03:00", + new: "05:00", + backupTier: "ENHANCED", + expectSuppress: true, + description: "start_time should be suppressed when ENHANCED", + }, + "suppress binary_log_enabled diff when backup tier is enhanced": { + key: "settings.0.backup_configuration.0.binary_log_enabled", + old: "true", + new: "false", + backupTier: "ENHANCED", + expectSuppress: true, + description: "binary_log_enabled should be suppressed when ENHANCED", + }, + "suppress point_in_time_recovery_enabled diff when backup tier is enhanced": { + key: "settings.0.backup_configuration.0.point_in_time_recovery_enabled", + old: "false", + new: "true", + backupTier: "ENHANCED", + expectSuppress: true, + description: "point_in_time_recovery_enabled should be suppressed when ENHANCED", + }, + "suppress transaction_log_retention_days diff when backup tier is enhanced": { + key: "settings.0.backup_configuration.0.transaction_log_retention_days", + old: "7", + new: "14", + backupTier: "ENHANCED", + expectSuppress: true, + description: "transaction_log_retention_days should be suppressed when ENHANCED", + }, + "suppress retained_backups diff when backup tier is enhanced": { + key: "settings.0.backup_configuration.0.backup_retention_settings.0.retained_backups", + old: "7", + new: "14", + backupTier: "ENHANCED", + expectSuppress: true, + description: "retained_backups should be suppressed when ENHANCED", + }, + "do not suppress diff when backup tier is standard": { + key: "settings.0.backup_configuration.0.enabled", + old: "true", + new: "false", + backupTier: "STANDARD", + expectSuppress: false, + description: "enabled should NOT be suppressed when STANDARD", + }, + "do not suppress diff when backup tier is empty": { + key: "settings.0.backup_configuration.0.enabled", + old: "true", + new: "false", + backupTier: "", + expectSuppress: false, + description: "enabled should NOT be suppressed when backup_tier is empty", + }, + "do not suppress when old and new are same": { + key: "settings.0.backup_configuration.0.enabled", + old: "true", + new: "true", + backupTier: "ENHANCED", + expectSuppress: true, + description: "no diff to suppress when old and new are same", + }, + } + + for name, tc := range cases { + t.Run(name, func(t *testing.T) { + // Build real *schema.ResourceData using the resource schema and TestResourceDataRaw + // Put backup_tier into the nested settings->backup_configuration block (state) + rd := schema.TestResourceDataRaw(t, sql.ResourceSqlDatabaseInstance().Schema, map[string]interface{}{ + "name": "test-instance", + "settings": []interface{}{ + map[string]interface{}{ + "backup_configuration": []interface{}{ + map[string]interface{}{ + "backup_tier": tc.backupTier, + }, + }, + }, + }, + }) + + suppressed := sql.EnhancedBackupManagerDiffSuppressFunc(tc.key, tc.old, tc.new, rd) + + if suppressed != tc.expectSuppress { + t.Errorf("expected suppressed to be %v but got %v. Desc: %s", tc.expectSuppress, suppressed, tc.description) + } + }) + } +} + +func TestAccSqlDatabaseInstance_updateInstanceTierForEnhancedBackupTierInstance(t *testing.T) { + t.Parallel() + + backupVaultID := "bv-test" + location := "us-central1" + project := envvar.GetTestProjectFromEnv() + backupVault := acctest.BootstrapBackupDRVault(t, backupVaultID, location) + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + "project": project, + "backup_vault_id": backupVaultID, + "backup_vault": backupVault, + "db_version": "MYSQL_8_0_41", + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + // Create backup plan and associate with instance + Config: testGoogleSqlDatabaseInstance_attachGCBDR(context), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("google_backup_dr_backup_plan_association.backup_association", "id"), + ), + }, + { + // Update instance backup tier to ENHANCED, which should ignore backup_configuration settings + Config: testGoogleSqlDatabaseInstance_updateTierForGcbdrManagedInstance(context), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("google_sql_database_instance.instance", "settings.0.tier", "db-g1-small"), + ), + }, + }, + }) +} + +func TestAccSqlDatabaseInstance_majorVersionUpgradeForEnhancedBackupTierInstance(t *testing.T) { + t.Parallel() + + backupVault := acctest.BootstrapBackupDRVault(t, "bv-test", "us-central1") + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + "project": envvar.GetTestProjectFromEnv(), + "backup_vault": backupVault, + "db_version": "MYSQL_8_0_41", + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + // Create backup plan and associate with instance + Config: testGoogleSqlDatabaseInstance_attachGCBDR(context), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("google_backup_dr_backup_plan_association.backup_association", "id"), + ), + }, + { + // Update instance database version to a new major version, which should ignore backup_configuration settings + Config: testGoogleSqlDatabaseInstance_majorVersionUpgradeGcbdrManagedInstance(context), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("google_sql_database_instance.instance", "database_version", "MYSQL_8_0_42"), + ), + }, + }, + }) +} + +func TestAccSqlDatabaseInstance_editionUpdateForEnhancedBackupTierInstance(t *testing.T) { + t.Parallel() + + backupVault := acctest.BootstrapBackupDRVault(t, "bv-test", "us-central1") + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + "project": envvar.GetTestProjectFromEnv(), + "backup_vault": backupVault, + "db_version": "MYSQL_8_0_41", + "edition": "ENTERPRISE", + "tier": "db-f1-micro", + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), + Steps: []resource.TestStep{ + { + // Create backup plan and associate with instance + Config: testGoogleSqlDatabaseInstance_attachGCBDR(context), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttrSet("google_backup_dr_backup_plan_association.backup_association", "id"), + ), + }, + { + // Edition upgrade, which should ignore backup_configuration settings + Config: testGoogleSqlDatabaseInstance_editionUpdateForGcbdrManagedInstance(context, "ENTERPRISE_PLUS", "db-perf-optimized-N-4"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("google_sql_database_instance.instance", "settings.0.edition", "ENTERPRISE_PLUS"), + ), + }, + { + // Edition downgrade, which should ignore backup_configuration settings + Config: testGoogleSqlDatabaseInstance_editionUpdateForGcbdrManagedInstance(context, "ENTERPRISE", "db-f1-micro"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("google_sql_database_instance.instance", "settings.0.edition", "ENTERPRISE"), + ), + }, + }, + }) +} + +func testGoogleSqlDatabaseInstance_attachGCBDR(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" {} + +resource "google_sql_database_instance" "instance" { + name = "tf-test-instance-%{random_suffix}" + database_version = "%{db_version}" + region = "us-central1" + + settings { + tier = "db-f1-micro" + } + deletion_protection = false +} + +resource "google_backup_dr_backup_plan" "plan" { + location = "us-central1" + backup_plan_id = "tf-test-bp-test-%{random_suffix}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_vault = "%{backup_vault}" + + backup_rules { + rule_id = "rule-1" + backup_retention_days = 7 + + standard_schedule { + recurrence_type = "DAILY" + hourly_frequency = 6 + time_zone = "UTC" + + backup_window { + start_hour_of_day = 0 + end_hour_of_day = 23 + } + } + } +} + +resource "google_backup_dr_backup_plan_association" "backup_association" { + location = "us-central1" + backup_plan_association_id = "tf-test-bpa-test-%{random_suffix}" + resource = "projects/${data.google_project.project.project_id}/instances/${google_sql_database_instance.instance.name}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_plan = google_backup_dr_backup_plan.plan.name +} +`, context) +} + +func testGoogleSqlDatabaseInstance_updateTierForGcbdrManagedInstance(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" {} + +resource "google_sql_database_instance" "instance" { + name = "tf-test-instance-%{random_suffix}" + database_version = "%{db_version}" + region = "us-central1" + + settings { + tier = "db-g1-small" + + backup_configuration { + enabled = false + binary_log_enabled = false + start_time = "05:00" + + backup_retention_settings { + retained_backups = 8 + retention_unit = "COUNT" + } + } + } + deletion_protection = false +} + +resource "google_backup_dr_backup_plan" "plan" { + location = "us-central1" + backup_plan_id = "tf-test-bp-test-%{random_suffix}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_vault = "%{backup_vault}" + + backup_rules { + rule_id = "rule-1" + backup_retention_days = 7 + + standard_schedule { + recurrence_type = "DAILY" + hourly_frequency = 6 + time_zone = "UTC" + + backup_window { + start_hour_of_day = 0 + end_hour_of_day = 23 + } + } + } +} + +resource "google_backup_dr_backup_plan_association" "backup_association" { + location = "us-central1" + backup_plan_association_id = "tf-test-bpa-test-%{random_suffix}" + resource = "projects/${data.google_project.project.project_id}/instances/${google_sql_database_instance.instance.name}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_plan = google_backup_dr_backup_plan.plan.name +} +`, context) +} + +func testGoogleSqlDatabaseInstance_majorVersionUpgradeGcbdrManagedInstance(context map[string]interface{}) string { + return acctest.Nprintf(` +data "google_project" "project" {} + +resource "google_sql_database_instance" "instance" { + name = "tf-test-instance-%{random_suffix}" + database_version = "MYSQL_8_0_42" + region = "us-central1" + + settings { + tier = "db-f1-micro" + + backup_configuration { + enabled = false + binary_log_enabled = false + start_time = "05:00" + + backup_retention_settings { + retained_backups = 8 + retention_unit = "COUNT" + } + } + } + deletion_protection = false +} + +resource "google_backup_dr_backup_plan" "plan" { + location = "us-central1" + backup_plan_id = "tf-test-bp-test-%{random_suffix}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_vault = "%{backup_vault}" + + backup_rules { + rule_id = "rule-1" + backup_retention_days = 7 + + standard_schedule { + recurrence_type = "DAILY" + hourly_frequency = 6 + time_zone = "UTC" + + backup_window { + start_hour_of_day = 0 + end_hour_of_day = 23 + } + } + } +} + +resource "google_backup_dr_backup_plan_association" "backup_association" { + location = "us-central1" + backup_plan_association_id = "tf-test-bpa-test-%{random_suffix}" + resource = "projects/${data.google_project.project.project_id}/instances/${google_sql_database_instance.instance.name}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_plan = google_backup_dr_backup_plan.plan.name +} +`, context) +} + +func testGoogleSqlDatabaseInstance_editionUpdateForGcbdrManagedInstance(context map[string]interface{}, edition string, tier string) string { + // Create a copy of the context map to avoid modifying the map from the caller + localContext := make(map[string]interface{}) + for k, v := range context { + localContext[k] = v + } + localContext["edition"] = edition + localContext["tier"] = tier + return acctest.Nprintf(` +data "google_project" "project" {} + +resource "google_sql_database_instance" "instance" { + name = "tf-test-instance-%{random_suffix}" + database_version = "%{db_version}" + region = "us-central1" + + settings { + tier = "%{tier}" + edition = "%{edition}" + + backup_configuration { + enabled = false + binary_log_enabled = false + start_time = "05:00" + + backup_retention_settings { + retained_backups = 8 + retention_unit = "COUNT" + } + } + } + deletion_protection = false +} + +resource "google_backup_dr_backup_plan" "plan" { + location = "us-central1" + backup_plan_id = "tf-test-bp-test-%{random_suffix}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_vault = "%{backup_vault}" + + backup_rules { + rule_id = "rule-1" + backup_retention_days = 7 - project := envvar.GetTestProjectFromEnv() - databaseName := "tf-test-" + acctest.RandString(t, 10) + standard_schedule { + recurrence_type = "DAILY" + hourly_frequency = 6 + time_zone = "UTC" - trueVar := true - falseVar := false + backup_window { + start_hour_of_day = 0 + end_hour_of_day = 23 + } + } + } +} - acctest.VcrTest(t, resource.TestCase{ - PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), - CheckDestroy: testAccSqlDatabaseInstanceDestroyProducer(t), - Steps: []resource.TestStep{ - { - // Create DB with disk size 12gb with auto resize enabled - Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 12, 100, nil, false, false), - // Add additional 2gb outside of TF to simulate increase in disk size - Check: testGoogleSqlDatabaseInstanceResizeDisk(t, databaseName, 2), - }, - { - // Disk size is now 14gb - requested (original value) 12gb and auto resize enable - should not trigger resize, no errors. - Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 12, 101, nil, false, false), - Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 14), - }, - { - // Disk size is now 14gb - requested 13gb in configuration, still less - should not trigger resize, no errors. - Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 13, 102, &trueVar, false, false), - Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 14), - }, - { - // Disk size is now 14gb - requested 15gb in configuration, that's an additional increase should trigger resize to 15gb. - Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 15, 103, nil, false, false), - Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 15), - }, - { - // Disk size is now 15gb - requested 14gb, but disabled auto resize - should error because it can't be deleted for replacement. - Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 14, 104, &falseVar, false, false), - ExpectError: regexp.MustCompile("Instance cannot be destroyed"), - }, - { - // Disk size is now 15gb - requested 14gb, but ignore changes is set - so should ignore the configuration change. - Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 14, 105, &falseVar, true, false), - Check: testGoogleSqlDatabaseInstanceCheckDiskSize(t, databaseName, 15), - }, - { - // Allow destroy - Config: testGoogleSqlDatabaseInstance_diskSizeAutoResize(project, databaseName, 14, 105, &falseVar, true, true), - }, - }, - }) +resource "google_backup_dr_backup_plan_association" "backup_association" { + location = "us-central1" + backup_plan_association_id = "tf-test-bpa-test-%{random_suffix}" + resource = "projects/${data.google_project.project.project_id}/instances/${google_sql_database_instance.instance.name}" + resource_type = "sqladmin.googleapis.com/Instance" + backup_plan = google_backup_dr_backup_plan.plan.name +} +`, localContext) } func testGoogleSqlDatabaseInstance_setCustomSubjectAlternateName(context map[string]interface{}) string { @@ -4934,6 +5477,220 @@ resource "google_sql_database_instance" "original-replica" { `, project, primaryName, project, replicaName) } +func testGoogleSqlDatabaseInstance_setMySqlFailoverReplicaEplusWithPrivateNetwork(project, primaryName, replicaName, networkName, databaseVersion string) string { + + return fmt.Sprintf(` +data "google_compute_network" "servicenet" { + name = "%s" +} + +resource "google_sql_database_instance" "primary" { + project = "%s" + name = "%s" + region = "us-east1" + database_version = "%s" + instance_type = "CLOUD_SQL_INSTANCE" + deletion_protection = false + + replication_cluster { + failover_dr_replica_name = "%s" + } + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + backup_configuration { + enabled = true + binary_log_enabled = true + } + } +} + +resource "google_sql_database_instance" "replica" { + project = "%s" + name = "%s" + region = "us-west2" + database_version = "%s" + instance_type = "READ_REPLICA_INSTANCE" + master_instance_name = google_sql_database_instance.primary.name + deletion_protection = false + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + backup_configuration { + binary_log_enabled = true + } + } +} +`, networkName, project, primaryName, databaseVersion, replicaName, project, replicaName, databaseVersion) +} + +func testGoogleSqlDatabaseInstance_setPostgresFailoverReplicaEplusWithPrivateNetwork(project, primaryName, replicaName, networkName, databaseVersion string) string { + + return fmt.Sprintf(` +data "google_compute_network" "servicenet" { + name = "%s" +} + +resource "google_sql_database_instance" "primary" { + project = "%s" + name = "%s" + region = "us-east1" + database_version = "%s" + instance_type = "CLOUD_SQL_INSTANCE" + deletion_protection = false + + replication_cluster { + failover_dr_replica_name = "%s" + } + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + backup_configuration { + enabled = true + point_in_time_recovery_enabled = true + } + } +} + +resource "google_sql_database_instance" "replica" { + project = "%s" + name = "%s" + region = "us-west2" + database_version = "%s" + instance_type = "READ_REPLICA_INSTANCE" + master_instance_name = google_sql_database_instance.primary.name + deletion_protection = false + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + } +} +`, networkName, project, primaryName, databaseVersion, replicaName, project, replicaName, databaseVersion) +} + +func testGoogleSqlDatabaseInstance_mySqlEplusPrimaryReplicaSetupWithPrivateNetwork(project, primaryName, replicaName, networkName, databaseVersion string) string { + + return fmt.Sprintf(` +data "google_compute_network" "servicenet" { + name = "%s" +} + +resource "google_sql_database_instance" "primary" { + project = "%s" + name = "%s" + region = "us-east1" + database_version = "%s" + instance_type = "CLOUD_SQL_INSTANCE" + deletion_protection = false + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + backup_configuration { + enabled = true + binary_log_enabled = true + } + } +} + +resource "google_sql_database_instance" "replica" { + project = "%s" + name = "%s" + region = "us-west2" + database_version = "%s" + instance_type = "READ_REPLICA_INSTANCE" + master_instance_name = google_sql_database_instance.primary.name + deletion_protection = false + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + backup_configuration { + binary_log_enabled = true + } + } +} +`, networkName, project, primaryName, databaseVersion, project, replicaName, databaseVersion) +} + +func testGoogleSqlDatabaseInstance_postgresEplusPrimaryReplicaSetupWithPrivateNetwork(project, primaryName, replicaName, networkName, databaseVersion string) string { + + return fmt.Sprintf(` +data "google_compute_network" "servicenet" { + name = "%s" +} + +resource "google_sql_database_instance" "primary" { + project = "%s" + name = "%s" + region = "us-east1" + database_version = "%s" + instance_type = "CLOUD_SQL_INSTANCE" + deletion_protection = false + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + backup_configuration { + enabled = true + point_in_time_recovery_enabled = true + } + } +} + +resource "google_sql_database_instance" "replica" { + project = "%s" + name = "%s" + region = "us-west2" + database_version = "%s" + instance_type = "READ_REPLICA_INSTANCE" + master_instance_name = google_sql_database_instance.primary.name + deletion_protection = false + + settings { + tier = "db-perf-optimized-N-2" + edition = "ENTERPRISE_PLUS" + ip_configuration { + ipv4_enabled = false + private_network = data.google_compute_network.servicenet.self_link + } + } +} +`, networkName, project, primaryName, databaseVersion, project, replicaName, databaseVersion) +} + func googleSqlDatabaseInstance_mysqlSetFailoverReplica(project, primaryName, replicaName string, useNormalizedDrReplicaName bool) string { drReplicaName := fmt.Sprintf("%s:%s", project, replicaName) if !useNormalizedDrReplicaName { @@ -5771,6 +6528,11 @@ func verifyPscOperation(resourceName string, isPscConfigExpected bool, expectedP if !ok || allowedConsumerProjects != len(expectedAllowedConsumerProjects) { return fmt.Errorf("settings.0.ip_configuration.0.psc_config.0.allowed_consumer_projects property is not present or set as expected in state of %s", resourceName) } + + pscServiceAttachmentLink, ok := resourceAttributes["psc_service_attachment_link"] + if !ok || pscServiceAttachmentLink == "" { + return fmt.Errorf("psc_service_attachment_link property value is empty") + } } return nil diff --git a/google/services/sql/resource_sql_source_representation_instance_generated_meta.yaml b/google/services/sql/resource_sql_source_representation_instance_generated_meta.yaml index c7f830a2f15..5ae342fa746 100644 --- a/google/services/sql/resource_sql_source_representation_instance_generated_meta.yaml +++ b/google/services/sql/resource_sql_source_representation_instance_generated_meta.yaml @@ -1,26 +1,26 @@ -resource: 'google_sql_source_representation_instance' -generation_type: 'mmv1' -source_file: 'products/sql/SourceRepresentationInstance.yaml' -api_service_name: 'sqladmin.googleapis.com' -api_version: 'v1beta4' -api_resource_type_kind: 'DatabaseInstance' +resource: google_sql_source_representation_instance +generation_type: mmv1 +source_file: products/sql/SourceRepresentationInstance.yaml +api_service_name: sqladmin.googleapis.com +api_version: v1beta4 +api_resource_type_kind: DatabaseInstance fields: - - api_field: 'onPremisesConfiguration.caCertificate' - field: 'ca_certificate' - - api_field: 'onPremisesConfiguration.clientCertificate' - field: 'client_certificate' - - api_field: 'onPremisesConfiguration.clientKey' - field: 'client_key' - - api_field: 'databaseVersion' - - api_field: 'onPremisesConfiguration.dumpFilePath' - field: 'dump_file_path' - - api_field: 'onPremisesConfiguration.host' - field: 'host' - - api_field: 'name' - - api_field: 'onPremisesConfiguration.password' - field: 'password' - - api_field: 'onPremisesConfiguration.port' - field: 'port' - - api_field: 'region' - - api_field: 'onPremisesConfiguration.username' - field: 'username' + - api_field: onPremisesConfiguration.caCertificate + field: ca_certificate + - api_field: onPremisesConfiguration.clientCertificate + field: client_certificate + - api_field: onPremisesConfiguration.clientKey + field: client_key + - api_field: databaseVersion + - api_field: onPremisesConfiguration.dumpFilePath + field: dump_file_path + - api_field: onPremisesConfiguration.host + field: host + - api_field: name + - api_field: onPremisesConfiguration.password + field: password + - api_field: onPremisesConfiguration.port + field: port + - api_field: region + - api_field: onPremisesConfiguration.username + field: username diff --git a/google/services/storage/data_source_storage_object_signed_url.go b/google/services/storage/data_source_storage_object_signed_url.go index a958857d941..dba52a9c4be 100644 --- a/google/services/storage/data_source_storage_object_signed_url.go +++ b/google/services/storage/data_source_storage_object_signed_url.go @@ -157,7 +157,12 @@ func dataSourceGoogleSignedUrlRead(d *schema.ResourceData, meta interface{}) err } } - urlData.Path = fmt.Sprintf("/%s/%s", d.Get("bucket").(string), d.Get("path").(string)) + bucketName := d.Get("bucket").(string) + objectPath := d.Get("path").(string) + baseUrl := getGcsHostUrl(urlData, bucketName, objectPath) + + // sign path should be same in both cases as we are using v2 signature + urlData.SignPath = fmt.Sprintf("/%s/%s", bucketName, objectPath) // Load JWT Config from Google Credentials jwtConfig, err := loadJwtConfig(d, config) @@ -167,7 +172,7 @@ func dataSourceGoogleSignedUrlRead(d *schema.ResourceData, meta interface{}) err urlData.JwtConfig = jwtConfig // Construct URL - signedUrl, err := urlData.SignedUrl() + signedUrl, err := urlData.SignedUrl(baseUrl) if err != nil { return err } @@ -224,6 +229,25 @@ func loadJwtConfig(d *schema.ResourceData, meta interface{}) (*jwt.Config, error return nil, errors.New("Credentials not found in datasource, provider configuration or GOOGLE_APPLICATION_CREDENTIALS environment variable.") } +func getGcsHostUrl(urlData *UrlData, bucketName, objectPath string) string { + var baseUrl string + if strings.Contains(bucketName, ".") { + // Use path-style URL as "." in the bucket name create invalid virtual hostnames + // Signed URL format https://storage.googleapis.com/tf-test-bucket-6159205297736845881/path/to/object + // Path format is bucket_name/object_path + urlData.Path = fmt.Sprintf("/%s/%s", bucketName, objectPath) + baseUrl = gcsBaseUrl + } else { + // default to always virtual style URL + // URL format https://tf-test-bucket-6159205297736845881.storage.googleapis.com//path/to/object + // Path format is object_path + urlData.Path = fmt.Sprintf("/%s", objectPath) + gcsUrl := strings.Split(gcsBaseUrl, "://") + baseUrl = fmt.Sprintf("%s://%s.%s", gcsUrl[0], bucketName, gcsUrl[1]) + } + return baseUrl +} + // parsePrivateKey converts the binary contents of a private key file // to an *rsa.PrivateKey. It detects whether the private key is in a // PEM container or not. If so, it extracts the the private key @@ -257,7 +281,9 @@ type UrlData struct { HttpMethod string Expires int HttpHeaders map[string]string - Path string + SignPath string + // Internally used field derived for virtual-host or path-style. + Path string } // SigningString creates a string representation of the UrlData in a form ready for signing: @@ -301,7 +327,7 @@ func (u *UrlData) SigningString() []byte { } // Storage Object path (includes bucketname) - buf.WriteString(u.Path) + buf.WriteString(u.SignPath) return buf.Bytes() } @@ -333,7 +359,7 @@ func (u *UrlData) EncodedSignature() (string, error) { } // SignedUrl constructs the final signed URL a client can use to retrieve storage object -func (u *UrlData) SignedUrl() (string, error) { +func (u *UrlData) SignedUrl(baseUrl string) (string, error) { encodedSig, err := u.EncodedSignature() if err != nil { @@ -343,7 +369,7 @@ func (u *UrlData) SignedUrl() (string, error) { // build url // https://cloud.google.com/storage/docs/access-control/create-signed-urls-program var urlBuffer bytes.Buffer - urlBuffer.WriteString(gcsBaseUrl) + urlBuffer.WriteString(baseUrl) urlBuffer.WriteString(u.Path) urlBuffer.WriteString("?GoogleAccessId=") urlBuffer.WriteString(u.JwtConfig.Email) diff --git a/google/services/storage/data_source_storage_object_signed_url_internal_test.go b/google/services/storage/data_source_storage_object_signed_url_internal_test.go index 39a4973dfbc..cbc013ed0fe 100644 --- a/google/services/storage/data_source_storage_object_signed_url_internal_test.go +++ b/google/services/storage/data_source_storage_object_signed_url_internal_test.go @@ -46,16 +46,19 @@ const fakeCredentials = `{ // URL HTTP Method Expiration Signed URL // gs://tf-test-bucket-6159205297736845881/path/to/file GET 2016-08-12 14:03:30 https://storage.googleapis.com/tf-test-bucket-6159205297736845881/path/to/file?GoogleAccessId=user@gcp-project.iam.gserviceaccount.com&Expires=1470967410&Signature=JJvE2Jc%2BeoagyS1qRACKBGUkgLkKjw7cGymHhtB4IzzN3nbXDqr0acRWGy0%2BEpZ3HYNDalEYsK0lR9Q0WCgty5I0JKmPIuo9hOYa1xTNH%2B22xiWsekxGV%2FcA9FXgWpi%2BFt7fBmMk4dhDe%2BuuYc7N79hd0FYuSBNW1Wp32Bluoe4SNkNAB%2BuIDd9KqPzqs09UAbBoz2y4WxXOQnRyR8GAfb8B%2FDtv62gYjtmp%2F6%2Fyr6xj7byWKZdQt8kEftQLTQmP%2F17Efjp6p%2BXo71Q0F9IhAFiqWfp3Ij8hHDSebLcVb2ULXyHNNQpHBOhFgALrFW3I6Uc3WciLEOsBS9Ej3EGdTg%3D%3D -const testUrlPath = "/tf-test-bucket-6159205297736845881/path/to/file" +const testUrlPath = "path/to/file" +const testSignUrlPath = "/tf-test-bucket-6159205297736845881/path/to/file" const testUrlExpires = 1470967410 +const testBucketName = "tf-test-bucket-6159205297736845881" const testUrlExpectedSignatureBase64Encoded = "JJvE2Jc%2BeoagyS1qRACKBGUkgLkKjw7cGymHhtB4IzzN3nbXDqr0acRWGy0%2BEpZ3HYNDalEYsK0lR9Q0WCgty5I0JKmPIuo9hOYa1xTNH%2B22xiWsekxGV%2FcA9FXgWpi%2BFt7fBmMk4dhDe%2BuuYc7N79hd0FYuSBNW1Wp32Bluoe4SNkNAB%2BuIDd9KqPzqs09UAbBoz2y4WxXOQnRyR8GAfb8B%2FDtv62gYjtmp%2F6%2Fyr6xj7byWKZdQt8kEftQLTQmP%2F17Efjp6p%2BXo71Q0F9IhAFiqWfp3Ij8hHDSebLcVb2ULXyHNNQpHBOhFgALrFW3I6Uc3WciLEOsBS9Ej3EGdTg%3D%3D" -const testUrlExpectedUrl = "https://storage.googleapis.com/tf-test-bucket-6159205297736845881/path/to/file?GoogleAccessId=user@gcp-project.iam.gserviceaccount.com&Expires=1470967410&Signature=JJvE2Jc%2BeoagyS1qRACKBGUkgLkKjw7cGymHhtB4IzzN3nbXDqr0acRWGy0%2BEpZ3HYNDalEYsK0lR9Q0WCgty5I0JKmPIuo9hOYa1xTNH%2B22xiWsekxGV%2FcA9FXgWpi%2BFt7fBmMk4dhDe%2BuuYc7N79hd0FYuSBNW1Wp32Bluoe4SNkNAB%2BuIDd9KqPzqs09UAbBoz2y4WxXOQnRyR8GAfb8B%2FDtv62gYjtmp%2F6%2Fyr6xj7byWKZdQt8kEftQLTQmP%2F17Efjp6p%2BXo71Q0F9IhAFiqWfp3Ij8hHDSebLcVb2ULXyHNNQpHBOhFgALrFW3I6Uc3WciLEOsBS9Ej3EGdTg%3D%3D" +const testUrlExpectedUrl = "https://tf-test-bucket-6159205297736845881.storage.googleapis.com/path/to/file?GoogleAccessId=user@gcp-project.iam.gserviceaccount.com&Expires=1470967410&Signature=JJvE2Jc%2BeoagyS1qRACKBGUkgLkKjw7cGymHhtB4IzzN3nbXDqr0acRWGy0%2BEpZ3HYNDalEYsK0lR9Q0WCgty5I0JKmPIuo9hOYa1xTNH%2B22xiWsekxGV%2FcA9FXgWpi%2BFt7fBmMk4dhDe%2BuuYc7N79hd0FYuSBNW1Wp32Bluoe4SNkNAB%2BuIDd9KqPzqs09UAbBoz2y4WxXOQnRyR8GAfb8B%2FDtv62gYjtmp%2F6%2Fyr6xj7byWKZdQt8kEftQLTQmP%2F17Efjp6p%2BXo71Q0F9IhAFiqWfp3Ij8hHDSebLcVb2ULXyHNNQpHBOhFgALrFW3I6Uc3WciLEOsBS9Ej3EGdTg%3D%3D" func TestUrlData_Signing(t *testing.T) { urlData := &UrlData{ HttpMethod: "GET", Expires: testUrlExpires, Path: testUrlPath, + SignPath: testSignUrlPath, } // unescape and decode the expected signature expectedSig, err := url.QueryUnescape(testUrlExpectedSignatureBase64Encoded) @@ -99,8 +102,10 @@ func TestUrlData_SignedUrl(t *testing.T) { Expires: testUrlExpires, Path: testUrlPath, JwtConfig: cfg, + SignPath: testSignUrlPath, } - result, err := urlData.SignedUrl() + baseUrl := getGcsHostUrl(urlData, testBucketName, testUrlPath) + result, err := urlData.SignedUrl(baseUrl) if err != nil { t.Errorf("Could not generated signed url: %+v", err) } diff --git a/google/services/storage/data_source_storage_object_signed_url_test.go b/google/services/storage/data_source_storage_object_signed_url_test.go index 65e7e607b4b..3dba7d1bdde 100644 --- a/google/services/storage/data_source_storage_object_signed_url_test.go +++ b/google/services/storage/data_source_storage_object_signed_url_test.go @@ -22,6 +22,7 @@ import ( "fmt" "io/ioutil" "net/http" + "strings" "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -29,17 +30,41 @@ import ( "github.com/hashicorp/terraform-provider-google/google/acctest" ) -func TestAccStorageSignedUrl_basic(t *testing.T) { +const objectPath = "object/objname" +const stoargeApiHost = "storage.googleapis.com" + +func TestAccStorageSignedUrl_basicVirtualStyle(t *testing.T) { t.Parallel() + bucketName := acctest.TestBucketName(t) + acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), Steps: []resource.TestStep{ { - Config: testGoogleSignedUrlConfig, + Config: testGoogleSignedUrlConfig(bucketName), Check: resource.ComposeTestCheckFunc( - testAccSignedUrlExists(t, "data.google_storage_object_signed_url.blerg"), + testAccSignedUrlVirtualStyleExists(t, "data.google_storage_object_signed_url.blerg", bucketName), + ), + }, + }, + }) +} + +func TestAccStorageSignedUrl_basicPathStyle(t *testing.T) { + t.Parallel() + + bucketName := acctest.TestBucketName(t) + ".com" + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + Steps: []resource.TestStep{ + { + Config: testGoogleSignedUrlConfig(bucketName), + Check: resource.ComposeTestCheckFunc( + testAccSignedUrlPathStyleExists(t, "data.google_storage_object_signed_url.blerg", bucketName), ), }, }, @@ -75,7 +100,7 @@ func TestAccStorageSignedUrl_accTest(t *testing.T) { }) } -func testAccSignedUrlExists(t *testing.T, n string) resource.TestCheckFunc { +func testAccSignedUrlVirtualStyleExists(t *testing.T, n, bucketName string) resource.TestCheckFunc { return func(s *terraform.State) error { r := s.RootModule().Resources[n] @@ -85,6 +110,30 @@ func testAccSignedUrlExists(t *testing.T, n string) resource.TestCheckFunc { return fmt.Errorf("signed_url is empty: %v", a) } + splitUrl := strings.Split(a["signed_url"], "/") + if splitUrl[2] != fmt.Sprintf("%s.%s", bucketName, stoargeApiHost) { + return fmt.Errorf("invalid virtual style URL") + } + + return nil + } +} + +func testAccSignedUrlPathStyleExists(t *testing.T, n, bucketName string) resource.TestCheckFunc { + return func(s *terraform.State) error { + + r := s.RootModule().Resources[n] + a := r.Primary.Attributes + + if a["signed_url"] == "" { + return fmt.Errorf("signed_url is empty: %v", a) + } + + urlPrefix := fmt.Sprintf("%s://%s/%s/%s", "https", stoargeApiHost, bucketName, objectPath) + if !strings.HasPrefix(a["signed_url"], urlPrefix) { + return fmt.Errorf("invalid path style URL") + } + return nil } } @@ -147,13 +196,14 @@ func testAccSignedUrlRetrieval(n string, headers map[string]string) resource.Tes } } -const testGoogleSignedUrlConfig = ` +func testGoogleSignedUrlConfig(bucket string) string { + return fmt.Sprintf(` data "google_storage_object_signed_url" "blerg" { - bucket = "friedchicken" - path = "path/to/file" - + bucket = "%s" + path = "%s" +} +`, bucket, objectPath) } -` func testAccTestGoogleStorageObjectSignedURL(bucketName string) string { return fmt.Sprintf(` diff --git a/google/services/storage/resource_storage_anywhere_cache_generated_meta.yaml b/google/services/storage/resource_storage_anywhere_cache_generated_meta.yaml index 864ca7ed5b3..e71e24316c1 100644 --- a/google/services/storage/resource_storage_anywhere_cache_generated_meta.yaml +++ b/google/services/storage/resource_storage_anywhere_cache_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_storage_anywhere_cache' -generation_type: 'mmv1' -source_file: 'products/storage/AnywhereCache.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'AnywhereCache' +resource: google_storage_anywhere_cache +generation_type: mmv1 +source_file: products/storage/AnywhereCache.yaml +api_service_name: storage.googleapis.com +api_version: v1 +api_resource_type_kind: AnywhereCache fields: - - api_field: 'admissionPolicy' - - api_field: 'anywhereCacheId' - - field: 'bucket' - provider_only: true - - api_field: 'createTime' - - api_field: 'pendingUpdate' - - api_field: 'state' - - api_field: 'ttl' - - api_field: 'updateTime' - - api_field: 'zone' + - api_field: admissionPolicy + - api_field: anywhereCacheId + - field: bucket + provider_only: true + - api_field: createTime + - api_field: pendingUpdate + - api_field: state + - api_field: ttl + - api_field: updateTime + - api_field: zone diff --git a/google/services/storage/resource_storage_bucket.go b/google/services/storage/resource_storage_bucket.go index 5bf78848943..699268ba542 100644 --- a/google/services/storage/resource_storage_bucket.go +++ b/google/services/storage/resource_storage_bucket.go @@ -19,7 +19,6 @@ package storage import ( "bytes" "context" - "errors" "fmt" "log" "regexp" @@ -119,7 +118,7 @@ func ResourceStorageBucket() *schema.Resource { Type: schema.TypeBool, Optional: true, Default: false, - Description: `When deleting a bucket, this boolean option will delete all contained objects, or anywhereCaches (if any). If you try to delete a bucket that contains objects or anywhereCaches, Terraform will fail that run, deleting anywhereCaches may take 80 minutes to complete.`, + Description: `When true, before deleting a bucket, delete all objects within the bucket, or Anywhere Caches caching data for that bucket. Otherwise, buckets with objects/caches will fail. Anywhere Cache requires additional permissions to interact with and will be ignored when those are not present, attempting to delete anyways. This may result in the objects in the bucket getting destroyed but not the bucket itself if there is a cache in use with the bucket. Force deletion may take a long time to delete buckets with lots of objects or with any Anywhere Caches (80m+).`, }, "labels": { @@ -1200,93 +1199,99 @@ func resourceStorageBucketDelete(d *schema.ResourceData, meta interface{}) error return err } - // Get the bucket bucket := d.Get("name").(string) - - var listError, deleteObjectError, deleteCacheError error - for deleteObjectError == nil { - res, err := config.NewStorageClient(userAgent).Objects.List(bucket).Versions(true).Do() - if err != nil { - log.Printf("Error listing contents of bucket %s: %v", bucket, err) - // If we can't list the contents, try deleting the bucket anyway in case it's empty - listError = err - break + forceDestroy := d.Get("force_destroy").(bool) + + // set up force_destroy state- we're deleting multiple resource kinds and parallelising those deletions, so we + // store some data in function scope to handle during cleanup + var objectsListError, deleteObjectError, deleteCacheError error + + // Create a workerpool for parallel deletion of resources. In the + // future, it would be great to expose Terraform's global parallelism + // flag here, but that's currently reserved for core use. Testing + // shows that NumCPUs-1 is the most performant on average networks. + // + // The challenge with making this user-configurable is that the + // configuration would reside in the Terraform configuration file, + // decreasing its portability. Ideally we'd want this to connect to + // Terraform's top-level -parallelism flag, but that's not plumbed nor + // is it scheduled to be plumbed to individual providers. + wp := workerpool.New(runtime.NumCPU() - 1) + + // delete anywhere caches + cacheList, _ := getAnywhereCacheListResult(d, config) // intentionally ignore errors on list- this requires extra permissions (storage.anywhereCaches.list) and we fall through if not permissioned + if len(cacheList) != 0 { + if !forceDestroy { + deleteErr := fmt.Errorf("Error trying to delete bucket %s without `force_destroy` set to true", bucket) + log.Printf("[DEBUG] Error attempting to delete bucket %q with anywhere caches present: %s\n\n", bucket, deleteErr) + return deleteErr } - cacheList, cacheListErr := getAnywhereCacheListResult(d, config) - if cacheListErr != nil { - // If we get any error, try deleting the bucket anyway in case it's empty - // This would help our customers to avoid requiring extra storage.anywhereCaches.list permission. + log.Printf("[DEBUG] Attempting to destroy %v anywhere caches on bucket %q due to `force_destroy` being set to true.", len(cacheList), bucket) + wp.Submit(func() { + err = deleteAnywhereCacheIfAny(d, config) + if err != nil { + deleteCacheError = fmt.Errorf("error deleting the caches on the bucket %s : %w", bucket, err) + } + }) + } + + // delete objects + for deleteObjectError == nil { + listResponse, listErr := config.NewStorageClient(userAgent).Objects.List(bucket).Versions(true).Do() + if listErr != nil { + log.Printf("Error listing contents of bucket %s: %v", bucket, listErr) + // If we can't list the contents, fall through and try deleting the bucket anyway in case it's empty + objectsListError = listErr break } - if len(res.Items) == 0 && len(cacheList) == 0 { - break // 0 items and no caches, bucket empty + if len(listResponse.Items) == 0 { + break // 0 items, bucket empty } if d.Get("retention_policy.0.is_locked").(bool) { - for _, item := range res.Items { + for _, item := range listResponse.Items { expiration, err := time.Parse(time.RFC3339, item.RetentionExpirationTime) if err != nil { return err } + if expiration.After(time.Now()) { - deleteErr := errors.New("Bucket '" + d.Get("name").(string) + "' contains objects that have not met the retention period yet and cannot be deleted.") + deleteErr := fmt.Errorf("Bucket %q contains objects that have not met the retention period yet and cannot be deleted.", bucket) log.Printf("Error! %s : %s\n\n", bucket, deleteErr) return deleteErr } } } - if !d.Get("force_destroy").(bool) { + if !forceDestroy { deleteErr := fmt.Errorf("Error trying to delete bucket %s without `force_destroy` set to true", bucket) - log.Printf("Error! %s : %s\n\n", bucket, deleteErr) + log.Printf("[DEBUG] Error attempting to delete bucket %q with objects: %s\n\n", bucket, deleteErr) return deleteErr } - // GCS requires that a bucket be empty (have no objects or object - // versions) before it can be deleted. - log.Printf("[DEBUG] GCS Bucket attempting to forceDestroy\n\n") + // GCS requires that a bucket be empty (have no objects or object versions) before it can be deleted. + log.Printf("[DEBUG] Attempting to destroy %v objects in bucket %q due to `force_destroy` being set to true. There may be more objects- additional pages are not checked in advance.", len(listResponse.Items), bucket) - // Create a workerpool for parallel deletion of resources. In the - // future, it would be great to expose Terraform's global parallelism - // flag here, but that's currently reserved for core use. Testing - // shows that NumCPUs-1 is the most performant on average networks. - // - // The challenge with making this user-configurable is that the - // configuration would reside in the Terraform configuration file, - // decreasing its portability. Ideally we'd want this to connect to - // Terraform's top-level -parallelism flag, but that's not plumbed nor - // is it scheduled to be plumbed to individual providers. - wp := workerpool.New(runtime.NumCPU() - 1) - - wp.Submit(func() { - err = deleteAnywhereCacheIfAny(d, config) - if err != nil { - deleteCacheError = fmt.Errorf("error deleting the caches on the bucket %s : %w", bucket, err) - } - }) - - for _, object := range res.Items { - log.Printf("[DEBUG] Found %s", object.Name) - object := object + for _, object := range listResponse.Items { + object := object // ensure that local variable is maintained over loop iterations. Go probably fixed this issue but that should be evaluated in depth. wp.Submit(func() { - log.Printf("[TRACE] Attempting to delete %s", object.Name) - if err := config.NewStorageClient(userAgent).Objects.Delete(bucket, object.Name).Generation(object.Generation).Do(); err != nil { + log.Printf("[DEBUG] Deleting object %q in bucket %q", object.Name, bucket) + err := config.NewStorageClient(userAgent).Objects.Delete(bucket, object.Name).Generation(object.Generation).Do() + if err != nil { deleteObjectError = err - log.Printf("[ERR] Failed to delete storage object %s: %s", object.Name, err) - } else { - log.Printf("[TRACE] Successfully deleted %s", object.Name) + log.Printf("[DEBUG] Failed to delete object %q in bucket %q: %s", object.Name, bucket, err) } }) } - - // Wait for everything to finish. - wp.StopWait() } - // remove empty bucket + // Wait for all force-destroyed children (objects, anywhere caches) to finish getting destroyed + wp.StopWait() + + // destroy bucket err = retry.Retry(1*time.Minute, func() *retry.RetryError { err := config.NewStorageClient(userAgent).Buckets.Delete(bucket).Do() if err == nil { @@ -1297,8 +1302,8 @@ func resourceStorageBucketDelete(d *schema.ResourceData, meta interface{}) error } return retry.NonRetryableError(err) }) - if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 409 && strings.Contains(gerr.Message, "not empty") && listError != nil { - return fmt.Errorf("could not delete non-empty bucket due to error when listing contents: %v", listError) + if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 409 && strings.Contains(gerr.Message, "not empty") && objectsListError != nil { + return fmt.Errorf("could not delete non-empty bucket due to error when listing contents: %v", objectsListError) } if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 409 && strings.Contains(gerr.Message, "not empty") && deleteObjectError != nil { return fmt.Errorf("could not delete non-empty bucket due to error when deleting contents: %v", deleteObjectError) diff --git a/google/services/storage/resource_storage_bucket_access_control_generated_meta.yaml b/google/services/storage/resource_storage_bucket_access_control_generated_meta.yaml index 28372ca8fa8..37b1a4be669 100644 --- a/google/services/storage/resource_storage_bucket_access_control_generated_meta.yaml +++ b/google/services/storage/resource_storage_bucket_access_control_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_storage_bucket_access_control' -generation_type: 'mmv1' -source_file: 'products/storage/BucketAccessControl.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'BucketAccessControl' +resource: google_storage_bucket_access_control +generation_type: mmv1 +source_file: products/storage/BucketAccessControl.yaml +api_service_name: storage.googleapis.com +api_version: v1 +api_resource_type_kind: BucketAccessControl fields: - - api_field: 'bucket' - - api_field: 'domain' - - api_field: 'email' - - api_field: 'entity' - - api_field: 'role' + - api_field: bucket + - api_field: domain + - api_field: email + - api_field: entity + - api_field: role diff --git a/google/services/storage/resource_storage_bucket_object_meta.yaml b/google/services/storage/resource_storage_bucket_object_meta.yaml index cd88b6c818f..141a4003642 100644 --- a/google/services/storage/resource_storage_bucket_object_meta.yaml +++ b/google/services/storage/resource_storage_bucket_object_meta.yaml @@ -11,6 +11,13 @@ fields: - api_field: 'contentEncoding' - api_field: 'contentLanguage' - api_field: 'contentType' + - api_field: 'contexts.custom.key' + - api_field: 'contexts.custom.value.createTime' + field: 'contexts.custom.create_time' + - api_field: 'contexts.custom.value.updateTime' + field: 'contexts.custom.update_time' + - api_field: 'contexts.custom.value.value' + field: 'contexts.custom.value' - api_field: 'checksums.crc32c' field: 'crc32c' - api_field: 'customerEncryption.encryptionAlgorithm' diff --git a/google/services/storage/resource_storage_default_object_access_control_generated_meta.yaml b/google/services/storage/resource_storage_default_object_access_control_generated_meta.yaml index d3e272fc542..24175fdaff1 100644 --- a/google/services/storage/resource_storage_default_object_access_control_generated_meta.yaml +++ b/google/services/storage/resource_storage_default_object_access_control_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_storage_default_object_access_control' -generation_type: 'mmv1' -source_file: 'products/storage/DefaultObjectAccessControl.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ObjectAccessControl' +resource: google_storage_default_object_access_control +generation_type: mmv1 +source_file: products/storage/DefaultObjectAccessControl.yaml +api_service_name: storage.googleapis.com +api_version: v1 +api_resource_type_kind: ObjectAccessControl fields: - - api_field: 'bucket' - - api_field: 'domain' - - api_field: 'email' - - api_field: 'entity' - - api_field: 'entityId' - - api_field: 'generation' - - api_field: 'object' - - api_field: 'projectTeam.projectNumber' - - api_field: 'projectTeam.team' - - api_field: 'role' + - api_field: bucket + - api_field: domain + - api_field: email + - api_field: entity + - api_field: entityId + - api_field: generation + - api_field: object + - api_field: projectTeam.projectNumber + - api_field: projectTeam.team + - api_field: role diff --git a/google/services/storage/resource_storage_folder_generated_meta.yaml b/google/services/storage/resource_storage_folder_generated_meta.yaml index 543c0dbb1dc..72e76352200 100644 --- a/google/services/storage/resource_storage_folder_generated_meta.yaml +++ b/google/services/storage/resource_storage_folder_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_storage_folder' -generation_type: 'mmv1' -source_file: 'products/storage/Folder.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Folder' +resource: google_storage_folder +generation_type: mmv1 +source_file: products/storage/Folder.yaml +api_service_name: storage.googleapis.com +api_version: v1 +api_resource_type_kind: Folder fields: - - field: 'bucket' - provider_only: true - - api_field: 'createTime' - - field: 'force_destroy' - provider_only: true - - api_field: 'metageneration' - - api_field: 'name' - - api_field: 'updateTime' - - api_field: 'selfLink' + - field: bucket + provider_only: true + - api_field: createTime + - field: force_destroy + provider_only: true + - api_field: metageneration + - api_field: name + - api_field: updateTime + - api_field: selfLink diff --git a/google/services/storage/resource_storage_hmac_key_generated_meta.yaml b/google/services/storage/resource_storage_hmac_key_generated_meta.yaml index 71790c3a263..7ae117e553a 100644 --- a/google/services/storage/resource_storage_hmac_key_generated_meta.yaml +++ b/google/services/storage/resource_storage_hmac_key_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_storage_hmac_key' -generation_type: 'mmv1' -source_file: 'products/storage/HmacKey.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'HmacKeyMetadata' +resource: google_storage_hmac_key +generation_type: mmv1 +source_file: products/storage/HmacKey.yaml +api_service_name: storage.googleapis.com +api_version: v1 +api_resource_type_kind: HmacKeyMetadata fields: - - api_field: 'accessId' - - api_field: 'secret' - - api_field: 'serviceAccountEmail' - - api_field: 'state' - - api_field: 'timeCreated' - - api_field: 'updated' + - api_field: accessId + - api_field: secret + - api_field: serviceAccountEmail + - api_field: state + - api_field: timeCreated + - api_field: updated diff --git a/google/services/storage/resource_storage_managed_folder_generated_meta.yaml b/google/services/storage/resource_storage_managed_folder_generated_meta.yaml index ab8933386dc..03021ca7600 100644 --- a/google/services/storage/resource_storage_managed_folder_generated_meta.yaml +++ b/google/services/storage/resource_storage_managed_folder_generated_meta.yaml @@ -1,15 +1,15 @@ -resource: 'google_storage_managed_folder' -generation_type: 'mmv1' -source_file: 'products/storage/ManagedFolder.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ManagedFolder' +resource: google_storage_managed_folder +generation_type: mmv1 +source_file: products/storage/ManagedFolder.yaml +api_service_name: storage.googleapis.com +api_version: v1 +api_resource_type_kind: ManagedFolder fields: - - api_field: 'bucket' - - api_field: 'createTime' - - field: 'force_destroy' - provider_only: true - - api_field: 'metageneration' - - api_field: 'name' - - api_field: 'updateTime' - - api_field: 'selfLink' + - api_field: bucket + - api_field: createTime + - field: force_destroy + provider_only: true + - api_field: metageneration + - api_field: name + - api_field: updateTime + - api_field: selfLink diff --git a/google/services/storage/resource_storage_object_access_control_generated_meta.yaml b/google/services/storage/resource_storage_object_access_control_generated_meta.yaml index 5c771b8b9e4..59bc750defd 100644 --- a/google/services/storage/resource_storage_object_access_control_generated_meta.yaml +++ b/google/services/storage/resource_storage_object_access_control_generated_meta.yaml @@ -1,17 +1,17 @@ -resource: 'google_storage_object_access_control' -generation_type: 'mmv1' -source_file: 'products/storage/ObjectAccessControl.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ObjectAccessControl' +resource: google_storage_object_access_control +generation_type: mmv1 +source_file: products/storage/ObjectAccessControl.yaml +api_service_name: storage.googleapis.com +api_version: v1 +api_resource_type_kind: ObjectAccessControl fields: - - api_field: 'bucket' - - api_field: 'domain' - - api_field: 'email' - - api_field: 'entity' - - api_field: 'entityId' - - api_field: 'generation' - - api_field: 'object' - - api_field: 'projectTeam.projectNumber' - - api_field: 'projectTeam.team' - - api_field: 'role' + - api_field: bucket + - api_field: domain + - api_field: email + - api_field: entity + - api_field: entityId + - api_field: generation + - api_field: object + - api_field: projectTeam.projectNumber + - api_field: projectTeam.team + - api_field: role diff --git a/google/services/storagebatchoperations/resource_storage_batch_operations_job_generated_meta.yaml b/google/services/storagebatchoperations/resource_storage_batch_operations_job_generated_meta.yaml index de363f7ebdf..d7e1366897c 100644 --- a/google/services/storagebatchoperations/resource_storage_batch_operations_job_generated_meta.yaml +++ b/google/services/storagebatchoperations/resource_storage_batch_operations_job_generated_meta.yaml @@ -1,30 +1,30 @@ -resource: 'google_storage_batch_operations_job' -generation_type: 'mmv1' -source_file: 'products/storagebatchoperations/Job.yaml' -api_service_name: 'storagebatchoperations.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Job' +resource: google_storage_batch_operations_job +generation_type: mmv1 +source_file: products/storagebatchoperations/Job.yaml +api_service_name: storagebatchoperations.googleapis.com +api_version: v1 +api_resource_type_kind: Job fields: - - api_field: 'bucketList.buckets.bucket' - - api_field: 'bucketList.buckets.manifest.manifestLocation' - - api_field: 'bucketList.buckets.prefixList.includedObjectPrefixes' - - api_field: 'completeTime' - - api_field: 'createTime' - - api_field: 'deleteObject.permanentObjectDeletionEnabled' - - field: 'delete_protection' - provider_only: true - - field: 'job_id' - provider_only: true - - api_field: 'putMetadata.cacheControl' - - api_field: 'putMetadata.contentDisposition' - - api_field: 'putMetadata.contentEncoding' - - api_field: 'putMetadata.contentLanguage' - - api_field: 'putMetadata.contentType' - - api_field: 'putMetadata.customMetadata' - - api_field: 'putMetadata.customTime' - - api_field: 'putObjectHold.eventBasedHold' - - api_field: 'putObjectHold.temporaryHold' - - api_field: 'rewriteObject.kmsKey' - - api_field: 'scheduleTime' - - api_field: 'state' - - api_field: 'updateTime' + - api_field: bucketList.buckets.bucket + - api_field: bucketList.buckets.manifest.manifestLocation + - api_field: bucketList.buckets.prefixList.includedObjectPrefixes + - api_field: completeTime + - api_field: createTime + - api_field: deleteObject.permanentObjectDeletionEnabled + - field: delete_protection + provider_only: true + - field: job_id + provider_only: true + - api_field: putMetadata.cacheControl + - api_field: putMetadata.contentDisposition + - api_field: putMetadata.contentEncoding + - api_field: putMetadata.contentLanguage + - api_field: putMetadata.contentType + - api_field: putMetadata.customMetadata + - api_field: putMetadata.customTime + - api_field: putObjectHold.eventBasedHold + - api_field: putObjectHold.temporaryHold + - api_field: rewriteObject.kmsKey + - api_field: scheduleTime + - api_field: state + - api_field: updateTime diff --git a/google/services/storagecontrol/resource_storage_control_folder_intelligence_config_generated_meta.yaml b/google/services/storagecontrol/resource_storage_control_folder_intelligence_config_generated_meta.yaml index db846728ecd..f7df5c4bc5c 100644 --- a/google/services/storagecontrol/resource_storage_control_folder_intelligence_config_generated_meta.yaml +++ b/google/services/storagecontrol/resource_storage_control_folder_intelligence_config_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_storage_control_folder_intelligence_config' -generation_type: 'mmv1' -source_file: 'products/storagecontrol/FolderIntelligenceConfig.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'IntelligenceConfig' +resource: google_storage_control_folder_intelligence_config +generation_type: mmv1 +source_file: products/storagecontrol/FolderIntelligenceConfig.yaml +api_service_name: storage.googleapis.com +api_version: v2 +api_resource_type_kind: IntelligenceConfig api_variant_patterns: - - 'folders/{folder}/locations/{location}/intelligenceConfig' + - folders/{folder}/locations/{location}/intelligenceConfig fields: - - api_field: 'editionConfig' - - api_field: 'effectiveIntelligenceConfig.effectiveEdition' - - api_field: 'effectiveIntelligenceConfig.intelligenceConfig' - - api_field: 'filter.excludedCloudStorageBuckets.bucketIdRegexes' - - api_field: 'filter.excludedCloudStorageLocations.locations' - - api_field: 'filter.includedCloudStorageBuckets.bucketIdRegexes' - - api_field: 'filter.includedCloudStorageLocations.locations' - - field: 'name' - provider_only: true - - api_field: 'trialConfig.expireTime' - - api_field: 'updateTime' + - api_field: editionConfig + - api_field: effectiveIntelligenceConfig.effectiveEdition + - api_field: effectiveIntelligenceConfig.intelligenceConfig + - api_field: filter.excludedCloudStorageBuckets.bucketIdRegexes + - api_field: filter.excludedCloudStorageLocations.locations + - api_field: filter.includedCloudStorageBuckets.bucketIdRegexes + - api_field: filter.includedCloudStorageLocations.locations + - field: name + provider_only: true + - api_field: trialConfig.expireTime + - api_field: updateTime diff --git a/google/services/storagecontrol/resource_storage_control_organization_intelligence_config_generated_meta.yaml b/google/services/storagecontrol/resource_storage_control_organization_intelligence_config_generated_meta.yaml index 1afd6b60574..b0dd1002269 100644 --- a/google/services/storagecontrol/resource_storage_control_organization_intelligence_config_generated_meta.yaml +++ b/google/services/storagecontrol/resource_storage_control_organization_intelligence_config_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_storage_control_organization_intelligence_config' -generation_type: 'mmv1' -source_file: 'products/storagecontrol/OrganizationIntelligenceConfig.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'IntelligenceConfig' +resource: google_storage_control_organization_intelligence_config +generation_type: mmv1 +source_file: products/storagecontrol/OrganizationIntelligenceConfig.yaml +api_service_name: storage.googleapis.com +api_version: v2 +api_resource_type_kind: IntelligenceConfig api_variant_patterns: - - 'organizations/{org}/locations/{location}/intelligenceConfig' + - organizations/{org}/locations/{location}/intelligenceConfig fields: - - api_field: 'editionConfig' - - api_field: 'effectiveIntelligenceConfig.effectiveEdition' - - api_field: 'effectiveIntelligenceConfig.intelligenceConfig' - - api_field: 'filter.excludedCloudStorageBuckets.bucketIdRegexes' - - api_field: 'filter.excludedCloudStorageLocations.locations' - - api_field: 'filter.includedCloudStorageBuckets.bucketIdRegexes' - - api_field: 'filter.includedCloudStorageLocations.locations' - - field: 'name' - provider_only: true - - api_field: 'trialConfig.expireTime' - - api_field: 'updateTime' + - api_field: editionConfig + - api_field: effectiveIntelligenceConfig.effectiveEdition + - api_field: effectiveIntelligenceConfig.intelligenceConfig + - api_field: filter.excludedCloudStorageBuckets.bucketIdRegexes + - api_field: filter.excludedCloudStorageLocations.locations + - api_field: filter.includedCloudStorageBuckets.bucketIdRegexes + - api_field: filter.includedCloudStorageLocations.locations + - field: name + provider_only: true + - api_field: trialConfig.expireTime + - api_field: updateTime diff --git a/google/services/storagecontrol/resource_storage_control_project_intelligence_config_generated_meta.yaml b/google/services/storagecontrol/resource_storage_control_project_intelligence_config_generated_meta.yaml index aeeb7fd8943..67bd8e177ec 100644 --- a/google/services/storagecontrol/resource_storage_control_project_intelligence_config_generated_meta.yaml +++ b/google/services/storagecontrol/resource_storage_control_project_intelligence_config_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_storage_control_project_intelligence_config' -generation_type: 'mmv1' -source_file: 'products/storagecontrol/ProjectIntelligenceConfig.yaml' -api_service_name: 'storage.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'IntelligenceConfig' +resource: google_storage_control_project_intelligence_config +generation_type: mmv1 +source_file: products/storagecontrol/ProjectIntelligenceConfig.yaml +api_service_name: storage.googleapis.com +api_version: v2 +api_resource_type_kind: IntelligenceConfig api_variant_patterns: - - 'projects/{project}/locations/{location}/intelligenceConfig' + - projects/{project}/locations/{location}/intelligenceConfig fields: - - api_field: 'editionConfig' - - api_field: 'effectiveIntelligenceConfig.effectiveEdition' - - api_field: 'effectiveIntelligenceConfig.intelligenceConfig' - - api_field: 'filter.excludedCloudStorageBuckets.bucketIdRegexes' - - api_field: 'filter.excludedCloudStorageLocations.locations' - - api_field: 'filter.includedCloudStorageBuckets.bucketIdRegexes' - - api_field: 'filter.includedCloudStorageLocations.locations' - - field: 'name' - provider_only: true - - api_field: 'trialConfig.expireTime' - - api_field: 'updateTime' + - api_field: editionConfig + - api_field: effectiveIntelligenceConfig.effectiveEdition + - api_field: effectiveIntelligenceConfig.intelligenceConfig + - api_field: filter.excludedCloudStorageBuckets.bucketIdRegexes + - api_field: filter.excludedCloudStorageLocations.locations + - api_field: filter.includedCloudStorageBuckets.bucketIdRegexes + - api_field: filter.includedCloudStorageLocations.locations + - field: name + provider_only: true + - api_field: trialConfig.expireTime + - api_field: updateTime diff --git a/google/services/storageinsights/resource_storage_insights_dataset_config.go b/google/services/storageinsights/resource_storage_insights_dataset_config.go index 66dcd149905..389619f2b01 100644 --- a/google/services/storageinsights/resource_storage_insights_dataset_config.go +++ b/google/services/storageinsights/resource_storage_insights_dataset_config.go @@ -166,6 +166,12 @@ func ResourceStorageInsightsDatasetConfig() *schema.Resource { Required: true, Description: `Number of days of history that must be retained.`, }, + "activity_data_retention_period_days": { + Type: schema.TypeInt, + Computed: true, + Optional: true, + Description: `Number of days of activity data that must be retained. If not specified, retentionPeriodDays will be used. Set to 0 to turn off the activity data.`, + }, "description": { Type: schema.TypeString, Optional: true, @@ -423,6 +429,12 @@ func resourceStorageInsightsDatasetConfigCreate(d *schema.ResourceData, meta int } else if v, ok := d.GetOkExists("retention_period_days"); !tpgresource.IsEmptyValue(reflect.ValueOf(retentionPeriodDaysProp)) && (ok || !reflect.DeepEqual(v, retentionPeriodDaysProp)) { obj["retentionPeriodDays"] = retentionPeriodDaysProp } + activityDataRetentionPeriodDaysProp, err := expandStorageInsightsDatasetConfigActivityDataRetentionPeriodDays(d.Get("activity_data_retention_period_days"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("activity_data_retention_period_days"); !tpgresource.IsEmptyValue(reflect.ValueOf(activityDataRetentionPeriodDaysProp)) && (ok || !reflect.DeepEqual(v, activityDataRetentionPeriodDaysProp)) { + obj["activityDataRetentionPeriodDays"] = activityDataRetentionPeriodDaysProp + } identityProp, err := expandStorageInsightsDatasetConfigIdentity(d.Get("identity"), d, config) if err != nil { return err @@ -658,6 +670,9 @@ func resourceStorageInsightsDatasetConfigRead(d *schema.ResourceData, meta inter if err := d.Set("retention_period_days", flattenStorageInsightsDatasetConfigRetentionPeriodDays(res["retentionPeriodDays"], d, config)); err != nil { return fmt.Errorf("Error reading DatasetConfig: %s", err) } + if err := d.Set("activity_data_retention_period_days", flattenStorageInsightsDatasetConfigActivityDataRetentionPeriodDays(res["activityDataRetentionPeriodDays"], d, config)); err != nil { + return fmt.Errorf("Error reading DatasetConfig: %s", err) + } if err := d.Set("link", flattenStorageInsightsDatasetConfigLink(res["link"], d, config)); err != nil { return fmt.Errorf("Error reading DatasetConfig: %s", err) } @@ -768,6 +783,12 @@ func resourceStorageInsightsDatasetConfigUpdate(d *schema.ResourceData, meta int } else if v, ok := d.GetOkExists("retention_period_days"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, retentionPeriodDaysProp)) { obj["retentionPeriodDays"] = retentionPeriodDaysProp } + activityDataRetentionPeriodDaysProp, err := expandStorageInsightsDatasetConfigActivityDataRetentionPeriodDays(d.Get("activity_data_retention_period_days"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("activity_data_retention_period_days"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, activityDataRetentionPeriodDaysProp)) { + obj["activityDataRetentionPeriodDays"] = activityDataRetentionPeriodDaysProp + } descriptionProp, err := expandStorageInsightsDatasetConfigDescription(d.Get("description"), d, config) if err != nil { return err @@ -834,6 +855,10 @@ func resourceStorageInsightsDatasetConfigUpdate(d *schema.ResourceData, meta int updateMask = append(updateMask, "retentionPeriodDays") } + if d.HasChange("activity_data_retention_period_days") { + updateMask = append(updateMask, "activityDataRetentionPeriodDays") + } + if d.HasChange("description") { updateMask = append(updateMask, "description") } @@ -1094,6 +1119,23 @@ func flattenStorageInsightsDatasetConfigRetentionPeriodDays(v interface{}, d *sc return v // let terraform core handle it otherwise } +func flattenStorageInsightsDatasetConfigActivityDataRetentionPeriodDays(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + // Handles the string fixed64 format + if strVal, ok := v.(string); ok { + if intVal, err := tpgresource.StringToFixed64(strVal); err == nil { + return intVal + } + } + + // number values are represented as float64 + if floatVal, ok := v.(float64); ok { + intVal := int(floatVal) + return intVal + } + + return v // let terraform core handle it otherwise +} + func flattenStorageInsightsDatasetConfigLink(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return nil @@ -1312,6 +1354,10 @@ func expandStorageInsightsDatasetConfigRetentionPeriodDays(v interface{}, d tpgr return v, nil } +func expandStorageInsightsDatasetConfigActivityDataRetentionPeriodDays(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandStorageInsightsDatasetConfigIdentity(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { if v == nil { return nil, nil diff --git a/google/services/storageinsights/resource_storage_insights_dataset_config_generated_meta.yaml b/google/services/storageinsights/resource_storage_insights_dataset_config_generated_meta.yaml index facf08a9e9f..025a15a6f38 100644 --- a/google/services/storageinsights/resource_storage_insights_dataset_config_generated_meta.yaml +++ b/google/services/storageinsights/resource_storage_insights_dataset_config_generated_meta.yaml @@ -1,35 +1,36 @@ -resource: 'google_storage_insights_dataset_config' -generation_type: 'mmv1' -source_file: 'products/storageinsights/DatasetConfig.yaml' -api_service_name: 'storageinsights.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DatasetConfig' +resource: google_storage_insights_dataset_config +generation_type: mmv1 +source_file: products/storageinsights/DatasetConfig.yaml +api_service_name: storageinsights.googleapis.com +api_version: v1 +api_resource_type_kind: DatasetConfig fields: - - api_field: 'createTime' - - field: 'dataset_config_id' - provider_only: true - - api_field: 'datasetConfigState' - - api_field: 'description' - - api_field: 'excludeCloudStorageBuckets.cloudStorageBuckets.bucketName' - - api_field: 'excludeCloudStorageBuckets.cloudStorageBuckets.bucketPrefixRegex' - - api_field: 'excludeCloudStorageLocations.locations' - - api_field: 'identity.name' - - api_field: 'identity.type' - - api_field: 'includeCloudStorageBuckets.cloudStorageBuckets.bucketName' - - api_field: 'includeCloudStorageBuckets.cloudStorageBuckets.bucketPrefixRegex' - - api_field: 'includeCloudStorageLocations.locations' - - api_field: 'includeNewlyCreatedBuckets' - - api_field: 'link.dataset' - - api_field: 'link.linked' - - field: 'link_dataset' - provider_only: true - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'organizationNumber' - - api_field: 'organizationScope' - - api_field: 'retentionPeriodDays' - - api_field: 'sourceFolders.folderNumbers' - - api_field: 'sourceProjects.projectNumbers' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: activityDataRetentionPeriodDays + - api_field: createTime + - field: dataset_config_id + provider_only: true + - api_field: datasetConfigState + - api_field: description + - api_field: excludeCloudStorageBuckets.cloudStorageBuckets.bucketName + - api_field: excludeCloudStorageBuckets.cloudStorageBuckets.bucketPrefixRegex + - api_field: excludeCloudStorageLocations.locations + - api_field: identity.name + - api_field: identity.type + - api_field: includeCloudStorageBuckets.cloudStorageBuckets.bucketName + - api_field: includeCloudStorageBuckets.cloudStorageBuckets.bucketPrefixRegex + - api_field: includeCloudStorageLocations.locations + - api_field: includeNewlyCreatedBuckets + - api_field: link.dataset + - api_field: link.linked + - field: link_dataset + provider_only: true + - field: location + provider_only: true + - api_field: name + - api_field: organizationNumber + - api_field: organizationScope + - api_field: retentionPeriodDays + - api_field: sourceFolders.folderNumbers + - api_field: sourceProjects.projectNumbers + - api_field: uid + - api_field: updateTime diff --git a/google/services/storageinsights/resource_storage_insights_dataset_config_generated_test.go b/google/services/storageinsights/resource_storage_insights_dataset_config_generated_test.go index 5299b92278a..edf6bf3335e 100644 --- a/google/services/storageinsights/resource_storage_insights_dataset_config_generated_test.go +++ b/google/services/storageinsights/resource_storage_insights_dataset_config_generated_test.go @@ -148,6 +148,7 @@ resource "google_storage_insights_dataset_config" "config_excludes" { location = "us-central1" dataset_config_id = "tf_test_my_config_excludes%{random_suffix}" retention_period_days = 1 + activity_data_retention_period_days = 2 organization_scope = true identity { type = "IDENTITY_TYPE_PER_PROJECT" diff --git a/google/services/storageinsights/resource_storage_insights_dataset_config_test.go b/google/services/storageinsights/resource_storage_insights_dataset_config_test.go index e1db9ce8330..c0b11bb919f 100644 --- a/google/services/storageinsights/resource_storage_insights_dataset_config_test.go +++ b/google/services/storageinsights/resource_storage_insights_dataset_config_test.go @@ -236,6 +236,7 @@ resource "google_storage_insights_dataset_config" "config" { location = "us-central1" dataset_config_id = "tf_test_my_config%{random_suffix}" retention_period_days = 1 + activity_data_retention_period_days = 2 source_folders { folder_numbers = ["123", "456"] } @@ -252,6 +253,7 @@ resource "google_storage_insights_dataset_config" "config" { location = "us-central1" dataset_config_id = "tf_test_my_config%{random_suffix}" retention_period_days = 1 + activity_data_retention_period_days = 0 organization_scope = true identity { type = "IDENTITY_TYPE_PER_CONFIG" diff --git a/google/services/storageinsights/resource_storage_insights_report_config_generated_meta.yaml b/google/services/storageinsights/resource_storage_insights_report_config_generated_meta.yaml index 89969719eab..dc6e1649901 100644 --- a/google/services/storageinsights/resource_storage_insights_report_config_generated_meta.yaml +++ b/google/services/storageinsights/resource_storage_insights_report_config_generated_meta.yaml @@ -1,28 +1,28 @@ -resource: 'google_storage_insights_report_config' -generation_type: 'mmv1' -source_file: 'products/storageinsights/ReportConfig.yaml' -api_service_name: 'storageinsights.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ReportConfig' +resource: google_storage_insights_report_config +generation_type: mmv1 +source_file: products/storageinsights/ReportConfig.yaml +api_service_name: storageinsights.googleapis.com +api_version: v1 +api_resource_type_kind: ReportConfig fields: - - api_field: 'csvOptions.delimiter' - - api_field: 'csvOptions.headerRequired' - - api_field: 'csvOptions.recordSeparator' - - api_field: 'displayName' - - field: 'force_destroy' - provider_only: true - - api_field: 'frequencyOptions.endDate.day' - - api_field: 'frequencyOptions.endDate.month' - - api_field: 'frequencyOptions.endDate.year' - - api_field: 'frequencyOptions.frequency' - - api_field: 'frequencyOptions.startDate.day' - - api_field: 'frequencyOptions.startDate.month' - - api_field: 'frequencyOptions.startDate.year' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'objectMetadataReportOptions.metadataFields' - - api_field: 'objectMetadataReportOptions.storageDestinationOptions.bucket' - - api_field: 'objectMetadataReportOptions.storageDestinationOptions.destinationPath' - - api_field: 'objectMetadataReportOptions.storageFilters.bucket' - - api_field: 'parquetOptions' + - api_field: csvOptions.delimiter + - api_field: csvOptions.headerRequired + - api_field: csvOptions.recordSeparator + - api_field: displayName + - field: force_destroy + provider_only: true + - api_field: frequencyOptions.endDate.day + - api_field: frequencyOptions.endDate.month + - api_field: frequencyOptions.endDate.year + - api_field: frequencyOptions.frequency + - api_field: frequencyOptions.startDate.day + - api_field: frequencyOptions.startDate.month + - api_field: frequencyOptions.startDate.year + - field: location + provider_only: true + - api_field: name + - api_field: objectMetadataReportOptions.metadataFields + - api_field: objectMetadataReportOptions.storageDestinationOptions.bucket + - api_field: objectMetadataReportOptions.storageDestinationOptions.destinationPath + - api_field: objectMetadataReportOptions.storageFilters.bucket + - api_field: parquetOptions diff --git a/google/services/storagetransfer/resource_storage_transfer_agent_pool_generated_meta.yaml b/google/services/storagetransfer/resource_storage_transfer_agent_pool_generated_meta.yaml index aebadff43b5..5653e116833 100644 --- a/google/services/storagetransfer/resource_storage_transfer_agent_pool_generated_meta.yaml +++ b/google/services/storagetransfer/resource_storage_transfer_agent_pool_generated_meta.yaml @@ -1,12 +1,12 @@ -resource: 'google_storage_transfer_agent_pool' -generation_type: 'mmv1' -source_file: 'products/storagetransfer/AgentPool.yaml' -api_service_name: 'storagetransfer.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'agentPools' +resource: google_storage_transfer_agent_pool +generation_type: mmv1 +source_file: products/storagetransfer/AgentPool.yaml +api_service_name: storagetransfer.googleapis.com +api_version: v1 +api_resource_type_kind: agentPools fields: - - api_field: 'bandwidthLimit.limitMbps' - - api_field: 'displayName' - - field: 'name' - provider_only: true - - api_field: 'state' + - api_field: bandwidthLimit.limitMbps + - api_field: displayName + - field: name + provider_only: true + - api_field: state diff --git a/google/services/tags/resource_tags_tag_binding_generated_meta.yaml b/google/services/tags/resource_tags_tag_binding_generated_meta.yaml index e17464503f4..5403070f996 100644 --- a/google/services/tags/resource_tags_tag_binding_generated_meta.yaml +++ b/google/services/tags/resource_tags_tag_binding_generated_meta.yaml @@ -1,10 +1,10 @@ -resource: 'google_tags_tag_binding' -generation_type: 'mmv1' -source_file: 'products/tags/TagBinding.yaml' -api_service_name: 'cloudresourcemanager.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'TagBinding' +resource: google_tags_tag_binding +generation_type: mmv1 +source_file: products/tags/TagBinding.yaml +api_service_name: cloudresourcemanager.googleapis.com +api_version: v3 +api_resource_type_kind: TagBinding fields: - - api_field: 'name' - - api_field: 'parent' - - api_field: 'tagValue' + - api_field: name + - api_field: parent + - api_field: tagValue diff --git a/google/services/tags/resource_tags_tag_key_generated_meta.yaml b/google/services/tags/resource_tags_tag_key_generated_meta.yaml index 4b2f24ef742..db94faaeb63 100644 --- a/google/services/tags/resource_tags_tag_key_generated_meta.yaml +++ b/google/services/tags/resource_tags_tag_key_generated_meta.yaml @@ -1,16 +1,16 @@ -resource: 'google_tags_tag_key' -generation_type: 'mmv1' -source_file: 'products/tags/TagKey.yaml' -api_service_name: 'cloudresourcemanager.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'TagKey' +resource: google_tags_tag_key +generation_type: mmv1 +source_file: products/tags/TagKey.yaml +api_service_name: cloudresourcemanager.googleapis.com +api_version: v3 +api_resource_type_kind: TagKey fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'name' - - api_field: 'namespacedName' - - api_field: 'parent' - - api_field: 'purpose' - - api_field: 'purposeData' - - api_field: 'shortName' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: name + - api_field: namespacedName + - api_field: parent + - api_field: purpose + - api_field: purposeData + - api_field: shortName + - api_field: updateTime diff --git a/google/services/tags/resource_tags_tag_value_generated_meta.yaml b/google/services/tags/resource_tags_tag_value_generated_meta.yaml index 5a6aa07059a..0822bf8429f 100644 --- a/google/services/tags/resource_tags_tag_value_generated_meta.yaml +++ b/google/services/tags/resource_tags_tag_value_generated_meta.yaml @@ -1,14 +1,14 @@ -resource: 'google_tags_tag_value' -generation_type: 'mmv1' -source_file: 'products/tags/TagValue.yaml' -api_service_name: 'cloudresourcemanager.googleapis.com' -api_version: 'v3' -api_resource_type_kind: 'TagValue' +resource: google_tags_tag_value +generation_type: mmv1 +source_file: products/tags/TagValue.yaml +api_service_name: cloudresourcemanager.googleapis.com +api_version: v3 +api_resource_type_kind: TagValue fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'name' - - api_field: 'namespacedName' - - api_field: 'parent' - - api_field: 'shortName' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: name + - api_field: namespacedName + - api_field: parent + - api_field: shortName + - api_field: updateTime diff --git a/google/services/transcoder/resource_transcoder_job_generated_meta.yaml b/google/services/transcoder/resource_transcoder_job_generated_meta.yaml index 14c93366a36..cea26449f3e 100644 --- a/google/services/transcoder/resource_transcoder_job_generated_meta.yaml +++ b/google/services/transcoder/resource_transcoder_job_generated_meta.yaml @@ -1,73 +1,73 @@ -resource: 'google_transcoder_job' -generation_type: 'mmv1' -source_file: 'products/transcoder/Job.yaml' -api_service_name: 'transcoder.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Job' +resource: google_transcoder_job +generation_type: mmv1 +source_file: products/transcoder/Job.yaml +api_service_name: transcoder.googleapis.com +api_version: v1 +api_resource_type_kind: Job fields: - - api_field: 'config.adBreaks.startTimeOffset' - - api_field: 'config.editList.inputs' - - api_field: 'config.editList.key' - - api_field: 'config.editList.startTimeOffset' - - api_field: 'config.elementaryStreams.audioStream.bitrateBps' - - api_field: 'config.elementaryStreams.audioStream.channelCount' - - api_field: 'config.elementaryStreams.audioStream.channelLayout' - - api_field: 'config.elementaryStreams.audioStream.codec' - - api_field: 'config.elementaryStreams.audioStream.sampleRateHertz' - - api_field: 'config.elementaryStreams.key' - - api_field: 'config.elementaryStreams.videoStream.h264.bitrateBps' - - api_field: 'config.elementaryStreams.videoStream.h264.crfLevel' - - api_field: 'config.elementaryStreams.videoStream.h264.entropyCoder' - - api_field: 'config.elementaryStreams.videoStream.h264.frameRate' - - api_field: 'config.elementaryStreams.videoStream.h264.gopDuration' - - api_field: 'config.elementaryStreams.videoStream.h264.heightPixels' - - api_field: 'config.elementaryStreams.videoStream.h264.hlg' - - api_field: 'config.elementaryStreams.videoStream.h264.pixelFormat' - - api_field: 'config.elementaryStreams.videoStream.h264.preset' - - api_field: 'config.elementaryStreams.videoStream.h264.profile' - - api_field: 'config.elementaryStreams.videoStream.h264.rateControlMode' - - api_field: 'config.elementaryStreams.videoStream.h264.sdr' - - api_field: 'config.elementaryStreams.videoStream.h264.vbvFullnessBits' - - api_field: 'config.elementaryStreams.videoStream.h264.vbvSizeBits' - - api_field: 'config.elementaryStreams.videoStream.h264.widthPixels' - - api_field: 'config.encryptions.aes128' - - api_field: 'config.encryptions.drmSystems.clearkey' - - api_field: 'config.encryptions.drmSystems.fairplay' - - api_field: 'config.encryptions.drmSystems.playready' - - api_field: 'config.encryptions.drmSystems.widevine' - - api_field: 'config.encryptions.id' - - api_field: 'config.encryptions.mpegCenc.scheme' - - api_field: 'config.encryptions.sampleAes' - - api_field: 'config.encryptions.secretManagerKeySource.secretVersion' - - api_field: 'config.inputs.key' - - api_field: 'config.inputs.uri' - - api_field: 'config.manifests.fileName' - - api_field: 'config.manifests.muxStreams' - - api_field: 'config.manifests.type' - - api_field: 'config.muxStreams.container' - - api_field: 'config.muxStreams.elementaryStreams' - - api_field: 'config.muxStreams.encryptionId' - - api_field: 'config.muxStreams.fileName' - - api_field: 'config.muxStreams.key' - - api_field: 'config.muxStreams.segmentSettings.segmentDuration' - - api_field: 'config.output.uri' - - api_field: 'config.overlays.animations.animationFade.endTimeOffset' - - api_field: 'config.overlays.animations.animationFade.fadeType' - - api_field: 'config.overlays.animations.animationFade.startTimeOffset' - - api_field: 'config.overlays.animations.animationFade.xy.x' - - api_field: 'config.overlays.animations.animationFade.xy.y' - - api_field: 'config.overlays.image.uri' - - api_field: 'config.pubsubDestination.topic' - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'endTime' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - api_field: 'startTime' - - api_field: 'state' - - api_field: 'templateId' - - field: 'terraform_labels' - provider_only: true + - api_field: config.adBreaks.startTimeOffset + - api_field: config.editList.inputs + - api_field: config.editList.key + - api_field: config.editList.startTimeOffset + - api_field: config.elementaryStreams.audioStream.bitrateBps + - api_field: config.elementaryStreams.audioStream.channelCount + - api_field: config.elementaryStreams.audioStream.channelLayout + - api_field: config.elementaryStreams.audioStream.codec + - api_field: config.elementaryStreams.audioStream.sampleRateHertz + - api_field: config.elementaryStreams.key + - api_field: config.elementaryStreams.videoStream.h264.bitrateBps + - api_field: config.elementaryStreams.videoStream.h264.crfLevel + - api_field: config.elementaryStreams.videoStream.h264.entropyCoder + - api_field: config.elementaryStreams.videoStream.h264.frameRate + - api_field: config.elementaryStreams.videoStream.h264.gopDuration + - api_field: config.elementaryStreams.videoStream.h264.heightPixels + - api_field: config.elementaryStreams.videoStream.h264.hlg + - api_field: config.elementaryStreams.videoStream.h264.pixelFormat + - api_field: config.elementaryStreams.videoStream.h264.preset + - api_field: config.elementaryStreams.videoStream.h264.profile + - api_field: config.elementaryStreams.videoStream.h264.rateControlMode + - api_field: config.elementaryStreams.videoStream.h264.sdr + - api_field: config.elementaryStreams.videoStream.h264.vbvFullnessBits + - api_field: config.elementaryStreams.videoStream.h264.vbvSizeBits + - api_field: config.elementaryStreams.videoStream.h264.widthPixels + - api_field: config.encryptions.aes128 + - api_field: config.encryptions.drmSystems.clearkey + - api_field: config.encryptions.drmSystems.fairplay + - api_field: config.encryptions.drmSystems.playready + - api_field: config.encryptions.drmSystems.widevine + - api_field: config.encryptions.id + - api_field: config.encryptions.mpegCenc.scheme + - api_field: config.encryptions.sampleAes + - api_field: config.encryptions.secretManagerKeySource.secretVersion + - api_field: config.inputs.key + - api_field: config.inputs.uri + - api_field: config.manifests.fileName + - api_field: config.manifests.muxStreams + - api_field: config.manifests.type + - api_field: config.muxStreams.container + - api_field: config.muxStreams.elementaryStreams + - api_field: config.muxStreams.encryptionId + - api_field: config.muxStreams.fileName + - api_field: config.muxStreams.key + - api_field: config.muxStreams.segmentSettings.segmentDuration + - api_field: config.output.uri + - api_field: config.overlays.animations.animationFade.endTimeOffset + - api_field: config.overlays.animations.animationFade.fadeType + - api_field: config.overlays.animations.animationFade.startTimeOffset + - api_field: config.overlays.animations.animationFade.xy.x + - api_field: config.overlays.animations.animationFade.xy.y + - api_field: config.overlays.image.uri + - api_field: config.pubsubDestination.topic + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: endTime + - api_field: labels + - field: location + provider_only: true + - api_field: name + - api_field: startTime + - api_field: state + - api_field: templateId + - field: terraform_labels + provider_only: true diff --git a/google/services/transcoder/resource_transcoder_job_template_generated_meta.yaml b/google/services/transcoder/resource_transcoder_job_template_generated_meta.yaml index 34047918fa0..442ae5fa0f7 100644 --- a/google/services/transcoder/resource_transcoder_job_template_generated_meta.yaml +++ b/google/services/transcoder/resource_transcoder_job_template_generated_meta.yaml @@ -1,70 +1,70 @@ -resource: 'google_transcoder_job_template' -generation_type: 'mmv1' -source_file: 'products/transcoder/JobTemplate.yaml' -api_service_name: 'transcoder.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'JobTemplate' +resource: google_transcoder_job_template +generation_type: mmv1 +source_file: products/transcoder/JobTemplate.yaml +api_service_name: transcoder.googleapis.com +api_version: v1 +api_resource_type_kind: JobTemplate fields: - - api_field: 'config.adBreaks.startTimeOffset' - - api_field: 'config.editList.inputs' - - api_field: 'config.editList.key' - - api_field: 'config.editList.startTimeOffset' - - api_field: 'config.elementaryStreams.audioStream.bitrateBps' - - api_field: 'config.elementaryStreams.audioStream.channelCount' - - api_field: 'config.elementaryStreams.audioStream.channelLayout' - - api_field: 'config.elementaryStreams.audioStream.codec' - - api_field: 'config.elementaryStreams.audioStream.sampleRateHertz' - - api_field: 'config.elementaryStreams.key' - - api_field: 'config.elementaryStreams.videoStream.h264.bitrateBps' - - api_field: 'config.elementaryStreams.videoStream.h264.crfLevel' - - api_field: 'config.elementaryStreams.videoStream.h264.entropyCoder' - - api_field: 'config.elementaryStreams.videoStream.h264.frameRate' - - api_field: 'config.elementaryStreams.videoStream.h264.gopDuration' - - api_field: 'config.elementaryStreams.videoStream.h264.heightPixels' - - api_field: 'config.elementaryStreams.videoStream.h264.hlg' - - api_field: 'config.elementaryStreams.videoStream.h264.pixelFormat' - - api_field: 'config.elementaryStreams.videoStream.h264.preset' - - api_field: 'config.elementaryStreams.videoStream.h264.profile' - - api_field: 'config.elementaryStreams.videoStream.h264.rateControlMode' - - api_field: 'config.elementaryStreams.videoStream.h264.sdr' - - api_field: 'config.elementaryStreams.videoStream.h264.vbvFullnessBits' - - api_field: 'config.elementaryStreams.videoStream.h264.vbvSizeBits' - - api_field: 'config.elementaryStreams.videoStream.h264.widthPixels' - - api_field: 'config.encryptions.aes128' - - api_field: 'config.encryptions.drmSystems.clearkey' - - api_field: 'config.encryptions.drmSystems.fairplay' - - api_field: 'config.encryptions.drmSystems.playready' - - api_field: 'config.encryptions.drmSystems.widevine' - - api_field: 'config.encryptions.id' - - api_field: 'config.encryptions.mpegCenc.scheme' - - api_field: 'config.encryptions.sampleAes' - - api_field: 'config.encryptions.secretManagerKeySource.secretVersion' - - api_field: 'config.inputs.key' - - api_field: 'config.inputs.uri' - - api_field: 'config.manifests.fileName' - - api_field: 'config.manifests.muxStreams' - - api_field: 'config.manifests.type' - - api_field: 'config.muxStreams.container' - - api_field: 'config.muxStreams.elementaryStreams' - - api_field: 'config.muxStreams.encryptionId' - - api_field: 'config.muxStreams.fileName' - - api_field: 'config.muxStreams.key' - - api_field: 'config.muxStreams.segmentSettings.segmentDuration' - - api_field: 'config.output.uri' - - api_field: 'config.overlays.animations.animationFade.endTimeOffset' - - api_field: 'config.overlays.animations.animationFade.fadeType' - - api_field: 'config.overlays.animations.animationFade.startTimeOffset' - - api_field: 'config.overlays.animations.animationFade.xy.x' - - api_field: 'config.overlays.animations.animationFade.xy.y' - - api_field: 'config.overlays.image.uri' - - api_field: 'config.pubsubDestination.topic' - - field: 'effective_labels' - provider_only: true - - field: 'job_template_id' - provider_only: true - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'name' - - field: 'terraform_labels' - provider_only: true + - api_field: config.adBreaks.startTimeOffset + - api_field: config.editList.inputs + - api_field: config.editList.key + - api_field: config.editList.startTimeOffset + - api_field: config.elementaryStreams.audioStream.bitrateBps + - api_field: config.elementaryStreams.audioStream.channelCount + - api_field: config.elementaryStreams.audioStream.channelLayout + - api_field: config.elementaryStreams.audioStream.codec + - api_field: config.elementaryStreams.audioStream.sampleRateHertz + - api_field: config.elementaryStreams.key + - api_field: config.elementaryStreams.videoStream.h264.bitrateBps + - api_field: config.elementaryStreams.videoStream.h264.crfLevel + - api_field: config.elementaryStreams.videoStream.h264.entropyCoder + - api_field: config.elementaryStreams.videoStream.h264.frameRate + - api_field: config.elementaryStreams.videoStream.h264.gopDuration + - api_field: config.elementaryStreams.videoStream.h264.heightPixels + - api_field: config.elementaryStreams.videoStream.h264.hlg + - api_field: config.elementaryStreams.videoStream.h264.pixelFormat + - api_field: config.elementaryStreams.videoStream.h264.preset + - api_field: config.elementaryStreams.videoStream.h264.profile + - api_field: config.elementaryStreams.videoStream.h264.rateControlMode + - api_field: config.elementaryStreams.videoStream.h264.sdr + - api_field: config.elementaryStreams.videoStream.h264.vbvFullnessBits + - api_field: config.elementaryStreams.videoStream.h264.vbvSizeBits + - api_field: config.elementaryStreams.videoStream.h264.widthPixels + - api_field: config.encryptions.aes128 + - api_field: config.encryptions.drmSystems.clearkey + - api_field: config.encryptions.drmSystems.fairplay + - api_field: config.encryptions.drmSystems.playready + - api_field: config.encryptions.drmSystems.widevine + - api_field: config.encryptions.id + - api_field: config.encryptions.mpegCenc.scheme + - api_field: config.encryptions.sampleAes + - api_field: config.encryptions.secretManagerKeySource.secretVersion + - api_field: config.inputs.key + - api_field: config.inputs.uri + - api_field: config.manifests.fileName + - api_field: config.manifests.muxStreams + - api_field: config.manifests.type + - api_field: config.muxStreams.container + - api_field: config.muxStreams.elementaryStreams + - api_field: config.muxStreams.encryptionId + - api_field: config.muxStreams.fileName + - api_field: config.muxStreams.key + - api_field: config.muxStreams.segmentSettings.segmentDuration + - api_field: config.output.uri + - api_field: config.overlays.animations.animationFade.endTimeOffset + - api_field: config.overlays.animations.animationFade.fadeType + - api_field: config.overlays.animations.animationFade.startTimeOffset + - api_field: config.overlays.animations.animationFade.xy.x + - api_field: config.overlays.animations.animationFade.xy.y + - api_field: config.overlays.image.uri + - api_field: config.pubsubDestination.topic + - field: effective_labels + provider_only: true + - field: job_template_id + provider_only: true + - api_field: labels + - field: location + provider_only: true + - api_field: name + - field: terraform_labels + provider_only: true diff --git a/google/services/vertexai/resource_vertex_ai_cache_config_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_cache_config_generated_meta.yaml index 4ebde12c1ea..ee85e250eed 100644 --- a/google/services/vertexai/resource_vertex_ai_cache_config_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_cache_config_generated_meta.yaml @@ -1,9 +1,9 @@ -resource: 'google_vertex_ai_cache_config' -generation_type: 'mmv1' -source_file: 'products/vertexai/CacheConfig.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'CacheConfig' +resource: google_vertex_ai_cache_config +generation_type: mmv1 +source_file: products/vertexai/CacheConfig.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: CacheConfig fields: - - api_field: 'disableCache' - - api_field: 'name' + - api_field: disableCache + - api_field: name diff --git a/google/services/vertexai/resource_vertex_ai_dataset_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_dataset_generated_meta.yaml index 75998bb0e39..00c81a26e56 100644 --- a/google/services/vertexai/resource_vertex_ai_dataset_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_dataset_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_vertex_ai_dataset' -generation_type: 'mmv1' -source_file: 'products/vertexai/Dataset.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Dataset' +resource: google_vertex_ai_dataset +generation_type: mmv1 +source_file: products/vertexai/Dataset.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Dataset api_variant_patterns: - - 'projects/{project}/locations/{location}/datasets/{dataset}' + - projects/{project}/locations/{location}/datasets/{dataset} fields: - - api_field: 'createTime' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'labels' - - api_field: 'metadataSchemaUri' - - api_field: 'name' - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: labels + - api_field: metadataSchemaUri + - api_field: name + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_deployment_resource_pool_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_deployment_resource_pool_generated_meta.yaml index f8dc8d16e2e..70e1b982859 100644 --- a/google/services/vertexai/resource_vertex_ai_deployment_resource_pool_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_deployment_resource_pool_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_vertex_ai_deployment_resource_pool' -generation_type: 'mmv1' -source_file: 'products/vertexai/DeploymentResourcePool.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'DeploymentResourcePool' +resource: google_vertex_ai_deployment_resource_pool +generation_type: mmv1 +source_file: products/vertexai/DeploymentResourcePool.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: DeploymentResourcePool fields: - - api_field: 'createTime' - - api_field: 'dedicatedResources.autoscalingMetricSpecs.metricName' - - api_field: 'dedicatedResources.autoscalingMetricSpecs.target' - - api_field: 'dedicatedResources.machineSpec.acceleratorCount' - - api_field: 'dedicatedResources.machineSpec.acceleratorType' - - api_field: 'dedicatedResources.machineSpec.machineType' - - api_field: 'dedicatedResources.maxReplicaCount' - - api_field: 'dedicatedResources.minReplicaCount' - - api_field: 'name' - - field: 'region' - provider_only: true + - api_field: createTime + - api_field: dedicatedResources.autoscalingMetricSpecs.metricName + - api_field: dedicatedResources.autoscalingMetricSpecs.target + - api_field: dedicatedResources.machineSpec.acceleratorCount + - api_field: dedicatedResources.machineSpec.acceleratorType + - api_field: dedicatedResources.machineSpec.machineType + - api_field: dedicatedResources.maxReplicaCount + - api_field: dedicatedResources.minReplicaCount + - api_field: name + - field: region + provider_only: true diff --git a/google/services/vertexai/resource_vertex_ai_endpoint_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_endpoint_generated_meta.yaml index 3ab5747f0d8..d0f48fd1fa0 100644 --- a/google/services/vertexai/resource_vertex_ai_endpoint_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_endpoint_generated_meta.yaml @@ -1,65 +1,65 @@ -resource: 'google_vertex_ai_endpoint' -generation_type: 'mmv1' -source_file: 'products/vertexai/Endpoint.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Endpoint' +resource: google_vertex_ai_endpoint +generation_type: mmv1 +source_file: products/vertexai/Endpoint.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Endpoint api_variant_patterns: - - 'projects/{project}/locations/{location}/endpoints/{endpoint}' + - projects/{project}/locations/{location}/endpoints/{endpoint} fields: - - api_field: 'createTime' - - api_field: 'dedicatedEndpointDns' - - api_field: 'dedicatedEndpointEnabled' - - api_field: 'deployedModels.automaticResources.maxReplicaCount' - - api_field: 'deployedModels.automaticResources.minReplicaCount' - - api_field: 'deployedModels.createTime' - - api_field: 'deployedModels.dedicatedResources.autoscalingMetricSpecs.metricName' - - api_field: 'deployedModels.dedicatedResources.autoscalingMetricSpecs.target' - - api_field: 'deployedModels.dedicatedResources.machineSpec.acceleratorCount' - - api_field: 'deployedModels.dedicatedResources.machineSpec.acceleratorType' - - api_field: 'deployedModels.dedicatedResources.machineSpec.machineType' - - api_field: 'deployedModels.dedicatedResources.maxReplicaCount' - - api_field: 'deployedModels.dedicatedResources.minReplicaCount' - - api_field: 'deployedModels.displayName' - - api_field: 'deployedModels.enableAccessLogging' - - api_field: 'deployedModels.enableContainerLogging' - - api_field: 'deployedModels.id' - - api_field: 'deployedModels.model' - - api_field: 'deployedModels.modelVersionId' - - api_field: 'deployedModels.privateEndpoints.explainHttpUri' - - api_field: 'deployedModels.privateEndpoints.healthHttpUri' - - api_field: 'deployedModels.privateEndpoints.predictHttpUri' - - api_field: 'deployedModels.privateEndpoints.serviceAttachment' - - api_field: 'deployedModels.serviceAccount' - - api_field: 'deployedModels.sharedResources' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'etag' - - api_field: 'labels' - - field: 'location' - provider_only: true - - api_field: 'modelDeploymentMonitoringJob' - - field: 'name' - provider_only: true - - api_field: 'network' - - api_field: 'predictRequestResponseLoggingConfig.bigqueryDestination.outputUri' - - api_field: 'predictRequestResponseLoggingConfig.enabled' - - api_field: 'predictRequestResponseLoggingConfig.samplingRate' - - api_field: 'privateServiceConnectConfig.enablePrivateServiceConnect' - - api_field: 'privateServiceConnectConfig.projectAllowlist' - - api_field: 'privateServiceConnectConfig.pscAutomationConfigs.errorMessage' - - api_field: 'privateServiceConnectConfig.pscAutomationConfigs.forwardingRule' - - api_field: 'privateServiceConnectConfig.pscAutomationConfigs.ipAddress' - - api_field: 'privateServiceConnectConfig.pscAutomationConfigs.network' - - api_field: 'privateServiceConnectConfig.pscAutomationConfigs.projectId' - - api_field: 'privateServiceConnectConfig.pscAutomationConfigs.state' - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'trafficSplit' - json: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: dedicatedEndpointDns + - api_field: dedicatedEndpointEnabled + - api_field: deployedModels.automaticResources.maxReplicaCount + - api_field: deployedModels.automaticResources.minReplicaCount + - api_field: deployedModels.createTime + - api_field: deployedModels.dedicatedResources.autoscalingMetricSpecs.metricName + - api_field: deployedModels.dedicatedResources.autoscalingMetricSpecs.target + - api_field: deployedModels.dedicatedResources.machineSpec.acceleratorCount + - api_field: deployedModels.dedicatedResources.machineSpec.acceleratorType + - api_field: deployedModels.dedicatedResources.machineSpec.machineType + - api_field: deployedModels.dedicatedResources.maxReplicaCount + - api_field: deployedModels.dedicatedResources.minReplicaCount + - api_field: deployedModels.displayName + - api_field: deployedModels.enableAccessLogging + - api_field: deployedModels.enableContainerLogging + - api_field: deployedModels.id + - api_field: deployedModels.model + - api_field: deployedModels.modelVersionId + - api_field: deployedModels.privateEndpoints.explainHttpUri + - api_field: deployedModels.privateEndpoints.healthHttpUri + - api_field: deployedModels.privateEndpoints.predictHttpUri + - api_field: deployedModels.privateEndpoints.serviceAttachment + - api_field: deployedModels.serviceAccount + - api_field: deployedModels.sharedResources + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: etag + - api_field: labels + - field: location + provider_only: true + - api_field: modelDeploymentMonitoringJob + - field: name + provider_only: true + - api_field: network + - api_field: predictRequestResponseLoggingConfig.bigqueryDestination.outputUri + - api_field: predictRequestResponseLoggingConfig.enabled + - api_field: predictRequestResponseLoggingConfig.samplingRate + - api_field: privateServiceConnectConfig.enablePrivateServiceConnect + - api_field: privateServiceConnectConfig.projectAllowlist + - api_field: privateServiceConnectConfig.pscAutomationConfigs.errorMessage + - api_field: privateServiceConnectConfig.pscAutomationConfigs.forwardingRule + - api_field: privateServiceConnectConfig.pscAutomationConfigs.ipAddress + - api_field: privateServiceConnectConfig.pscAutomationConfigs.network + - api_field: privateServiceConnectConfig.pscAutomationConfigs.projectId + - api_field: privateServiceConnectConfig.pscAutomationConfigs.state + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: trafficSplit + json: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_endpoint_with_model_garden_deployment_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_endpoint_with_model_garden_deployment_generated_meta.yaml index 1d584126b8d..f1ef42480e6 100644 --- a/google/services/vertexai/resource_vertex_ai_endpoint_with_model_garden_deployment_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_endpoint_with_model_garden_deployment_generated_meta.yaml @@ -1,106 +1,106 @@ -resource: 'google_vertex_ai_endpoint_with_model_garden_deployment' -generation_type: 'mmv1' -source_file: 'products/vertexai/EndpointWithModelGardenDeployment.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Endpoint' +resource: google_vertex_ai_endpoint_with_model_garden_deployment +generation_type: mmv1 +source_file: products/vertexai/EndpointWithModelGardenDeployment.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Endpoint autogen_status: true fields: - - api_field: 'deployConfig.dedicatedResources.autoscalingMetricSpecs.metricName' - - api_field: 'deployConfig.dedicatedResources.autoscalingMetricSpecs.target' - - api_field: 'deployConfig.dedicatedResources.machineSpec.acceleratorCount' - - api_field: 'deployConfig.dedicatedResources.machineSpec.acceleratorType' - - api_field: 'deployConfig.dedicatedResources.machineSpec.machineType' - - api_field: 'deployConfig.dedicatedResources.machineSpec.multihostGpuNodeCount' - - api_field: 'deployConfig.dedicatedResources.machineSpec.reservationAffinity.key' - - api_field: 'deployConfig.dedicatedResources.machineSpec.reservationAffinity.reservationAffinityType' - - api_field: 'deployConfig.dedicatedResources.machineSpec.reservationAffinity.values' - - api_field: 'deployConfig.dedicatedResources.machineSpec.tpuTopology' - - api_field: 'deployConfig.dedicatedResources.maxReplicaCount' - - api_field: 'deployConfig.dedicatedResources.minReplicaCount' - - api_field: 'deployConfig.dedicatedResources.requiredReplicaCount' - - api_field: 'deployConfig.dedicatedResources.spot' - - api_field: 'deployConfig.fastTryoutEnabled' - - api_field: 'deployConfig.systemLabels' - - api_field: 'deployedModelDisplayName' - - api_field: 'deployedModelId' - - field: 'endpoint' - provider_only: true - - api_field: 'endpointConfig.dedicatedEndpointEnabled' - - api_field: 'endpointConfig.endpointDisplayName' - - api_field: 'endpointConfig.privateServiceConnectConfig.enablePrivateServiceConnect' - - api_field: 'endpointConfig.privateServiceConnectConfig.projectAllowlist' - - api_field: 'endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.errorMessage' - - api_field: 'endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.forwardingRule' - - api_field: 'endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.ipAddress' - - api_field: 'endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.network' - - api_field: 'endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.projectId' - - api_field: 'endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.state' - - api_field: 'endpointConfig.privateServiceConnectConfig.serviceAttachment' - - api_field: 'huggingFaceModelId' - - field: 'location' - provider_only: true - - api_field: 'modelConfig.acceptEula' - - api_field: 'modelConfig.containerSpec.args' - - api_field: 'modelConfig.containerSpec.command' - - api_field: 'modelConfig.containerSpec.deploymentTimeout' - - api_field: 'modelConfig.containerSpec.env.name' - - api_field: 'modelConfig.containerSpec.env.value' - - api_field: 'modelConfig.containerSpec.grpcPorts.containerPort' - - api_field: 'modelConfig.containerSpec.healthProbe.exec.command' - - api_field: 'modelConfig.containerSpec.healthProbe.failureThreshold' - - api_field: 'modelConfig.containerSpec.healthProbe.grpc.port' - - api_field: 'modelConfig.containerSpec.healthProbe.grpc.service' - - api_field: 'modelConfig.containerSpec.healthProbe.httpGet.host' - - api_field: 'modelConfig.containerSpec.healthProbe.httpGet.httpHeaders.name' - - api_field: 'modelConfig.containerSpec.healthProbe.httpGet.httpHeaders.value' - - api_field: 'modelConfig.containerSpec.healthProbe.httpGet.path' - - api_field: 'modelConfig.containerSpec.healthProbe.httpGet.port' - - api_field: 'modelConfig.containerSpec.healthProbe.httpGet.scheme' - - api_field: 'modelConfig.containerSpec.healthProbe.initialDelaySeconds' - - api_field: 'modelConfig.containerSpec.healthProbe.periodSeconds' - - api_field: 'modelConfig.containerSpec.healthProbe.successThreshold' - - api_field: 'modelConfig.containerSpec.healthProbe.tcpSocket.host' - - api_field: 'modelConfig.containerSpec.healthProbe.tcpSocket.port' - - api_field: 'modelConfig.containerSpec.healthProbe.timeoutSeconds' - - api_field: 'modelConfig.containerSpec.healthRoute' - - api_field: 'modelConfig.containerSpec.imageUri' - - api_field: 'modelConfig.containerSpec.livenessProbe.exec.command' - - api_field: 'modelConfig.containerSpec.livenessProbe.failureThreshold' - - api_field: 'modelConfig.containerSpec.livenessProbe.grpc.port' - - api_field: 'modelConfig.containerSpec.livenessProbe.grpc.service' - - api_field: 'modelConfig.containerSpec.livenessProbe.httpGet.host' - - api_field: 'modelConfig.containerSpec.livenessProbe.httpGet.httpHeaders.name' - - api_field: 'modelConfig.containerSpec.livenessProbe.httpGet.httpHeaders.value' - - api_field: 'modelConfig.containerSpec.livenessProbe.httpGet.path' - - api_field: 'modelConfig.containerSpec.livenessProbe.httpGet.port' - - api_field: 'modelConfig.containerSpec.livenessProbe.httpGet.scheme' - - api_field: 'modelConfig.containerSpec.livenessProbe.initialDelaySeconds' - - api_field: 'modelConfig.containerSpec.livenessProbe.periodSeconds' - - api_field: 'modelConfig.containerSpec.livenessProbe.successThreshold' - - api_field: 'modelConfig.containerSpec.livenessProbe.tcpSocket.host' - - api_field: 'modelConfig.containerSpec.livenessProbe.tcpSocket.port' - - api_field: 'modelConfig.containerSpec.livenessProbe.timeoutSeconds' - - api_field: 'modelConfig.containerSpec.ports.containerPort' - - api_field: 'modelConfig.containerSpec.predictRoute' - - api_field: 'modelConfig.containerSpec.sharedMemorySizeMb' - - api_field: 'modelConfig.containerSpec.startupProbe.exec.command' - - api_field: 'modelConfig.containerSpec.startupProbe.failureThreshold' - - api_field: 'modelConfig.containerSpec.startupProbe.grpc.port' - - api_field: 'modelConfig.containerSpec.startupProbe.grpc.service' - - api_field: 'modelConfig.containerSpec.startupProbe.httpGet.host' - - api_field: 'modelConfig.containerSpec.startupProbe.httpGet.httpHeaders.name' - - api_field: 'modelConfig.containerSpec.startupProbe.httpGet.httpHeaders.value' - - api_field: 'modelConfig.containerSpec.startupProbe.httpGet.path' - - api_field: 'modelConfig.containerSpec.startupProbe.httpGet.port' - - api_field: 'modelConfig.containerSpec.startupProbe.httpGet.scheme' - - api_field: 'modelConfig.containerSpec.startupProbe.initialDelaySeconds' - - api_field: 'modelConfig.containerSpec.startupProbe.periodSeconds' - - api_field: 'modelConfig.containerSpec.startupProbe.successThreshold' - - api_field: 'modelConfig.containerSpec.startupProbe.tcpSocket.host' - - api_field: 'modelConfig.containerSpec.startupProbe.tcpSocket.port' - - api_field: 'modelConfig.containerSpec.startupProbe.timeoutSeconds' - - api_field: 'modelConfig.huggingFaceAccessToken' - - api_field: 'modelConfig.huggingFaceCacheEnabled' - - api_field: 'modelConfig.modelDisplayName' - - api_field: 'publisherModelName' + - api_field: deployConfig.dedicatedResources.autoscalingMetricSpecs.metricName + - api_field: deployConfig.dedicatedResources.autoscalingMetricSpecs.target + - api_field: deployConfig.dedicatedResources.machineSpec.acceleratorCount + - api_field: deployConfig.dedicatedResources.machineSpec.acceleratorType + - api_field: deployConfig.dedicatedResources.machineSpec.machineType + - api_field: deployConfig.dedicatedResources.machineSpec.multihostGpuNodeCount + - api_field: deployConfig.dedicatedResources.machineSpec.reservationAffinity.key + - api_field: deployConfig.dedicatedResources.machineSpec.reservationAffinity.reservationAffinityType + - api_field: deployConfig.dedicatedResources.machineSpec.reservationAffinity.values + - api_field: deployConfig.dedicatedResources.machineSpec.tpuTopology + - api_field: deployConfig.dedicatedResources.maxReplicaCount + - api_field: deployConfig.dedicatedResources.minReplicaCount + - api_field: deployConfig.dedicatedResources.requiredReplicaCount + - api_field: deployConfig.dedicatedResources.spot + - api_field: deployConfig.fastTryoutEnabled + - api_field: deployConfig.systemLabels + - api_field: deployedModelDisplayName + - api_field: deployedModelId + - field: endpoint + provider_only: true + - api_field: endpointConfig.dedicatedEndpointEnabled + - api_field: endpointConfig.endpointDisplayName + - api_field: endpointConfig.privateServiceConnectConfig.enablePrivateServiceConnect + - api_field: endpointConfig.privateServiceConnectConfig.projectAllowlist + - api_field: endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.errorMessage + - api_field: endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.forwardingRule + - api_field: endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.ipAddress + - api_field: endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.network + - api_field: endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.projectId + - api_field: endpointConfig.privateServiceConnectConfig.pscAutomationConfigs.state + - api_field: endpointConfig.privateServiceConnectConfig.serviceAttachment + - api_field: huggingFaceModelId + - field: location + provider_only: true + - api_field: modelConfig.acceptEula + - api_field: modelConfig.containerSpec.args + - api_field: modelConfig.containerSpec.command + - api_field: modelConfig.containerSpec.deploymentTimeout + - api_field: modelConfig.containerSpec.env.name + - api_field: modelConfig.containerSpec.env.value + - api_field: modelConfig.containerSpec.grpcPorts.containerPort + - api_field: modelConfig.containerSpec.healthProbe.exec.command + - api_field: modelConfig.containerSpec.healthProbe.failureThreshold + - api_field: modelConfig.containerSpec.healthProbe.grpc.port + - api_field: modelConfig.containerSpec.healthProbe.grpc.service + - api_field: modelConfig.containerSpec.healthProbe.httpGet.host + - api_field: modelConfig.containerSpec.healthProbe.httpGet.httpHeaders.name + - api_field: modelConfig.containerSpec.healthProbe.httpGet.httpHeaders.value + - api_field: modelConfig.containerSpec.healthProbe.httpGet.path + - api_field: modelConfig.containerSpec.healthProbe.httpGet.port + - api_field: modelConfig.containerSpec.healthProbe.httpGet.scheme + - api_field: modelConfig.containerSpec.healthProbe.initialDelaySeconds + - api_field: modelConfig.containerSpec.healthProbe.periodSeconds + - api_field: modelConfig.containerSpec.healthProbe.successThreshold + - api_field: modelConfig.containerSpec.healthProbe.tcpSocket.host + - api_field: modelConfig.containerSpec.healthProbe.tcpSocket.port + - api_field: modelConfig.containerSpec.healthProbe.timeoutSeconds + - api_field: modelConfig.containerSpec.healthRoute + - api_field: modelConfig.containerSpec.imageUri + - api_field: modelConfig.containerSpec.livenessProbe.exec.command + - api_field: modelConfig.containerSpec.livenessProbe.failureThreshold + - api_field: modelConfig.containerSpec.livenessProbe.grpc.port + - api_field: modelConfig.containerSpec.livenessProbe.grpc.service + - api_field: modelConfig.containerSpec.livenessProbe.httpGet.host + - api_field: modelConfig.containerSpec.livenessProbe.httpGet.httpHeaders.name + - api_field: modelConfig.containerSpec.livenessProbe.httpGet.httpHeaders.value + - api_field: modelConfig.containerSpec.livenessProbe.httpGet.path + - api_field: modelConfig.containerSpec.livenessProbe.httpGet.port + - api_field: modelConfig.containerSpec.livenessProbe.httpGet.scheme + - api_field: modelConfig.containerSpec.livenessProbe.initialDelaySeconds + - api_field: modelConfig.containerSpec.livenessProbe.periodSeconds + - api_field: modelConfig.containerSpec.livenessProbe.successThreshold + - api_field: modelConfig.containerSpec.livenessProbe.tcpSocket.host + - api_field: modelConfig.containerSpec.livenessProbe.tcpSocket.port + - api_field: modelConfig.containerSpec.livenessProbe.timeoutSeconds + - api_field: modelConfig.containerSpec.ports.containerPort + - api_field: modelConfig.containerSpec.predictRoute + - api_field: modelConfig.containerSpec.sharedMemorySizeMb + - api_field: modelConfig.containerSpec.startupProbe.exec.command + - api_field: modelConfig.containerSpec.startupProbe.failureThreshold + - api_field: modelConfig.containerSpec.startupProbe.grpc.port + - api_field: modelConfig.containerSpec.startupProbe.grpc.service + - api_field: modelConfig.containerSpec.startupProbe.httpGet.host + - api_field: modelConfig.containerSpec.startupProbe.httpGet.httpHeaders.name + - api_field: modelConfig.containerSpec.startupProbe.httpGet.httpHeaders.value + - api_field: modelConfig.containerSpec.startupProbe.httpGet.path + - api_field: modelConfig.containerSpec.startupProbe.httpGet.port + - api_field: modelConfig.containerSpec.startupProbe.httpGet.scheme + - api_field: modelConfig.containerSpec.startupProbe.initialDelaySeconds + - api_field: modelConfig.containerSpec.startupProbe.periodSeconds + - api_field: modelConfig.containerSpec.startupProbe.successThreshold + - api_field: modelConfig.containerSpec.startupProbe.tcpSocket.host + - api_field: modelConfig.containerSpec.startupProbe.tcpSocket.port + - api_field: modelConfig.containerSpec.startupProbe.timeoutSeconds + - api_field: modelConfig.huggingFaceAccessToken + - api_field: modelConfig.huggingFaceCacheEnabled + - api_field: modelConfig.modelDisplayName + - api_field: publisherModelName diff --git a/google/services/vertexai/resource_vertex_ai_feature_group_feature_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_feature_group_feature_generated_meta.yaml index 5d9e7ef293a..d51c3c5e048 100644 --- a/google/services/vertexai/resource_vertex_ai_feature_group_feature_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_feature_group_feature_generated_meta.yaml @@ -1,24 +1,24 @@ -resource: 'google_vertex_ai_feature_group_feature' -generation_type: 'mmv1' -source_file: 'products/vertexai/FeatureGroupFeature.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Feature' +resource: google_vertex_ai_feature_group_feature +generation_type: mmv1 +source_file: products/vertexai/FeatureGroupFeature.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Feature api_variant_patterns: - - 'projects/{project}/locations/{location}/featureGroups/{featureGroup}/features/{feature}' + - projects/{project}/locations/{location}/featureGroups/{featureGroup}/features/{feature} fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - field: 'feature_group' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'versionColumnName' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - field: feature_group + provider_only: true + - api_field: labels + - field: name + provider_only: true + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: versionColumnName diff --git a/google/services/vertexai/resource_vertex_ai_feature_group_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_feature_group_generated_meta.yaml index 6eb09e9096f..e181178ab74 100644 --- a/google/services/vertexai/resource_vertex_ai_feature_group_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_feature_group_generated_meta.yaml @@ -1,21 +1,21 @@ -resource: 'google_vertex_ai_feature_group' -generation_type: 'mmv1' -source_file: 'products/vertexai/FeatureGroup.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FeatureGroup' +resource: google_vertex_ai_feature_group +generation_type: mmv1 +source_file: products/vertexai/FeatureGroup.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: FeatureGroup fields: - - api_field: 'bigQuery.bigQuerySource.inputUri' - - api_field: 'bigQuery.entityIdColumns' - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - api_field: 'name' - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: bigQuery.bigQuerySource.inputUri + - api_field: bigQuery.entityIdColumns + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - api_field: labels + - api_field: name + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_feature_online_store.go b/google/services/vertexai/resource_vertex_ai_feature_online_store.go index f80845ab897..bf8c0ba6ae1 100644 --- a/google/services/vertexai/resource_vertex_ai_feature_online_store.go +++ b/google/services/vertexai/resource_vertex_ai_feature_online_store.go @@ -167,6 +167,17 @@ func ResourceVertexAIFeatureOnlineStore() *schema.Resource { }, }, }, + "enable_direct_bigtable_access": { + Type: schema.TypeBool, + Optional: true, + Description: `Optional. If true, enable direct access to the Bigtable instance.`, + }, + "zone": { + Type: schema.TypeString, + Computed: true, + Optional: true, + Description: `The zone where the Bigtable instance will be created.`, + }, }, }, ExactlyOneOf: []string{"bigtable", "optimized"}, @@ -215,6 +226,21 @@ func ResourceVertexAIFeatureOnlineStore() *schema.Resource { }, }, }, + "encryption_spec": { + Type: schema.TypeList, + Optional: true, + Description: `If set, both of the online and offline data storage will be secured by this key.`, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "kms_key_name": { + Type: schema.TypeString, + Required: true, + Description: `The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the compute resource is created.`, + }, + }, + }, + }, "labels": { Type: schema.TypeMap, Optional: true, @@ -318,6 +344,12 @@ func resourceVertexAIFeatureOnlineStoreCreate(d *schema.ResourceData, meta inter } else if v, ok := d.GetOkExists("dedicated_serving_endpoint"); !tpgresource.IsEmptyValue(reflect.ValueOf(dedicatedServingEndpointProp)) && (ok || !reflect.DeepEqual(v, dedicatedServingEndpointProp)) { obj["dedicatedServingEndpoint"] = dedicatedServingEndpointProp } + encryptionSpecProp, err := expandVertexAIFeatureOnlineStoreEncryptionSpec(d.Get("encryption_spec"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("encryption_spec"); !tpgresource.IsEmptyValue(reflect.ValueOf(encryptionSpecProp)) && (ok || !reflect.DeepEqual(v, encryptionSpecProp)) { + obj["encryptionSpec"] = encryptionSpecProp + } effectiveLabelsProp, err := expandVertexAIFeatureOnlineStoreEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -471,6 +503,9 @@ func resourceVertexAIFeatureOnlineStoreRead(d *schema.ResourceData, meta interfa if err := d.Set("dedicated_serving_endpoint", flattenVertexAIFeatureOnlineStoreDedicatedServingEndpoint(res["dedicatedServingEndpoint"], d, config)); err != nil { return fmt.Errorf("Error reading FeatureOnlineStore: %s", err) } + if err := d.Set("encryption_spec", flattenVertexAIFeatureOnlineStoreEncryptionSpec(res["encryptionSpec"], d, config)); err != nil { + return fmt.Errorf("Error reading FeatureOnlineStore: %s", err) + } if err := d.Set("terraform_labels", flattenVertexAIFeatureOnlineStoreTerraformLabels(res["labels"], d, config)); err != nil { return fmt.Errorf("Error reading FeatureOnlineStore: %s", err) } @@ -560,6 +595,12 @@ func resourceVertexAIFeatureOnlineStoreUpdate(d *schema.ResourceData, meta inter } else if v, ok := d.GetOkExists("dedicated_serving_endpoint"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, dedicatedServingEndpointProp)) { obj["dedicatedServingEndpoint"] = dedicatedServingEndpointProp } + encryptionSpecProp, err := expandVertexAIFeatureOnlineStoreEncryptionSpec(d.Get("encryption_spec"), d, config) + if err != nil { + return err + } else if v, ok := d.GetOkExists("encryption_spec"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, encryptionSpecProp)) { + obj["encryptionSpec"] = encryptionSpecProp + } effectiveLabelsProp, err := expandVertexAIFeatureOnlineStoreEffectiveLabels(d.Get("effective_labels"), d, config) if err != nil { return err @@ -588,6 +629,10 @@ func resourceVertexAIFeatureOnlineStoreUpdate(d *schema.ResourceData, meta inter updateMask = append(updateMask, "dedicatedServingEndpoint") } + if d.HasChange("encryption_spec") { + updateMask = append(updateMask, "encryptionSpec") + } + if d.HasChange("effective_labels") { updateMask = append(updateMask, "labels") } @@ -759,10 +804,18 @@ func flattenVertexAIFeatureOnlineStoreBigtable(v interface{}, d *schema.Resource return nil } transformed := make(map[string]interface{}) + transformed["enable_direct_bigtable_access"] = + flattenVertexAIFeatureOnlineStoreBigtableEnableDirectBigtableAccess(original["enableDirectBigtableAccess"], d, config) transformed["auto_scaling"] = flattenVertexAIFeatureOnlineStoreBigtableAutoScaling(original["autoScaling"], d, config) + transformed["zone"] = + flattenVertexAIFeatureOnlineStoreBigtableZone(original["zone"], d, config) return []interface{}{transformed} } +func flattenVertexAIFeatureOnlineStoreBigtableEnableDirectBigtableAccess(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenVertexAIFeatureOnlineStoreBigtableAutoScaling(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return nil @@ -831,6 +884,10 @@ func flattenVertexAIFeatureOnlineStoreBigtableAutoScalingCpuUtilizationTarget(v return v // let terraform core handle it otherwise } +func flattenVertexAIFeatureOnlineStoreBigtableZone(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenVertexAIFeatureOnlineStoreOptimized(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return nil @@ -887,6 +944,23 @@ func flattenVertexAIFeatureOnlineStoreDedicatedServingEndpointPrivateServiceConn return v } +func flattenVertexAIFeatureOnlineStoreEncryptionSpec(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + if v == nil { + return nil + } + original := v.(map[string]interface{}) + if len(original) == 0 { + return nil + } + transformed := make(map[string]interface{}) + transformed["kms_key_name"] = + flattenVertexAIFeatureOnlineStoreEncryptionSpecKmsKeyName(original["kmsKeyName"], d, config) + return []interface{}{transformed} +} +func flattenVertexAIFeatureOnlineStoreEncryptionSpecKmsKeyName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { + return v +} + func flattenVertexAIFeatureOnlineStoreTerraformLabels(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { if v == nil { return v @@ -918,6 +992,13 @@ func expandVertexAIFeatureOnlineStoreBigtable(v interface{}, d tpgresource.Terra original := raw.(map[string]interface{}) transformed := make(map[string]interface{}) + transformedEnableDirectBigtableAccess, err := expandVertexAIFeatureOnlineStoreBigtableEnableDirectBigtableAccess(original["enable_direct_bigtable_access"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedEnableDirectBigtableAccess); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["enableDirectBigtableAccess"] = transformedEnableDirectBigtableAccess + } + transformedAutoScaling, err := expandVertexAIFeatureOnlineStoreBigtableAutoScaling(original["auto_scaling"], d, config) if err != nil { return nil, err @@ -925,9 +1006,20 @@ func expandVertexAIFeatureOnlineStoreBigtable(v interface{}, d tpgresource.Terra transformed["autoScaling"] = transformedAutoScaling } + transformedZone, err := expandVertexAIFeatureOnlineStoreBigtableZone(original["zone"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedZone); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["zone"] = transformedZone + } + return transformed, nil } +func expandVertexAIFeatureOnlineStoreBigtableEnableDirectBigtableAccess(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandVertexAIFeatureOnlineStoreBigtableAutoScaling(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { if v == nil { return nil, nil @@ -976,6 +1068,10 @@ func expandVertexAIFeatureOnlineStoreBigtableAutoScalingCpuUtilizationTarget(v i return v, nil } +func expandVertexAIFeatureOnlineStoreBigtableZone(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandVertexAIFeatureOnlineStoreOptimized(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { if v == nil { return nil, nil @@ -1075,6 +1171,32 @@ func expandVertexAIFeatureOnlineStoreDedicatedServingEndpointPrivateServiceConne return v, nil } +func expandVertexAIFeatureOnlineStoreEncryptionSpec(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + if len(l) == 0 || l[0] == nil { + return nil, nil + } + raw := l[0] + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedKmsKeyName, err := expandVertexAIFeatureOnlineStoreEncryptionSpecKmsKeyName(original["kms_key_name"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedKmsKeyName); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["kmsKeyName"] = transformedKmsKeyName + } + + return transformed, nil +} + +func expandVertexAIFeatureOnlineStoreEncryptionSpecKmsKeyName(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandVertexAIFeatureOnlineStoreEffectiveLabels(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (map[string]string, error) { if v == nil { return map[string]string{}, nil diff --git a/google/services/vertexai/resource_vertex_ai_feature_online_store_featureview_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_feature_online_store_featureview_generated_meta.yaml index 659b90b7d27..1d86d846d55 100644 --- a/google/services/vertexai/resource_vertex_ai_feature_online_store_featureview_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_feature_online_store_featureview_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_vertex_ai_feature_online_store_featureview' -generation_type: 'mmv1' -source_file: 'products/vertexai/FeatureOnlineStoreFeatureview.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FeatureView' +resource: google_vertex_ai_feature_online_store_featureview +generation_type: mmv1 +source_file: products/vertexai/FeatureOnlineStoreFeatureview.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: FeatureView fields: - - api_field: 'bigQuerySource.entityIdColumns' - - api_field: 'bigQuerySource.uri' - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - field: 'feature_online_store' - provider_only: true - - api_field: 'featureRegistrySource.featureGroups.featureGroupId' - - api_field: 'featureRegistrySource.featureGroups.featureIds' - - api_field: 'featureRegistrySource.projectNumber' - - api_field: 'labels' - - field: 'name' - provider_only: true - - field: 'region' - provider_only: true - - api_field: 'syncConfig.continuous' - - api_field: 'syncConfig.cron' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: bigQuerySource.entityIdColumns + - api_field: bigQuerySource.uri + - api_field: createTime + - field: effective_labels + provider_only: true + - field: feature_online_store + provider_only: true + - api_field: featureRegistrySource.featureGroups.featureGroupId + - api_field: featureRegistrySource.featureGroups.featureIds + - api_field: featureRegistrySource.projectNumber + - api_field: labels + - field: name + provider_only: true + - field: region + provider_only: true + - api_field: syncConfig.continuous + - api_field: syncConfig.cron + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_feature_online_store_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_feature_online_store_generated_meta.yaml index 47d674478b6..bed4ebf59b0 100644 --- a/google/services/vertexai/resource_vertex_ai_feature_online_store_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_feature_online_store_generated_meta.yaml @@ -1,30 +1,33 @@ -resource: 'google_vertex_ai_feature_online_store' -generation_type: 'mmv1' -source_file: 'products/vertexai/FeatureOnlineStore.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'FeatureOnlineStore' +resource: google_vertex_ai_feature_online_store +generation_type: mmv1 +source_file: products/vertexai/FeatureOnlineStore.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: FeatureOnlineStore fields: - - api_field: 'bigtable.autoScaling.cpuUtilizationTarget' - - api_field: 'bigtable.autoScaling.maxNodeCount' - - api_field: 'bigtable.autoScaling.minNodeCount' - - api_field: 'createTime' - - api_field: 'dedicatedServingEndpoint.privateServiceConnectConfig.enablePrivateServiceConnect' - - api_field: 'dedicatedServingEndpoint.privateServiceConnectConfig.projectAllowlist' - - api_field: 'dedicatedServingEndpoint.publicEndpointDomainName' - - api_field: 'dedicatedServingEndpoint.serviceAttachment' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - field: 'force_destroy' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'optimized' - - field: 'region' - provider_only: true - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: bigtable.autoScaling.cpuUtilizationTarget + - api_field: bigtable.autoScaling.maxNodeCount + - api_field: bigtable.autoScaling.minNodeCount + - api_field: bigtable.enableDirectBigtableAccess + - api_field: bigtable.zone + - api_field: createTime + - api_field: dedicatedServingEndpoint.privateServiceConnectConfig.enablePrivateServiceConnect + - api_field: dedicatedServingEndpoint.privateServiceConnectConfig.projectAllowlist + - api_field: dedicatedServingEndpoint.publicEndpointDomainName + - api_field: dedicatedServingEndpoint.serviceAttachment + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: etag + - field: force_destroy + provider_only: true + - api_field: labels + - field: name + provider_only: true + - api_field: optimized + - field: region + provider_only: true + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_feature_online_store_test.go b/google/services/vertexai/resource_vertex_ai_feature_online_store_test.go index c6273ee3e48..1f8b257113a 100644 --- a/google/services/vertexai/resource_vertex_ai_feature_online_store_test.go +++ b/google/services/vertexai/resource_vertex_ai_feature_online_store_test.go @@ -99,3 +99,97 @@ resource google_vertex_ai_feature_online_store "feature_online_store" { } `, context) } + +func TestAccVertexAIFeatureOnlineStore_bigtable_full(t *testing.T) { + t.Parallel() + + kms := acctest.BootstrapKMSKeyInLocation(t, "us-central1") + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + "kms_key_name": kms.CryptoKey.Name, + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckVertexAIFeatureOnlineStoreDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccVertexAIFeatureOnlineStore_bigtable_full(context), + }, + { + ResourceName: "google_vertex_ai_feature_online_store.feature_online_store", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name", "etag", "region", "force_destroy", "labels", "terraform_labels"}, + }, + }, + }) +} + +func testAccVertexAIFeatureOnlineStore_bigtable_full(context map[string]interface{}) string { + return acctest.Nprintf(` +resource google_vertex_ai_feature_online_store "feature_online_store" { + name = "tf_test_feature_online_store%{random_suffix}" + region = "us-central1" + + bigtable { + auto_scaling { + min_node_count = 1 + max_node_count = 2 + } + enable_direct_bigtable_access = true + zone = "us-central1-a" + } + encryption_spec { + kms_key_name = "%{kms_key_name}" + } + force_destroy = true +} +`, context) +} + +func TestAccVertexAIFeatureOnlineStore_bigtable_with_zone(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckVertexAIFeatureOnlineStoreDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccVertexAIFeatureOnlineStore_bigtable_with_zone(context), + }, + { + ResourceName: "google_vertex_ai_feature_online_store.feature_online_store", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"name", "etag", "region", "force_destroy", "labels", "terraform_labels"}, + }, + }, + }) +} + +func testAccVertexAIFeatureOnlineStore_bigtable_with_zone(context map[string]interface{}) string { + return acctest.Nprintf(` +resource google_vertex_ai_feature_online_store "feature_online_store" { + name = "tf_test_feature_online_store%{random_suffix}" + region = "us-central1" + + bigtable { + auto_scaling { + min_node_count = 1 + max_node_count = 2 + cpu_utilization_target = 60 + } + zone = "us-central1-a" + } + force_destroy = true +} +`, context) +} diff --git a/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_feature_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_feature_generated_meta.yaml index dfbd61b9d43..9dde1a5751a 100644 --- a/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_feature_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_feature_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_vertex_ai_featurestore_entitytype_feature' -generation_type: 'mmv1' -source_file: 'products/vertexai/FeaturestoreEntitytypeFeature.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Feature' +resource: google_vertex_ai_featurestore_entitytype_feature +generation_type: mmv1 +source_file: products/vertexai/FeaturestoreEntitytypeFeature.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Feature api_variant_patterns: - - 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}/features/{feature}' + - projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}/features/{feature} fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - field: 'entitytype' - provider_only: true - - api_field: 'etag' - - api_field: 'labels' - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'valueType' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - field: entitytype + provider_only: true + - api_field: etag + - api_field: labels + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: valueType diff --git a/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_generated_meta.yaml index 4b89c092f97..cebecd70f0c 100644 --- a/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_featurestore_entitytype_generated_meta.yaml @@ -1,27 +1,27 @@ -resource: 'google_vertex_ai_featurestore_entitytype' -generation_type: 'mmv1' -source_file: 'products/vertexai/FeaturestoreEntitytype.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'EntityType' +resource: google_vertex_ai_featurestore_entitytype +generation_type: mmv1 +source_file: products/vertexai/FeaturestoreEntitytype.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: EntityType fields: - - api_field: 'createTime' - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'etag' - - field: 'featurestore' - provider_only: true - - api_field: 'labels' - - api_field: 'monitoringConfig.categoricalThresholdConfig.value' - - api_field: 'monitoringConfig.importFeaturesAnalysis.anomalyDetectionBaseline' - - api_field: 'monitoringConfig.importFeaturesAnalysis.state' - - api_field: 'monitoringConfig.numericalThresholdConfig.value' - - api_field: 'monitoringConfig.snapshotAnalysis.disabled' - - api_field: 'monitoringConfig.snapshotAnalysis.monitoringIntervalDays' - - api_field: 'monitoringConfig.snapshotAnalysis.stalenessDays' - - field: 'name' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - field: effective_labels + provider_only: true + - api_field: etag + - field: featurestore + provider_only: true + - api_field: labels + - api_field: monitoringConfig.categoricalThresholdConfig.value + - api_field: monitoringConfig.importFeaturesAnalysis.anomalyDetectionBaseline + - api_field: monitoringConfig.importFeaturesAnalysis.state + - api_field: monitoringConfig.numericalThresholdConfig.value + - api_field: monitoringConfig.snapshotAnalysis.disabled + - api_field: monitoringConfig.snapshotAnalysis.monitoringIntervalDays + - api_field: monitoringConfig.snapshotAnalysis.stalenessDays + - field: name + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_featurestore_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_featurestore_generated_meta.yaml index 75922b64de2..4599839e3b2 100644 --- a/google/services/vertexai/resource_vertex_ai_featurestore_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_featurestore_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_vertex_ai_featurestore' -generation_type: 'mmv1' -source_file: 'products/vertexai/Featurestore.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Featurestore' +resource: google_vertex_ai_featurestore +generation_type: mmv1 +source_file: products/vertexai/Featurestore.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Featurestore fields: - - api_field: 'createTime' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'etag' - - field: 'force_destroy' - provider_only: true - - api_field: 'labels' - - field: 'name' - provider_only: true - - api_field: 'onlineServingConfig.fixedNodeCount' - - api_field: 'onlineServingConfig.scaling.maxNodeCount' - - api_field: 'onlineServingConfig.scaling.minNodeCount' - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: etag + - field: force_destroy + provider_only: true + - api_field: labels + - field: name + provider_only: true + - api_field: onlineServingConfig.fixedNodeCount + - api_field: onlineServingConfig.scaling.maxNodeCount + - api_field: onlineServingConfig.scaling.minNodeCount + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_index_endpoint.go b/google/services/vertexai/resource_vertex_ai_index_endpoint.go index 5806e2d0654..2efea226e36 100644 --- a/google/services/vertexai/resource_vertex_ai_index_endpoint.go +++ b/google/services/vertexai/resource_vertex_ai_index_endpoint.go @@ -198,6 +198,25 @@ Where '{project}' is a project number, as in '12345', and '{network}' is network Type: schema.TypeString, }, }, + "psc_automation_configs": { + Type: schema.TypeList, + Optional: true, + Description: `List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only.`, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "network": { + Type: schema.TypeString, + Required: true, + Description: `The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): projects/{project}/global/networks/{network}.`, + }, + "project_id": { + Type: schema.TypeString, + Required: true, + Description: `Project id used to create forwarding rule.`, + }, + }, + }, + }, }, }, ConflictsWith: []string{"network"}, @@ -760,6 +779,7 @@ func flattenVertexAIIndexEndpointPrivateServiceConnectConfig(v interface{}, d *s flattenVertexAIIndexEndpointPrivateServiceConnectConfigEnablePrivateServiceConnect(original["enablePrivateServiceConnect"], d, config) transformed["project_allowlist"] = flattenVertexAIIndexEndpointPrivateServiceConnectConfigProjectAllowlist(original["projectAllowlist"], d, config) + transformed["psc_automation_configs"] = d.Get("private_service_connect_config.0.psc_automation_configs") return []interface{}{transformed} } @@ -849,6 +869,13 @@ func expandVertexAIIndexEndpointPrivateServiceConnectConfig(v interface{}, d tpg transformed["projectAllowlist"] = transformedProjectAllowlist } + transformedPscAutomationConfigs, err := expandVertexAIIndexEndpointPrivateServiceConnectConfigPscAutomationConfigs(original["psc_automation_configs"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedPscAutomationConfigs); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["pscAutomationConfigs"] = transformedPscAutomationConfigs + } + return transformed, nil } @@ -860,6 +887,46 @@ func expandVertexAIIndexEndpointPrivateServiceConnectConfigProjectAllowlist(v in return v, nil } +func expandVertexAIIndexEndpointPrivateServiceConnectConfigPscAutomationConfigs(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + if v == nil { + return nil, nil + } + l := v.([]interface{}) + req := make([]interface{}, 0, len(l)) + for _, raw := range l { + if raw == nil { + continue + } + original := raw.(map[string]interface{}) + transformed := make(map[string]interface{}) + + transformedProjectId, err := expandVertexAIIndexEndpointPrivateServiceConnectConfigPscAutomationConfigsProjectId(original["project_id"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedProjectId); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["projectId"] = transformedProjectId + } + + transformedNetwork, err := expandVertexAIIndexEndpointPrivateServiceConnectConfigPscAutomationConfigsNetwork(original["network"], d, config) + if err != nil { + return nil, err + } else if val := reflect.ValueOf(transformedNetwork); val.IsValid() && !tpgresource.IsEmptyValue(val) { + transformed["network"] = transformedNetwork + } + + req = append(req, transformed) + } + return req, nil +} + +func expandVertexAIIndexEndpointPrivateServiceConnectConfigPscAutomationConfigsProjectId(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + +func expandVertexAIIndexEndpointPrivateServiceConnectConfigPscAutomationConfigsNetwork(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { + return v, nil +} + func expandVertexAIIndexEndpointPublicEndpointEnabled(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) { return v, nil } diff --git a/google/services/vertexai/resource_vertex_ai_index_endpoint_deployed_index_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_index_endpoint_deployed_index_generated_meta.yaml index cc083497387..0f1c4962df6 100644 --- a/google/services/vertexai/resource_vertex_ai_index_endpoint_deployed_index_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_index_endpoint_deployed_index_generated_meta.yaml @@ -1,32 +1,32 @@ -resource: 'google_vertex_ai_index_endpoint_deployed_index' -generation_type: 'mmv1' -source_file: 'products/vertexai/IndexEndpointDeployedIndex.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'IndexEndpoint' +resource: google_vertex_ai_index_endpoint_deployed_index +generation_type: mmv1 +source_file: products/vertexai/IndexEndpointDeployedIndex.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: IndexEndpoint fields: - - api_field: 'automaticResources.maxReplicaCount' - - api_field: 'automaticResources.minReplicaCount' - - api_field: 'createTime' - - api_field: 'dedicatedResources.machineSpec.machineType' - - api_field: 'dedicatedResources.maxReplicaCount' - - api_field: 'dedicatedResources.minReplicaCount' - - api_field: 'deployedIndexAuthConfig.authProvider.allowedIssuers' - - api_field: 'deployedIndexAuthConfig.authProvider.audiences' - - api_field: 'deployedIndexId' - - api_field: 'deploymentGroup' - - api_field: 'displayName' - - api_field: 'enableAccessLogging' - - api_field: 'index' - - field: 'index_endpoint' - provider_only: true - - api_field: 'indexSyncTime' - - api_field: 'name' - - api_field: 'privateEndpoints.matchGrpcAddress' - - api_field: 'privateEndpoints.pscAutomatedEndpoints.matchAddress' - - api_field: 'privateEndpoints.pscAutomatedEndpoints.network' - - api_field: 'privateEndpoints.pscAutomatedEndpoints.projectId' - - api_field: 'privateEndpoints.serviceAttachment' - - field: 'region' - provider_only: true - - api_field: 'reservedIpRanges' + - api_field: automaticResources.maxReplicaCount + - api_field: automaticResources.minReplicaCount + - api_field: createTime + - api_field: dedicatedResources.machineSpec.machineType + - api_field: dedicatedResources.maxReplicaCount + - api_field: dedicatedResources.minReplicaCount + - api_field: deployedIndexAuthConfig.authProvider.allowedIssuers + - api_field: deployedIndexAuthConfig.authProvider.audiences + - api_field: deployedIndexId + - api_field: deploymentGroup + - api_field: displayName + - api_field: enableAccessLogging + - api_field: index + - field: index_endpoint + provider_only: true + - api_field: indexSyncTime + - api_field: name + - api_field: privateEndpoints.matchGrpcAddress + - api_field: privateEndpoints.pscAutomatedEndpoints.matchAddress + - api_field: privateEndpoints.pscAutomatedEndpoints.network + - api_field: privateEndpoints.pscAutomatedEndpoints.projectId + - api_field: privateEndpoints.serviceAttachment + - field: region + provider_only: true + - api_field: reservedIpRanges diff --git a/google/services/vertexai/resource_vertex_ai_index_endpoint_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_index_endpoint_generated_meta.yaml index 44ca7eddc9f..701e4caf870 100644 --- a/google/services/vertexai/resource_vertex_ai_index_endpoint_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_index_endpoint_generated_meta.yaml @@ -1,26 +1,28 @@ -resource: 'google_vertex_ai_index_endpoint' -generation_type: 'mmv1' -source_file: 'products/vertexai/IndexEndpoint.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'IndexEndpoint' +resource: google_vertex_ai_index_endpoint +generation_type: mmv1 +source_file: products/vertexai/IndexEndpoint.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: IndexEndpoint fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'etag' - - api_field: 'labels' - - api_field: 'name' - - api_field: 'network' - - api_field: 'privateServiceConnectConfig.enablePrivateServiceConnect' - - api_field: 'privateServiceConnectConfig.projectAllowlist' - - api_field: 'publicEndpointDomainName' - - api_field: 'publicEndpointEnabled' - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: etag + - api_field: labels + - api_field: name + - api_field: network + - api_field: privateServiceConnectConfig.enablePrivateServiceConnect + - api_field: privateServiceConnectConfig.projectAllowlist + - api_field: privateServiceConnectConfig.pscAutomationConfigs.network + - api_field: privateServiceConnectConfig.pscAutomationConfigs.projectId + - api_field: publicEndpointDomainName + - api_field: publicEndpointEnabled + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_index_endpoint_test.go b/google/services/vertexai/resource_vertex_ai_index_endpoint_test.go index 828512db550..36bcfd0c9b1 100644 --- a/google/services/vertexai/resource_vertex_ai_index_endpoint_test.go +++ b/google/services/vertexai/resource_vertex_ai_index_endpoint_test.go @@ -60,6 +60,31 @@ func TestAccVertexAIIndexEndpoint_updated(t *testing.T) { }) } +func TestAccVertexAIIndexEndpoint_psc_automation_config(t *testing.T) { + t.Parallel() + + context := map[string]interface{}{ + "random_suffix": acctest.RandString(t, 10), + } + + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckVertexAIIndexEndpointDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccVertexAIIndexEndpoint_psc_automation_config(context), + }, + { + ResourceName: "google_vertex_ai_index_endpoint.index_endpoint", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"etag", "region", "labels", "terraform_labels", "private_service_connect_config.0.psc_automation_configs"}, + }, + }, + }) +} + func testAccVertexAIIndexEndpoint_basic(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_vertex_ai_index_endpoint" "index_endpoint" { @@ -105,3 +130,43 @@ data "google_compute_network" "vertex_network" { data "google_project" "project" {} `, context) } + +func testAccVertexAIIndexEndpoint_psc_automation_config(context map[string]interface{}) string { + return acctest.Nprintf(` +resource "google_vertex_ai_index_endpoint" "index_endpoint" { + display_name = "tf-test-sample-endpoint-%{random_suffix}" + description = "A sample vertex endpoint" + region = "us-central1" + + labels = { + label-one = "value-one" + } + + private_service_connect_config { + enable_private_service_connect = true + project_allowlist = [ + data.google_project.project.name, + ] + + psc_automation_configs { + project_id = data.google_project.project.id + network = google_compute_network.network.id + } + } +} + +resource "google_compute_subnetwork" "subnetwork" { + name = "tf-test-subnetwork-%{random_suffix}" + ip_cidr_range = "192.168.0.0/24" + region = "us-central1" + network = google_compute_network.network.id +} + +resource "google_compute_network" "network" { + name = "tf-test-network-%{random_suffix}" + auto_create_subnetworks = false +} + +data "google_project" "project" {} +`, context) +} diff --git a/google/services/vertexai/resource_vertex_ai_index_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_index_generated_meta.yaml index beb876464fd..b9b8426627b 100644 --- a/google/services/vertexai/resource_vertex_ai_index_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_index_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_vertex_ai_index' -generation_type: 'mmv1' -source_file: 'products/vertexai/Index.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Index' +resource: google_vertex_ai_index +generation_type: mmv1 +source_file: products/vertexai/Index.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Index fields: - - api_field: 'createTime' - - api_field: 'deployedIndexes.deployedIndexId' - - api_field: 'deployedIndexes.indexEndpoint' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'etag' - - api_field: 'indexStats.shardsCount' - - api_field: 'indexStats.vectorsCount' - - api_field: 'indexUpdateMethod' - - api_field: 'labels' - - api_field: 'metadata.config.algorithmConfig.bruteForceConfig' - - api_field: 'metadata.config.algorithmConfig.treeAhConfig.leafNodeEmbeddingCount' - - api_field: 'metadata.config.algorithmConfig.treeAhConfig.leafNodesToSearchPercent' - - api_field: 'metadata.config.approximateNeighborsCount' - - api_field: 'metadata.config.dimensions' - - api_field: 'metadata.config.distanceMeasureType' - - api_field: 'metadata.config.featureNormType' - - api_field: 'metadata.config.shardSize' - - api_field: 'metadata.contentsDeltaUri' - - api_field: 'metadata.isCompleteOverwrite' - - api_field: 'metadataSchemaUri' - - api_field: 'name' - - field: 'region' - provider_only: true - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: createTime + - api_field: deployedIndexes.deployedIndexId + - api_field: deployedIndexes.indexEndpoint + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: etag + - api_field: indexStats.shardsCount + - api_field: indexStats.vectorsCount + - api_field: indexUpdateMethod + - api_field: labels + - api_field: metadata.config.algorithmConfig.bruteForceConfig + - api_field: metadata.config.algorithmConfig.treeAhConfig.leafNodeEmbeddingCount + - api_field: metadata.config.algorithmConfig.treeAhConfig.leafNodesToSearchPercent + - api_field: metadata.config.approximateNeighborsCount + - api_field: metadata.config.dimensions + - api_field: metadata.config.distanceMeasureType + - api_field: metadata.config.featureNormType + - api_field: metadata.config.shardSize + - api_field: metadata.contentsDeltaUri + - api_field: metadata.isCompleteOverwrite + - api_field: metadataSchemaUri + - api_field: name + - field: region + provider_only: true + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_rag_engine_config_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_rag_engine_config_generated_meta.yaml index 47f3b659b4c..4c31f370c2d 100644 --- a/google/services/vertexai/resource_vertex_ai_rag_engine_config_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_rag_engine_config_generated_meta.yaml @@ -1,13 +1,13 @@ -resource: 'google_vertex_ai_rag_engine_config' -generation_type: 'mmv1' -source_file: 'products/vertexai/RagEngineConfig.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'RagEngineConfig' +resource: google_vertex_ai_rag_engine_config +generation_type: mmv1 +source_file: products/vertexai/RagEngineConfig.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: RagEngineConfig fields: - - api_field: 'name' - - api_field: 'ragManagedDbConfig.basic' - - api_field: 'ragManagedDbConfig.scaled' - - api_field: 'ragManagedDbConfig.unprovisioned' - - field: 'region' - provider_only: true + - api_field: name + - api_field: ragManagedDbConfig.basic + - api_field: ragManagedDbConfig.scaled + - api_field: ragManagedDbConfig.unprovisioned + - field: region + provider_only: true diff --git a/google/services/vertexai/resource_vertex_ai_reasoning_engine.go b/google/services/vertexai/resource_vertex_ai_reasoning_engine.go index 62e36ffa849..5dda5ebda4a 100644 --- a/google/services/vertexai/resource_vertex_ai_reasoning_engine.go +++ b/google/services/vertexai/resource_vertex_ai_reasoning_engine.go @@ -211,17 +211,17 @@ Engine deployment.`, Type: schema.TypeInt, Computed: true, Optional: true, - Description: `Optional. The minimum number of application instances that will be -kept running at all times. Defaults to 1. Range: [0, 10].`, + Description: `Optional. The maximum number of application instances that can be +launched to handle increased traffic. Defaults to 100. +Range: [1, 1000]. If VPC-SC or PSC-I is enabled, the acceptable +range is [1, 100].`, }, "min_instances": { Type: schema.TypeInt, Computed: true, Optional: true, - Description: `Optional. The maximum number of application instances that can be -launched to handle increased traffic. Defaults to 100. -Range: [1, 1000]. If VPC-SC or PSC-I is enabled, the acceptable -range is [1, 100].`, + Description: `Optional. The minimum number of application instances that will be +kept running at all times. Defaults to 1. Range: [0, 10].`, }, "resource_limits": { Type: schema.TypeMap, diff --git a/google/services/vertexai/resource_vertex_ai_reasoning_engine_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_reasoning_engine_generated_meta.yaml index 159b11ad20d..a938d219ffb 100644 --- a/google/services/vertexai/resource_vertex_ai_reasoning_engine_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_reasoning_engine_generated_meta.yaml @@ -1,37 +1,37 @@ -resource: 'google_vertex_ai_reasoning_engine' -generation_type: 'mmv1' -source_file: 'products/vertexai/ReasoningEngine.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ReasoningEngine' +resource: google_vertex_ai_reasoning_engine +generation_type: mmv1 +source_file: products/vertexai/ReasoningEngine.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: ReasoningEngine fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'name' - - field: 'region' - provider_only: true - - api_field: 'spec.agentFramework' - - api_field: 'spec.classMethods' - json: true - - api_field: 'spec.deploymentSpec.containerConcurrency' - - api_field: 'spec.deploymentSpec.env.name' - - api_field: 'spec.deploymentSpec.env.value' - - api_field: 'spec.deploymentSpec.maxInstances' - - api_field: 'spec.deploymentSpec.minInstances' - - api_field: 'spec.deploymentSpec.resourceLimits' - - api_field: 'spec.deploymentSpec.secretEnv.name' - - api_field: 'spec.deploymentSpec.secretEnv.secretRef.secret' - - api_field: 'spec.deploymentSpec.secretEnv.secretRef.version' - - api_field: 'spec.packageSpec.dependencyFilesGcsUri' - - api_field: 'spec.packageSpec.pickleObjectGcsUri' - - api_field: 'spec.packageSpec.pythonVersion' - - api_field: 'spec.packageSpec.requirementsGcsUri' - - api_field: 'spec.serviceAccount' - - api_field: 'spec.sourceCodeSpec.inlineSource.sourceArchive' - - api_field: 'spec.sourceCodeSpec.pythonSpec.entrypointModule' - - api_field: 'spec.sourceCodeSpec.pythonSpec.entrypointObject' - - api_field: 'spec.sourceCodeSpec.pythonSpec.requirementsFile' - - api_field: 'spec.sourceCodeSpec.pythonSpec.version' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: displayName + - api_field: encryptionSpec.kmsKeyName + - api_field: name + - field: region + provider_only: true + - api_field: spec.agentFramework + - api_field: spec.classMethods + json: true + - api_field: spec.deploymentSpec.containerConcurrency + - api_field: spec.deploymentSpec.env.name + - api_field: spec.deploymentSpec.env.value + - api_field: spec.deploymentSpec.maxInstances + - api_field: spec.deploymentSpec.minInstances + - api_field: spec.deploymentSpec.resourceLimits + - api_field: spec.deploymentSpec.secretEnv.name + - api_field: spec.deploymentSpec.secretEnv.secretRef.secret + - api_field: spec.deploymentSpec.secretEnv.secretRef.version + - api_field: spec.packageSpec.dependencyFilesGcsUri + - api_field: spec.packageSpec.pickleObjectGcsUri + - api_field: spec.packageSpec.pythonVersion + - api_field: spec.packageSpec.requirementsGcsUri + - api_field: spec.serviceAccount + - api_field: spec.sourceCodeSpec.inlineSource.sourceArchive + - api_field: spec.sourceCodeSpec.pythonSpec.entrypointModule + - api_field: spec.sourceCodeSpec.pythonSpec.entrypointObject + - api_field: spec.sourceCodeSpec.pythonSpec.requirementsFile + - api_field: spec.sourceCodeSpec.pythonSpec.version + - api_field: updateTime diff --git a/google/services/vertexai/resource_vertex_ai_tensorboard_generated_meta.yaml b/google/services/vertexai/resource_vertex_ai_tensorboard_generated_meta.yaml index a7fb419ed74..8d1b9e62b55 100644 --- a/google/services/vertexai/resource_vertex_ai_tensorboard_generated_meta.yaml +++ b/google/services/vertexai/resource_vertex_ai_tensorboard_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_vertex_ai_tensorboard' -generation_type: 'mmv1' -source_file: 'products/vertexai/Tensorboard.yaml' -api_service_name: 'aiplatform.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Tensorboard' +resource: google_vertex_ai_tensorboard +generation_type: mmv1 +source_file: products/vertexai/Tensorboard.yaml +api_service_name: aiplatform.googleapis.com +api_version: v1 +api_resource_type_kind: Tensorboard fields: - - api_field: 'blobStoragePathPrefix' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'displayName' - - field: 'effective_labels' - provider_only: true - - api_field: 'encryptionSpec.kmsKeyName' - - api_field: 'labels' - - api_field: 'name' - - field: 'region' - provider_only: true - - api_field: 'runCount' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' + - api_field: blobStoragePathPrefix + - api_field: createTime + - api_field: description + - api_field: displayName + - field: effective_labels + provider_only: true + - api_field: encryptionSpec.kmsKeyName + - api_field: labels + - api_field: name + - field: region + provider_only: true + - api_field: runCount + - field: terraform_labels + provider_only: true + - api_field: updateTime diff --git a/google/services/vmwareengine/resource_vmwareengine_cluster_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_cluster_generated_meta.yaml index 06727dfab53..7fd30c51526 100644 --- a/google/services/vmwareengine/resource_vmwareengine_cluster_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_cluster_generated_meta.yaml @@ -1,29 +1,43 @@ -resource: 'google_vmwareengine_cluster' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/Cluster.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Cluster' +resource: google_vmwareengine_cluster +generation_type: mmv1 +source_file: products/vmwareengine/Cluster.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: Cluster fields: - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.consumedMemoryThresholds.scaleIn' - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.consumedMemoryThresholds.scaleOut' - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.cpuThresholds.scaleIn' - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.cpuThresholds.scaleOut' - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.nodeTypeId' - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.scaleOutSize' - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.storageThresholds.scaleIn' - - api_field: 'autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.storageThresholds.scaleOut' - - api_field: 'autoscalingSettings.coolDownPeriod' - - api_field: 'autoscalingSettings.maxClusterNodeCount' - - api_field: 'autoscalingSettings.minClusterNodeCount' - - api_field: 'createTime' - - api_field: 'management' - - field: 'name' - provider_only: true - - api_field: 'nodeTypeConfigs.nodeTypeConfig.customCoreCount' - - api_field: 'nodeTypeConfigs.nodeTypeConfig.nodeCount' - - field: 'parent' - provider_only: true - - api_field: 'state' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: autoscalingSettings.autoscalingPolicies.key + field: autoscaling_settings.autoscaling_policies.autoscale_policy_id + - api_field: autoscalingSettings.autoscalingPolicies.value.consumedMemoryThresholds.scaleIn + field: autoscaling_settings.autoscaling_policies.consumed_memory_thresholds.scale_in + - api_field: autoscalingSettings.autoscalingPolicies.value.consumedMemoryThresholds.scaleOut + field: autoscaling_settings.autoscaling_policies.consumed_memory_thresholds.scale_out + - api_field: autoscalingSettings.autoscalingPolicies.value.cpuThresholds.scaleIn + field: autoscaling_settings.autoscaling_policies.cpu_thresholds.scale_in + - api_field: autoscalingSettings.autoscalingPolicies.value.cpuThresholds.scaleOut + field: autoscaling_settings.autoscaling_policies.cpu_thresholds.scale_out + - api_field: autoscalingSettings.autoscalingPolicies.value.nodeTypeId + field: autoscaling_settings.autoscaling_policies.node_type_id + - api_field: autoscalingSettings.autoscalingPolicies.value.scaleOutSize + field: autoscaling_settings.autoscaling_policies.scale_out_size + - api_field: autoscalingSettings.autoscalingPolicies.value.storageThresholds.scaleIn + field: autoscaling_settings.autoscaling_policies.storage_thresholds.scale_in + - api_field: autoscalingSettings.autoscalingPolicies.value.storageThresholds.scaleOut + field: autoscaling_settings.autoscaling_policies.storage_thresholds.scale_out + - api_field: autoscalingSettings.coolDownPeriod + - api_field: autoscalingSettings.maxClusterNodeCount + - api_field: autoscalingSettings.minClusterNodeCount + - api_field: createTime + - api_field: management + - field: name + provider_only: true + - api_field: nodeTypeConfigs.key + field: node_type_configs.node_type_id + - api_field: nodeTypeConfigs.value.customCoreCount + field: node_type_configs.custom_core_count + - api_field: nodeTypeConfigs.value.nodeCount + field: node_type_configs.node_count + - field: parent + provider_only: true + - api_field: state + - api_field: uid + - api_field: updateTime diff --git a/google/services/vmwareengine/resource_vmwareengine_external_access_rule_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_external_access_rule_generated_meta.yaml index ee8d6235856..aae9bb97c78 100644 --- a/google/services/vmwareengine/resource_vmwareengine_external_access_rule_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_external_access_rule_generated_meta.yaml @@ -1,25 +1,25 @@ -resource: 'google_vmwareengine_external_access_rule' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/ExternalAccessRule.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ExternalAccessRule' +resource: google_vmwareengine_external_access_rule +generation_type: mmv1 +source_file: products/vmwareengine/ExternalAccessRule.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: ExternalAccessRule fields: - - api_field: 'action' - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'destinationIpRanges.externalAddress' - - api_field: 'destinationIpRanges.ipAddressRange' - - api_field: 'destinationPorts' - - api_field: 'ipProtocol' - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'priority' - - api_field: 'sourceIpRanges.ipAddress' - - api_field: 'sourceIpRanges.ipAddressRange' - - api_field: 'sourcePorts' - - api_field: 'state' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: action + - api_field: createTime + - api_field: description + - api_field: destinationIpRanges.externalAddress + - api_field: destinationIpRanges.ipAddressRange + - api_field: destinationPorts + - api_field: ipProtocol + - field: name + provider_only: true + - field: parent + provider_only: true + - api_field: priority + - api_field: sourceIpRanges.ipAddress + - api_field: sourceIpRanges.ipAddressRange + - api_field: sourcePorts + - api_field: state + - api_field: uid + - api_field: updateTime diff --git a/google/services/vmwareengine/resource_vmwareengine_external_address_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_external_address_generated_meta.yaml index 4c16ef9be84..57d6f527d1e 100644 --- a/google/services/vmwareengine/resource_vmwareengine_external_address_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_external_address_generated_meta.yaml @@ -1,18 +1,18 @@ -resource: 'google_vmwareengine_external_address' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/ExternalAddress.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'ExternalAddress' +resource: google_vmwareengine_external_address +generation_type: mmv1 +source_file: products/vmwareengine/ExternalAddress.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: ExternalAddress fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'externalIp' - - api_field: 'internalIp' - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'state' - - api_field: 'uid' - - api_field: 'updateTime' + - api_field: createTime + - api_field: description + - api_field: externalIp + - api_field: internalIp + - field: name + provider_only: true + - field: parent + provider_only: true + - api_field: state + - api_field: uid + - api_field: updateTime diff --git a/google/services/vmwareengine/resource_vmwareengine_network_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_network_generated_meta.yaml index e2f309a0009..cd97015cc78 100644 --- a/google/services/vmwareengine/resource_vmwareengine_network_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_network_generated_meta.yaml @@ -1,20 +1,20 @@ -resource: 'google_vmwareengine_network' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/Network.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'VmwareEngineNetwork' +resource: google_vmwareengine_network +generation_type: mmv1 +source_file: products/vmwareengine/Network.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: VmwareEngineNetwork fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'etag' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'state' - - api_field: 'type' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'vpcNetworks.network' - - api_field: 'vpcNetworks.type' + - api_field: createTime + - api_field: description + - api_field: etag + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: state + - api_field: type + - api_field: uid + - api_field: updateTime + - api_field: vpcNetworks.network + - api_field: vpcNetworks.type diff --git a/google/services/vmwareengine/resource_vmwareengine_network_peering_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_network_peering_generated_meta.yaml index b9e3e489048..ee27ec6e29a 100644 --- a/google/services/vmwareengine/resource_vmwareengine_network_peering_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_network_peering_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_vmwareengine_network_peering' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/NetworkPeering.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkPeering' +resource: google_vmwareengine_network_peering +generation_type: mmv1 +source_file: products/vmwareengine/NetworkPeering.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkPeering fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'exportCustomRoutes' - - api_field: 'exportCustomRoutesWithPublicIp' - - api_field: 'importCustomRoutes' - - api_field: 'importCustomRoutesWithPublicIp' - - field: 'name' - provider_only: true - - api_field: 'peerNetwork' - - api_field: 'peerNetworkType' - - api_field: 'state' - - api_field: 'stateDetails' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'vmwareEngineNetwork' - - api_field: 'vmwareEngineNetworkCanonical' + - api_field: createTime + - api_field: description + - api_field: exportCustomRoutes + - api_field: exportCustomRoutesWithPublicIp + - api_field: importCustomRoutes + - api_field: importCustomRoutesWithPublicIp + - field: name + provider_only: true + - api_field: peerNetwork + - api_field: peerNetworkType + - api_field: state + - api_field: stateDetails + - api_field: uid + - api_field: updateTime + - api_field: vmwareEngineNetwork + - api_field: vmwareEngineNetworkCanonical diff --git a/google/services/vmwareengine/resource_vmwareengine_network_policy_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_network_policy_generated_meta.yaml index b9901c99a70..9ad3dbf046b 100644 --- a/google/services/vmwareengine/resource_vmwareengine_network_policy_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_network_policy_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_vmwareengine_network_policy' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/NetworkPolicy.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'NetworkPolicy' +resource: google_vmwareengine_network_policy +generation_type: mmv1 +source_file: products/vmwareengine/NetworkPolicy.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: NetworkPolicy fields: - - api_field: 'createTime' - - api_field: 'description' - - api_field: 'edgeServicesCidr' - - api_field: 'externalIp.enabled' - - api_field: 'externalIp.state' - - api_field: 'internetAccess.enabled' - - api_field: 'internetAccess.state' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'vmwareEngineNetwork' - - api_field: 'vmwareEngineNetworkCanonical' + - api_field: createTime + - api_field: description + - api_field: edgeServicesCidr + - api_field: externalIp.enabled + - api_field: externalIp.state + - api_field: internetAccess.enabled + - api_field: internetAccess.state + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: uid + - api_field: updateTime + - api_field: vmwareEngineNetwork + - api_field: vmwareEngineNetworkCanonical diff --git a/google/services/vmwareengine/resource_vmwareengine_private_cloud_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_private_cloud_generated_meta.yaml index 36889832dee..04ded7d7ce9 100644 --- a/google/services/vmwareengine/resource_vmwareengine_private_cloud_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_private_cloud_generated_meta.yaml @@ -1,56 +1,70 @@ -resource: 'google_vmwareengine_private_cloud' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/PrivateCloud.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'PrivateCloud' +resource: google_vmwareengine_private_cloud +generation_type: mmv1 +source_file: products/vmwareengine/PrivateCloud.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: PrivateCloud fields: - - api_field: 'createTime' - - api_field: 'deleteTime' - - field: 'deletion_delay_hours' - provider_only: true - - api_field: 'description' - - api_field: 'expireTime' - - api_field: 'hcx.fqdn' - - api_field: 'hcx.internalIp' - - api_field: 'hcx.state' - - api_field: 'hcx.version' - - field: 'location' - provider_only: true - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.consumedMemoryThresholds.scaleIn' - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.consumedMemoryThresholds.scaleOut' - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.cpuThresholds.scaleIn' - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.cpuThresholds.scaleOut' - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.nodeTypeId' - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.scaleOutSize' - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.storageThresholds.scaleIn' - - api_field: 'managementCluster.autoscalingSettings.autoscalingPolicies.AutoscalingPolicy.storageThresholds.scaleOut' - - api_field: 'managementCluster.autoscalingSettings.coolDownPeriod' - - api_field: 'managementCluster.autoscalingSettings.maxClusterNodeCount' - - api_field: 'managementCluster.autoscalingSettings.minClusterNodeCount' - - api_field: 'managementCluster.clusterId' - - api_field: 'managementCluster.nodeTypeConfigs.nodeTypeConfig.customCoreCount' - - api_field: 'managementCluster.nodeTypeConfigs.nodeTypeConfig.nodeCount' - - api_field: 'managementCluster.stretchedClusterConfig.preferredLocation' - - api_field: 'managementCluster.stretchedClusterConfig.secondaryLocation' - - field: 'name' - provider_only: true - - api_field: 'networkConfig.dnsServerIp' - - api_field: 'networkConfig.managementCidr' - - api_field: 'networkConfig.managementIpAddressLayoutVersion' - - api_field: 'networkConfig.vmwareEngineNetwork' - - api_field: 'networkConfig.vmwareEngineNetworkCanonical' - - api_field: 'nsx.fqdn' - - api_field: 'nsx.internalIp' - - api_field: 'nsx.state' - - api_field: 'nsx.version' - - field: 'send_deletion_delay_hours_if_zero' - provider_only: true - - api_field: 'state' - - api_field: 'type' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'vcenter.fqdn' - - api_field: 'vcenter.internalIp' - - api_field: 'vcenter.state' - - api_field: 'vcenter.version' + - api_field: createTime + - api_field: deleteTime + - field: deletion_delay_hours + provider_only: true + - api_field: description + - api_field: expireTime + - api_field: hcx.fqdn + - api_field: hcx.internalIp + - api_field: hcx.state + - api_field: hcx.version + - field: location + provider_only: true + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.key + field: management_cluster.autoscaling_settings.autoscaling_policies.autoscale_policy_id + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.consumedMemoryThresholds.scaleIn + field: management_cluster.autoscaling_settings.autoscaling_policies.consumed_memory_thresholds.scale_in + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.consumedMemoryThresholds.scaleOut + field: management_cluster.autoscaling_settings.autoscaling_policies.consumed_memory_thresholds.scale_out + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.cpuThresholds.scaleIn + field: management_cluster.autoscaling_settings.autoscaling_policies.cpu_thresholds.scale_in + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.cpuThresholds.scaleOut + field: management_cluster.autoscaling_settings.autoscaling_policies.cpu_thresholds.scale_out + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.nodeTypeId + field: management_cluster.autoscaling_settings.autoscaling_policies.node_type_id + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.scaleOutSize + field: management_cluster.autoscaling_settings.autoscaling_policies.scale_out_size + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.storageThresholds.scaleIn + field: management_cluster.autoscaling_settings.autoscaling_policies.storage_thresholds.scale_in + - api_field: managementCluster.autoscalingSettings.autoscalingPolicies.value.storageThresholds.scaleOut + field: management_cluster.autoscaling_settings.autoscaling_policies.storage_thresholds.scale_out + - api_field: managementCluster.autoscalingSettings.coolDownPeriod + - api_field: managementCluster.autoscalingSettings.maxClusterNodeCount + - api_field: managementCluster.autoscalingSettings.minClusterNodeCount + - api_field: managementCluster.clusterId + - api_field: managementCluster.nodeTypeConfigs.key + field: management_cluster.node_type_configs.node_type_id + - api_field: managementCluster.nodeTypeConfigs.value.customCoreCount + field: management_cluster.node_type_configs.custom_core_count + - api_field: managementCluster.nodeTypeConfigs.value.nodeCount + field: management_cluster.node_type_configs.node_count + - api_field: managementCluster.stretchedClusterConfig.preferredLocation + - api_field: managementCluster.stretchedClusterConfig.secondaryLocation + - field: name + provider_only: true + - api_field: networkConfig.dnsServerIp + - api_field: networkConfig.managementCidr + - api_field: networkConfig.managementIpAddressLayoutVersion + - api_field: networkConfig.vmwareEngineNetwork + - api_field: networkConfig.vmwareEngineNetworkCanonical + - api_field: nsx.fqdn + - api_field: nsx.internalIp + - api_field: nsx.state + - api_field: nsx.version + - field: send_deletion_delay_hours_if_zero + provider_only: true + - api_field: state + - api_field: type + - api_field: uid + - api_field: updateTime + - api_field: vcenter.fqdn + - api_field: vcenter.internalIp + - api_field: vcenter.state + - api_field: vcenter.version diff --git a/google/services/vmwareengine/resource_vmwareengine_subnet_generated_meta.yaml b/google/services/vmwareengine/resource_vmwareengine_subnet_generated_meta.yaml index 19098e5f972..5e45d2a0e1e 100644 --- a/google/services/vmwareengine/resource_vmwareengine_subnet_generated_meta.yaml +++ b/google/services/vmwareengine/resource_vmwareengine_subnet_generated_meta.yaml @@ -1,23 +1,23 @@ -resource: 'google_vmwareengine_subnet' -generation_type: 'mmv1' -source_file: 'products/vmwareengine/Subnet.yaml' -api_service_name: 'vmwareengine.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Subnet' +resource: google_vmwareengine_subnet +generation_type: mmv1 +source_file: products/vmwareengine/Subnet.yaml +api_service_name: vmwareengine.googleapis.com +api_version: v1 +api_resource_type_kind: Subnet fields: - - api_field: 'createTime' - - api_field: 'dhcpAddressRanges.firstAddress' - - api_field: 'dhcpAddressRanges.lastAddress' - - api_field: 'gatewayId' - - api_field: 'gatewayIp' - - api_field: 'ipCidrRange' - - field: 'name' - provider_only: true - - field: 'parent' - provider_only: true - - api_field: 'standardConfig' - - api_field: 'state' - - api_field: 'type' - - api_field: 'uid' - - api_field: 'updateTime' - - api_field: 'vlanId' + - api_field: createTime + - api_field: dhcpAddressRanges.firstAddress + - api_field: dhcpAddressRanges.lastAddress + - api_field: gatewayId + - api_field: gatewayIp + - api_field: ipCidrRange + - field: name + provider_only: true + - field: parent + provider_only: true + - api_field: standardConfig + - api_field: state + - api_field: type + - api_field: uid + - api_field: updateTime + - api_field: vlanId diff --git a/google/services/vpcaccess/resource_vpc_access_connector_generated_meta.yaml b/google/services/vpcaccess/resource_vpc_access_connector_generated_meta.yaml index fb58ae4137f..9691bdce054 100644 --- a/google/services/vpcaccess/resource_vpc_access_connector_generated_meta.yaml +++ b/google/services/vpcaccess/resource_vpc_access_connector_generated_meta.yaml @@ -1,22 +1,22 @@ -resource: 'google_vpc_access_connector' -generation_type: 'mmv1' -source_file: 'products/vpcaccess/Connector.yaml' -api_service_name: 'vpcaccess.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Connector' +resource: google_vpc_access_connector +generation_type: mmv1 +source_file: products/vpcaccess/Connector.yaml +api_service_name: vpcaccess.googleapis.com +api_version: v1 +api_resource_type_kind: Connector fields: - - api_field: 'connectedProjects' - - api_field: 'ipCidrRange' - - api_field: 'machineType' - - api_field: 'maxInstances' - - api_field: 'maxThroughput' - - api_field: 'minInstances' - - api_field: 'minThroughput' - - api_field: 'name' - - api_field: 'network' - - field: 'region' - provider_only: true - - api_field: 'selfLink' - - api_field: 'state' - - api_field: 'subnet.name' - - api_field: 'subnet.projectId' + - api_field: connectedProjects + - api_field: ipCidrRange + - api_field: machineType + - api_field: maxInstances + - api_field: maxThroughput + - api_field: minInstances + - api_field: minThroughput + - api_field: name + - api_field: network + - field: region + provider_only: true + - api_field: selfLink + - api_field: state + - api_field: subnet.name + - api_field: subnet.projectId diff --git a/google/services/workbench/iam_workbench_instance_generated_test.go b/google/services/workbench/iam_workbench_instance_generated_test.go index 893440fd7d8..e32331b7805 100644 --- a/google/services/workbench/iam_workbench_instance_generated_test.go +++ b/google/services/workbench/iam_workbench_instance_generated_test.go @@ -25,6 +25,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/hashicorp/terraform-provider-google/google/acctest" "github.com/hashicorp/terraform-provider-google/google/envvar" @@ -55,7 +56,7 @@ func TestAccWorkbenchInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_workbench_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-workbench-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateWorkbenchInstanceIAMBindingStateID("google_workbench_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -65,7 +66,7 @@ func TestAccWorkbenchInstanceIamBindingGenerated(t *testing.T) { }, { ResourceName: "google_workbench_instance_iam_binding.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-workbench-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateWorkbenchInstanceIAMBindingStateID("google_workbench_instance_iam_binding.foo"), ImportState: true, ImportStateVerify: true, }, @@ -91,7 +92,7 @@ func TestAccWorkbenchInstanceIamMemberGenerated(t *testing.T) { }, { ResourceName: "google_workbench_instance_iam_member.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s roles/viewer user:admin@hashicorptest.com", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-workbench-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateWorkbenchInstanceIAMMemberStateID("google_workbench_instance_iam_member.foo"), ImportState: true, ImportStateVerify: true, }, @@ -117,7 +118,7 @@ func TestAccWorkbenchInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_workbench_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-workbench-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateWorkbenchInstanceIAMPolicyStateID("google_workbench_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -126,7 +127,7 @@ func TestAccWorkbenchInstanceIamPolicyGenerated(t *testing.T) { }, { ResourceName: "google_workbench_instance_iam_policy.foo", - ImportStateId: fmt.Sprintf("projects/%s/locations/%s/instances/%s", envvar.GetTestProjectFromEnv(), "us-west1-a", fmt.Sprintf("tf-test-workbench-instance%s", context["random_suffix"])), + ImportStateIdFunc: generateWorkbenchInstanceIAMPolicyStateID("google_workbench_instance_iam_policy.foo"), ImportState: true, ImportStateVerify: true, }, @@ -235,3 +236,57 @@ resource "google_workbench_instance_iam_binding" "foo" { } `, context) } + +func generateWorkbenchInstanceIAMPolicyStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, name), "", "", rawState["condition.0.title"]), nil + } +} + +func generateWorkbenchInstanceIAMBindingStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, name), rawState["role"], "", rawState["condition.0.title"]), nil + } +} + +func generateWorkbenchInstanceIAMMemberStateID(iamResourceAddr string) func(*terraform.State) (string, error) { + return func(state *terraform.State) (string, error) { + var rawState map[string]string + for _, m := range state.Modules { + if len(m.Resources) > 0 { + if v, ok := m.Resources[iamResourceAddr]; ok { + rawState = v.Primary.Attributes + } + } + } + fmt.Printf("raw state %s\n", rawState) + project := tpgresource.GetResourceNameFromSelfLink(rawState["project"]) + location := tpgresource.GetResourceNameFromSelfLink(rawState["location"]) + name := tpgresource.GetResourceNameFromSelfLink(rawState["name"]) + return acctest.BuildIAMImportId(fmt.Sprintf("projects/%s/locations/%s/instances/%s", project, location, name), rawState["role"], rawState["member"], rawState["condition.0.title"]), nil + } +} diff --git a/google/services/workbench/resource_workbench_instance.go b/google/services/workbench/resource_workbench_instance.go index 6b937f8d938..2eddfff7d97 100644 --- a/google/services/workbench/resource_workbench_instance.go +++ b/google/services/workbench/resource_workbench_instance.go @@ -131,6 +131,7 @@ var WorkbenchInstanceProvidedMetadata = []string{ "enable-guest-attributes", "enable-oslogin", "proxy-registration-url", + "enable-jupyterlab4", } func WorkbenchInstanceMetadataDiffSuppress(k, old, new string, d *schema.ResourceData) bool { diff --git a/google/services/workbench/resource_workbench_instance_generated_meta.yaml b/google/services/workbench/resource_workbench_instance_generated_meta.yaml index 3e129827547..e09eff09700 100644 --- a/google/services/workbench/resource_workbench_instance_generated_meta.yaml +++ b/google/services/workbench/resource_workbench_instance_generated_meta.yaml @@ -1,73 +1,73 @@ -resource: 'google_workbench_instance' -generation_type: 'mmv1' -source_file: 'products/workbench/Instance.yaml' -api_service_name: 'notebooks.googleapis.com' -api_version: 'v2' -api_resource_type_kind: 'Instance' +resource: google_workbench_instance +generation_type: mmv1 +source_file: products/workbench/Instance.yaml +api_service_name: notebooks.googleapis.com +api_version: v2 +api_resource_type_kind: Instance fields: - - api_field: 'createTime' - - api_field: 'creator' - - field: 'desired_state' - provider_only: true - - api_field: 'disableProxyAccess' - - field: 'effective_labels' - provider_only: true - - api_field: 'enableManagedEuc' - - api_field: 'enableThirdPartyIdentity' - - api_field: 'gceSetup.acceleratorConfigs.coreCount' - - api_field: 'gceSetup.acceleratorConfigs.type' - - api_field: 'gceSetup.bootDisk.diskEncryption' - - api_field: 'gceSetup.bootDisk.diskSizeGb' - - api_field: 'gceSetup.bootDisk.diskType' - - api_field: 'gceSetup.bootDisk.kmsKey' - - api_field: 'gceSetup.confidentialInstanceConfig.confidentialInstanceType' - - api_field: 'gceSetup.containerImage.repository' - - api_field: 'gceSetup.containerImage.tag' - - api_field: 'gceSetup.dataDisks.diskEncryption' - - api_field: 'gceSetup.dataDisks.diskSizeGb' - - api_field: 'gceSetup.dataDisks.diskType' - - api_field: 'gceSetup.dataDisks.kmsKey' - - api_field: 'gceSetup.disablePublicIp' - - api_field: 'gceSetup.enableIpForwarding' - - api_field: 'gceSetup.machineType' - - api_field: 'gceSetup.metadata' - - api_field: 'gceSetup.networkInterfaces.accessConfigs.externalIp' - - api_field: 'gceSetup.networkInterfaces.network' - - api_field: 'gceSetup.networkInterfaces.nicType' - - api_field: 'gceSetup.networkInterfaces.subnet' - - api_field: 'gceSetup.reservationAffinity.consumeReservationType' - - api_field: 'gceSetup.reservationAffinity.key' - - api_field: 'gceSetup.reservationAffinity.values' - - api_field: 'gceSetup.serviceAccounts.email' - - api_field: 'gceSetup.serviceAccounts.scopes' - - api_field: 'gceSetup.shieldedInstanceConfig.enableIntegrityMonitoring' - - api_field: 'gceSetup.shieldedInstanceConfig.enableSecureBoot' - - api_field: 'gceSetup.shieldedInstanceConfig.enableVtpm' - - api_field: 'gceSetup.tags' - - api_field: 'gceSetup.vmImage.family' - - api_field: 'gceSetup.vmImage.name' - - api_field: 'gceSetup.vmImage.project' - - api_field: 'healthInfo' - - api_field: 'healthState' - - field: 'instance_id' - provider_only: true - - api_field: 'instanceOwners' - - api_field: 'labels' - - field: 'location' - provider_only: true - - field: 'name' - provider_only: true - - api_field: 'proxyUri' - - api_field: 'state' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'upgradeHistory.action' - - api_field: 'upgradeHistory.containerImage' - - api_field: 'upgradeHistory.createTime' - - api_field: 'upgradeHistory.framework' - - api_field: 'upgradeHistory.snapshot' - - api_field: 'upgradeHistory.state' - - api_field: 'upgradeHistory.targetVersion' - - api_field: 'upgradeHistory.version' - - api_field: 'upgradeHistory.vmImage' + - api_field: createTime + - api_field: creator + - field: desired_state + provider_only: true + - api_field: disableProxyAccess + - field: effective_labels + provider_only: true + - api_field: enableManagedEuc + - api_field: enableThirdPartyIdentity + - api_field: gceSetup.acceleratorConfigs.coreCount + - api_field: gceSetup.acceleratorConfigs.type + - api_field: gceSetup.bootDisk.diskEncryption + - api_field: gceSetup.bootDisk.diskSizeGb + - api_field: gceSetup.bootDisk.diskType + - api_field: gceSetup.bootDisk.kmsKey + - api_field: gceSetup.confidentialInstanceConfig.confidentialInstanceType + - api_field: gceSetup.containerImage.repository + - api_field: gceSetup.containerImage.tag + - api_field: gceSetup.dataDisks.diskEncryption + - api_field: gceSetup.dataDisks.diskSizeGb + - api_field: gceSetup.dataDisks.diskType + - api_field: gceSetup.dataDisks.kmsKey + - api_field: gceSetup.disablePublicIp + - api_field: gceSetup.enableIpForwarding + - api_field: gceSetup.machineType + - api_field: gceSetup.metadata + - api_field: gceSetup.networkInterfaces.accessConfigs.externalIp + - api_field: gceSetup.networkInterfaces.network + - api_field: gceSetup.networkInterfaces.nicType + - api_field: gceSetup.networkInterfaces.subnet + - api_field: gceSetup.reservationAffinity.consumeReservationType + - api_field: gceSetup.reservationAffinity.key + - api_field: gceSetup.reservationAffinity.values + - api_field: gceSetup.serviceAccounts.email + - api_field: gceSetup.serviceAccounts.scopes + - api_field: gceSetup.shieldedInstanceConfig.enableIntegrityMonitoring + - api_field: gceSetup.shieldedInstanceConfig.enableSecureBoot + - api_field: gceSetup.shieldedInstanceConfig.enableVtpm + - api_field: gceSetup.tags + - api_field: gceSetup.vmImage.family + - api_field: gceSetup.vmImage.name + - api_field: gceSetup.vmImage.project + - api_field: healthInfo + - api_field: healthState + - field: instance_id + provider_only: true + - api_field: instanceOwners + - api_field: labels + - field: location + provider_only: true + - field: name + provider_only: true + - api_field: proxyUri + - api_field: state + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: upgradeHistory.action + - api_field: upgradeHistory.containerImage + - api_field: upgradeHistory.createTime + - api_field: upgradeHistory.framework + - api_field: upgradeHistory.snapshot + - api_field: upgradeHistory.state + - api_field: upgradeHistory.targetVersion + - api_field: upgradeHistory.version + - api_field: upgradeHistory.vmImage diff --git a/google/services/workflows/resource_workflows_workflow_generated_meta.yaml b/google/services/workflows/resource_workflows_workflow_generated_meta.yaml index 6b318cd73b7..8a681613fe6 100644 --- a/google/services/workflows/resource_workflows_workflow_generated_meta.yaml +++ b/google/services/workflows/resource_workflows_workflow_generated_meta.yaml @@ -1,29 +1,29 @@ -resource: 'google_workflows_workflow' -generation_type: 'mmv1' -source_file: 'products/workflows/Workflow.yaml' -api_service_name: 'workflows.googleapis.com' -api_version: 'v1' -api_resource_type_kind: 'Workflow' +resource: google_workflows_workflow +generation_type: mmv1 +source_file: products/workflows/Workflow.yaml +api_service_name: workflows.googleapis.com +api_version: v1 +api_resource_type_kind: Workflow fields: - - api_field: 'callLogLevel' - - api_field: 'createTime' - - api_field: 'cryptoKeyName' - - field: 'deletion_protection' - provider_only: true - - api_field: 'description' - - field: 'effective_labels' - provider_only: true - - api_field: 'executionHistoryLevel' - - api_field: 'labels' - - api_field: 'name' - - field: 'region' - provider_only: true - - api_field: 'revisionId' - - api_field: 'serviceAccount' - - api_field: 'sourceContents' - - api_field: 'state' - - api_field: 'tags' - - field: 'terraform_labels' - provider_only: true - - api_field: 'updateTime' - - api_field: 'userEnvVars' + - api_field: callLogLevel + - api_field: createTime + - api_field: cryptoKeyName + - field: deletion_protection + provider_only: true + - api_field: description + - field: effective_labels + provider_only: true + - api_field: executionHistoryLevel + - api_field: labels + - api_field: name + - field: region + provider_only: true + - api_field: revisionId + - api_field: serviceAccount + - api_field: sourceContents + - api_field: state + - api_field: tags + - field: terraform_labels + provider_only: true + - api_field: updateTime + - api_field: userEnvVars diff --git a/google/sweeper/gcp_sweeper_test.go b/google/sweeper/gcp_sweeper_test.go index 2042b2ddb7d..2da01bbd292 100644 --- a/google/sweeper/gcp_sweeper_test.go +++ b/google/sweeper/gcp_sweeper_test.go @@ -29,6 +29,7 @@ import ( _ "github.com/hashicorp/terraform-provider-google/google/services/backupdr" _ "github.com/hashicorp/terraform-provider-google/google/services/beyondcorp" _ "github.com/hashicorp/terraform-provider-google/google/services/biglake" + _ "github.com/hashicorp/terraform-provider-google/google/services/biglakeiceberg" _ "github.com/hashicorp/terraform-provider-google/google/services/bigquery" _ "github.com/hashicorp/terraform-provider-google/google/services/bigqueryanalyticshub" _ "github.com/hashicorp/terraform-provider-google/google/services/bigqueryconnection" diff --git a/google/transport/config.go b/google/transport/config.go index ecc1ef77fca..9fc02a7641f 100644 --- a/google/transport/config.go +++ b/google/transport/config.go @@ -270,6 +270,7 @@ type Config struct { BackupDRBasePath string BeyondcorpBasePath string BiglakeBasePath string + BiglakeIcebergBasePath string BigQueryBasePath string BigqueryAnalyticsHubBasePath string BigqueryConnectionBasePath string @@ -446,6 +447,7 @@ const ArtifactRegistryBasePathKey = "ArtifactRegistry" const BackupDRBasePathKey = "BackupDR" const BeyondcorpBasePathKey = "Beyondcorp" const BiglakeBasePathKey = "Biglake" +const BiglakeIcebergBasePathKey = "BiglakeIceberg" const BigQueryBasePathKey = "BigQuery" const BigqueryAnalyticsHubBasePathKey = "BigqueryAnalyticsHub" const BigqueryConnectionBasePathKey = "BigqueryConnection" @@ -611,6 +613,7 @@ var DefaultBasePaths = map[string]string{ BackupDRBasePathKey: "https://backupdr.googleapis.com/v1/", BeyondcorpBasePathKey: "https://beyondcorp.googleapis.com/v1/", BiglakeBasePathKey: "https://biglake.googleapis.com/v1/", + BiglakeIcebergBasePathKey: "https://biglake.googleapis.com/", BigQueryBasePathKey: "https://bigquery.googleapis.com/bigquery/v2/", BigqueryAnalyticsHubBasePathKey: "https://analyticshub.googleapis.com/v1/", BigqueryConnectionBasePathKey: "https://bigqueryconnection.googleapis.com/v1/", @@ -901,6 +904,11 @@ func SetEndpointDefaults(d *schema.ResourceData) error { "GOOGLE_BIGLAKE_CUSTOM_ENDPOINT", }, DefaultBasePaths[BiglakeBasePathKey])) } + if d.Get("biglake_iceberg_custom_endpoint") == "" { + d.Set("biglake_iceberg_custom_endpoint", MultiEnvDefault([]string{ + "GOOGLE_BIGLAKE_ICEBERG_CUSTOM_ENDPOINT", + }, DefaultBasePaths[BiglakeIcebergBasePathKey])) + } if d.Get("big_query_custom_endpoint") == "" { d.Set("big_query_custom_endpoint", MultiEnvDefault([]string{ "GOOGLE_BIG_QUERY_CUSTOM_ENDPOINT", @@ -2687,6 +2695,7 @@ func ConfigureBasePaths(c *Config) { c.BackupDRBasePath = DefaultBasePaths[BackupDRBasePathKey] c.BeyondcorpBasePath = DefaultBasePaths[BeyondcorpBasePathKey] c.BiglakeBasePath = DefaultBasePaths[BiglakeBasePathKey] + c.BiglakeIcebergBasePath = DefaultBasePaths[BiglakeIcebergBasePathKey] c.BigQueryBasePath = DefaultBasePaths[BigQueryBasePathKey] c.BigqueryAnalyticsHubBasePath = DefaultBasePaths[BigqueryAnalyticsHubBasePathKey] c.BigqueryConnectionBasePath = DefaultBasePaths[BigqueryConnectionBasePathKey] diff --git a/google/transport/error_retry_predicates.go b/google/transport/error_retry_predicates.go index a1084108f91..7dd154e4c89 100644 --- a/google/transport/error_retry_predicates.go +++ b/google/transport/error_retry_predicates.go @@ -665,3 +665,13 @@ func IsSiteVerificationRetryableError(err error) (bool, string) { } return false, "" } + +// Retry when waiting for ingestion to create a 1P Dataplex entry corresponding to some other resource. +func IsDataplex1PEntryIngestedError(err error) (bool, string) { + if gerr, ok := err.(*googleapi.Error); ok { + if gerr.Code == 403 && strings.Contains(gerr.Body, "The action is not allowed on the Dataplex managed entry group") { + return true, fmt.Sprintf("Retry 403s for Dataplex Ingestion") + } + } + return false, "" +} diff --git a/website/docs/d/artifact_registry_versions.html.markdown b/website/docs/d/artifact_registry_versions.html.markdown new file mode 100644 index 00000000000..3315e90b9e3 --- /dev/null +++ b/website/docs/d/artifact_registry_versions.html.markdown @@ -0,0 +1,71 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: Handwritten *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/website/docs/d/artifact_registry_versions.html.markdown +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Artifact Registry" +description: |- + Get information about versions within a Google Artifact Registry package. +--- + +# google_artifact_registry_versions + +Get information about Artifact Registry versions. +See [the official documentation](https://cloud.google.com/artifact-registry/docs/overview) +and [API](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories.packages.versions/list). + +## Example Usage + +```hcl +data "google_artifact_registry_versions" "my_versions" { + location = "us-central1" + repository_id = "example-repo" + package_name = "example-package" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `location` - (Required) The location of the artifact registry. + +* `repository_id` - (Required) The last part of the repository name to fetch from. + +* `package_name` - (Required) The name of the package. + +* `filter` - (Optional) An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are `name` and `version`. Further information can be found in the [REST API](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories.packages.versions/list#query-parameters). + +* `view` - (Optional) The view, which determines what version information is returned in a response. Possible values are `"BASIC"` and `"FULL"`. Defaults to `"BASIC"`. + +* `project` - (Optional) The project ID in which the resource belongs. If it is not provided, the provider project is used. + +## Attributes Reference + +The following attributes are exported: + +* `versions` - A list of all retrieved Artifact Registry versions. Structure is [defined below](#nested_versions). + +The `versions` block supports: + +* `name` - The name of the version, for example: `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/version1`. If the package part contains slashes, the slashes are escaped. + +* `description` - Description of the version, as specified in its metadata. + +* `related_tags` - A list of related tags. Will contain up to 100 tags that reference this version. + +* `create_time` - The time, as a RFC 3339 string, this package was created. + +* `update_time` - The time, as a RFC 3339 string, this package was last updated. This includes publishing a new version of the package. + +* `annotations` - Client specified annotations. diff --git a/website/docs/d/backup_dr_backup.html.markdown b/website/docs/d/backup_dr_backup.html.markdown index cd35fa5c373..7d49f1a88f1 100644 --- a/website/docs/d/backup_dr_backup.html.markdown +++ b/website/docs/d/backup_dr_backup.html.markdown @@ -41,3 +41,20 @@ The following arguments are supported: * `project` - (Required) The Google Cloud Project in which the Backup belongs. * `data_source_id` - (Required) The ID of the Data Source in which the Backup belongs. * `backup_vault_id` - (Required) The ID of the Backup Vault of the Data Source in which the Backup belongs. + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `name` - Name of resource + +* `backups` - List of all backups under data source. Structure is defined below. + +The `backups` block supports: + +* `name` - Name of the resource. +* `location` - Location of the resource. +* `backup_id` - Id of the requesting object, Backup. +* `backup_vault_id` - Name of the Backup Vault associated with Backup. +* `data_source_id` - Name of the Data Source associated with Backup. +* `create_time` - The time when the backup was created. diff --git a/website/docs/d/biglake_iceberg_catalog_iam_policy.html.markdown b/website/docs/d/biglake_iceberg_catalog_iam_policy.html.markdown new file mode 100644 index 00000000000..108bed55341 --- /dev/null +++ b/website/docs/d/biglake_iceberg_catalog_iam_policy.html.markdown @@ -0,0 +1,54 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/datasource_iam.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Biglake" +description: |- + A datasource to retrieve the IAM policy state for Biglake IcebergCatalog +--- + + +# google_biglake_iceberg_catalog_iam_policy + +Retrieves the current IAM policy data for icebergcatalog + + +## Example Usage + + +```hcl +data "google_biglake_iceberg_catalog_iam_policy" "policy" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Used to find the parent resource to bind the IAM policy to + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used. + +## Attributes Reference + +The attributes are exported: + +* `etag` - (Computed) The etag of the IAM policy. + +* `policy_data` - (Required only by `google_biglake_iceberg_catalog_iam_policy`) The policy data generated by + a `google_iam_policy` data source. diff --git a/website/docs/d/cloud_identity_policies.html.markdown b/website/docs/d/cloud_identity_policies.html.markdown new file mode 100644 index 00000000000..3b3374b83ae --- /dev/null +++ b/website/docs/d/cloud_identity_policies.html.markdown @@ -0,0 +1,115 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: Handwritten *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/website/docs/d/cloud_identity_policies.html.markdown +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Cloud Identity" +layout: "google" +page_title: "Google: google_cloud_identity_policies" +sidebar_current: "docs-google-data-cloud-identity-list-policies" +description: |- + Use this data source to list Cloud Identity policies. +--- + +# google_cloud_identity_policies + +Use this data source to list Cloud Identity policies. + +## Example Usage + +```hcl +data "google_cloud_identity_policies" "all" { + # Example filter (optional)" + # filter = "customer == \"customers/my_customer\" && + # setting.type.matches('^settings/gmail\\..*$')" +} + +// The name of the first policy in the list of policies +output "first_policy_name" { + value = data.google_cloud_identity_policies.all.policies[0].name +} + +// The customer to whom the first policy belongs to. This will always be the +// same across multiple policies as well. +output "first_policy_customer" { + value = data.google_cloud_identity_policies.all.policies[0].customer +} + +// The CEL query of the first policy +output "policy_query_query" { + value = data.google_cloud_identity_policies.all.policies[0].policy_query[0].query +} + +// The org unit the first policy applies to +output "policy_query_org_unit" { + value = data.google_cloud_identity_policies.all.policies[0].policy_query[0].org_unit +} + +// The group the first policy applies to +output "policy_query_group" { + value = data.google_cloud_identity_policies.all.policies[0].policy_query[0].group +} + +// The sort order of the first policy +output "policy_query_sort_order" { + value = data.google_cloud_identity_policies.all.policies[0].policy_query[0].sort_order +} + +// The setting of the first policy as a JSON string +output "policy_setting" { + value = data.google_cloud_identity_policies.all.policies[0].setting +} + +// The type of policy - ADMIN/SYSTEM +output "policy_type" { + value = data.google_cloud_identity_policies.all.policies[0].type +} +``` + +## Argument Reference + +The following arguments are supported: + +* `filter` - (Optional) Filter expression for listing policies, as documented in the Cloud Identity Policy API policies.list method. + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `policies` - List of Cloud Identity policies that match the filter (or all policies if no filter is provided). Structure is documented below. + +--- + +The `policies` block contains: + +* `name` - The resource name of the policy. + +* `customer` - The customer that the policy belongs to. + +* `policy_query` - A list containing the CEL query that defines which entities the policy applies to. Structure is documented below. + +* `setting` - The setting configured by this policy, represented as a JSON string. + +* `type` - The type of the policy. + +--- + +The `policy_query` block contains: + +* `query` - The query that defines which entities the policy applies to. + +* `group` - The group that the policy applies to. + +* `org_unit` - The org unit that the policy applies to. + +* `sort_order` - The sort order of the policy. diff --git a/website/docs/d/compute_addresses.html.markdown b/website/docs/d/compute_addresses.html.markdown index c4d9e0197fc..e9258a915d6 100644 --- a/website/docs/d/compute_addresses.html.markdown +++ b/website/docs/d/compute_addresses.html.markdown @@ -93,6 +93,7 @@ exported: * `address` - The IP address (for example `1.2.3.4`). * `address_type` - The IP address type, can be `EXTERNAL` or `INTERNAL`. * `description` - The IP address description. +* `prefix_length` - The prefix length of the IP range. If not present, it means the address field is a single IP address. * `status` - Indicates if the address is used. Possible values are: RESERVED or IN_USE. * `labels` - (Beta only) A map containing IP labels. * `region` - The region in which the address resides. diff --git a/website/docs/d/compute_region_security_policy.html.markdown b/website/docs/d/compute_region_security_policy.html.markdown new file mode 100644 index 00000000000..e062019a89c --- /dev/null +++ b/website/docs/d/compute_region_security_policy.html.markdown @@ -0,0 +1,52 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: Handwritten *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/website/docs/d/compute_region_security_policy.html.markdown +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Compute Engine" +description: |- + Fetches the details of a Compute Region Security Policy. +--- + +# google_compute_region_security_policy + +Use this data source to get information about a Compute Region Security Policy. For more details, see the [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/regionSecurityPolicies). + +## Example Usage + +```hcl +data "google_compute_region_security_policy" "default" { + name = "my-region-security-policy" + region = "us-west2" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - + (Required) + The name of the Region Security Policy. + +* `region` - + (Optional) + The region in which the Region Security Policy resides. If not specified, the provider region is used. + +* `project` - + (Optional) + The ID of the project in which the resource belongs. If it is not provided, the provider project is used. + +## Attributes Reference + +See [google_compute_region_security_policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_region_security_policy) resource for details of all the available attributes. diff --git a/website/docs/d/compute_router_nat.html.markdown b/website/docs/d/compute_router_nat.html.markdown index 268231858c6..f12d5dc298c 100644 --- a/website/docs/d/compute_router_nat.html.markdown +++ b/website/docs/d/compute_router_nat.html.markdown @@ -20,7 +20,7 @@ description: |- # google_compute_router_nat -To get more information about Snapshot, see: +To get more information about RouterNat, see: * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/routers) * How-to Guides diff --git a/website/docs/d/compute_storage_pool.html.markdown b/website/docs/d/compute_storage_pool.html.markdown new file mode 100644 index 00000000000..529cfff8377 --- /dev/null +++ b/website/docs/d/compute_storage_pool.html.markdown @@ -0,0 +1,56 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: Handwritten *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/website/docs/d/compute_storage_pool.html.markdown +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Compute Engine" +description: |- + Provide access to a Storage Pool's attributes +--- + +# google_compute_storage_pool + +Provides access to available Google Compute Storage Pool resources for a given project and zone. +See more about [Hyperdisk Storage Pools](https://cloud.google.com/compute/docs/disks/storage-pools) in the upstream docs. + +## Example Usage + +```hcl +data "google_compute_storage_pool" "my_pool" { + name = "my-storage-pool" + zone = "us-central1-a" +} + +output "pool_capacity" { + value = data.google_compute_storage_pool.my_pool.pool_provisioned_capacity_gb +} + +output "pool_type" { + value = data.google_compute_storage_pool.my_pool.storage_pool_type +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` (Required) - The name of the Storage Pool. +* `zone` (Required) - The zone where the Storage Pool resides. +* `project` (Optional) - The project in which the Storage Pool exists. If it is not provided, the provider project is used. + +## Note +* `deletion_protection` is always set to false on the data source and will not be represetative of the actual value on `google_compute_storage_pool` reaosure being read + +## Attributes Reference + +See [google_compute_storage_pool](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_storage_pool) resource for details of the available attributes. diff --git a/website/docs/d/google_service_networking_peered_dns_domain.html.markdown b/website/docs/d/google_service_networking_peered_dns_domain.html.markdown new file mode 100644 index 00000000000..bd9819b6f09 --- /dev/null +++ b/website/docs/d/google_service_networking_peered_dns_domain.html.markdown @@ -0,0 +1,68 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: Handwritten *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/website/docs/d/google_service_networking_peered_dns_domain.html.markdown +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Service Networking" +description: |- + Get information about a Google Service Networking Peered DNS Domain. +--- + +# google_service_networking_peered_dns_domain + +Get information about a Google Service Networking Peered DNS Domain. + +When using Google Cloud DNS to manage internal DNS, peered DNS domains make your DNS available to services like Google Cloud Build. Use this data source to retrieve information about an existing peered DNS domain. + +For more information see [the API](https://cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.peeredDnsDomains) + +## Example Usage + +``` +data "google_service_networking_peered_dns_domain" "my_domain" { + project = "my-project" + name = "example-com" + network = "default" + service = "servicenetworking.googleapis.com" +} + +output "dns_suffix" { + value = data.google_service_networking_peered_dns_domain.my_domain.dns_suffix +} + +output "parent" { + value = data.google_service_networking_peered_dns_domain.my_domain.parent +} +``` + +## Argument Reference + +The following arguments are supported: + +* `project` - (Required) The producer project number or ID. + +* `name` - (Required) The internal name used for the peered DNS domain. + +* `network` - (Required) The network in the consumer project. + +* `service` - (Required) The private service connection between service and consumer network (e.g., `servicenetworking.googleapis.com`). + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `dns_suffix` - The DNS domain suffix of the peered DNS domain. + +* `parent` - An identifier for the resource with format `services/{{service}}/projects/{{project}}/global/networks/{{network}}`. + +* `id` - An identifier for the resource with format `services/{{service}}/projects/{{project}}/global/networks/{{network}}/peeredDnsDomains/{{name}}`. diff --git a/website/docs/r/access_context_manager_access_level.html.markdown b/website/docs/r/access_context_manager_access_level.html.markdown index fb56d0d7925..15d51b7cf09 100644 --- a/website/docs/r/access_context_manager_access_level.html.markdown +++ b/website/docs/r/access_context_manager_access_level.html.markdown @@ -169,7 +169,7 @@ The following arguments are supported: Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. - Structure is [documented below](#nested_basic_conditions_conditions_device_policy). + Structure is [documented below](#nested_basic_conditions_device_policy). * `regions` - (Optional) @@ -180,10 +180,10 @@ The following arguments are supported: * `vpc_network_sources` - (Optional) The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`. - Structure is [documented below](#nested_basic_conditions_conditions_vpc_network_sources). + Structure is [documented below](#nested_basic_conditions_vpc_network_sources). -The `device_policy` block supports: +The `device_policy` block supports: * `require_screen_lock` - (Optional) @@ -206,7 +206,7 @@ The following arguments are supported: (Optional) A list of allowed OS versions. An empty list allows all types and all versions. - Structure is [documented below](#nested_basic_conditions_conditions_device_policy_os_constraints). + Structure is [documented below](#nested_basic_conditions_device_policy_os_constraints). * `require_admin_approval` - (Optional) @@ -217,7 +217,7 @@ The following arguments are supported: Whether the device needs to be corp owned. -The `os_constraints` block supports: +The `os_constraints` block supports: * `minimum_version` - (Optional) @@ -234,15 +234,15 @@ The following arguments are supported: The operating system type of the device. Possible values are: `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, `IOS`. -The `vpc_network_sources` block supports: +The `vpc_network_sources` block supports: * `vpc_subnetwork` - (Optional) Sub networks within a VPC network. - Structure is [documented below](#nested_basic_conditions_conditions_vpc_network_sources_vpc_network_sources_vpc_subnetwork). + Structure is [documented below](#nested_basic_conditions_vpc_network_sources_vpc_subnetwork). -The `vpc_subnetwork` block supports: +The `vpc_subnetwork` block supports: * `network` - (Required) diff --git a/website/docs/r/access_context_manager_access_level_condition.html.markdown b/website/docs/r/access_context_manager_access_level_condition.html.markdown index 0ee38500c57..06fb2ff31cd 100644 --- a/website/docs/r/access_context_manager_access_level_condition.html.markdown +++ b/website/docs/r/access_context_manager_access_level_condition.html.markdown @@ -220,10 +220,10 @@ The following arguments are supported: * `vpc_subnetwork` - (Optional) Sub networks within a VPC network. - Structure is [documented below](#nested_vpc_network_sources_vpc_network_sources_vpc_subnetwork). + Structure is [documented below](#nested_vpc_network_sources_vpc_subnetwork). -The `vpc_subnetwork` block supports: +The `vpc_subnetwork` block supports: * `network` - (Required) diff --git a/website/docs/r/access_context_manager_access_levels.html.markdown b/website/docs/r/access_context_manager_access_levels.html.markdown index a67e1e2224d..a665f6f4e82 100644 --- a/website/docs/r/access_context_manager_access_levels.html.markdown +++ b/website/docs/r/access_context_manager_access_levels.html.markdown @@ -128,16 +128,16 @@ The following arguments are supported: * `basic` - (Optional) A set of predefined conditions for the access level and a combining function. - Structure is [documented below](#nested_access_levels_access_levels_basic). + Structure is [documented below](#nested_access_levels_basic). * `custom` - (Optional) Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. - Structure is [documented below](#nested_access_levels_access_levels_custom). + Structure is [documented below](#nested_access_levels_custom). -The `basic` block supports: +The `basic` block supports: * `combining_function` - (Optional) @@ -152,10 +152,10 @@ The following arguments are supported: * `conditions` - (Required) A set of requirements for the AccessLevel to be granted. - Structure is [documented below](#nested_access_levels_access_levels_basic_conditions). + Structure is [documented below](#nested_access_levels_basic_conditions). -The `conditions` block supports: +The `conditions` block supports: * `ip_subnetworks` - (Optional) @@ -199,7 +199,7 @@ The following arguments are supported: Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. - Structure is [documented below](#nested_access_levels_access_levels_basic_conditions_conditions_device_policy). + Structure is [documented below](#nested_access_levels_basic_conditions_device_policy). * `regions` - (Optional) @@ -210,10 +210,10 @@ The following arguments are supported: * `vpc_network_sources` - (Optional) The request must originate from one of the provided VPC networks in Google Cloud. Cannot specify this field together with `ip_subnetworks`. - Structure is [documented below](#nested_access_levels_access_levels_basic_conditions_conditions_vpc_network_sources). + Structure is [documented below](#nested_access_levels_basic_conditions_vpc_network_sources). -The `device_policy` block supports: +The `device_policy` block supports: * `require_screen_lock` - (Optional) @@ -236,7 +236,7 @@ The following arguments are supported: (Optional) A list of allowed OS versions. An empty list allows all types and all versions. - Structure is [documented below](#nested_access_levels_access_levels_basic_conditions_conditions_device_policy_os_constraints). + Structure is [documented below](#nested_access_levels_basic_conditions_device_policy_os_constraints). * `require_admin_approval` - (Optional) @@ -247,7 +247,7 @@ The following arguments are supported: Whether the device needs to be corp owned. -The `os_constraints` block supports: +The `os_constraints` block supports: * `minimum_version` - (Optional) @@ -260,15 +260,15 @@ The following arguments are supported: The operating system type of the device. Possible values are: `OS_UNSPECIFIED`, `DESKTOP_MAC`, `DESKTOP_WINDOWS`, `DESKTOP_LINUX`, `DESKTOP_CHROME_OS`, `ANDROID`, `IOS`. -The `vpc_network_sources` block supports: +The `vpc_network_sources` block supports: * `vpc_subnetwork` - (Optional) Sub networks within a VPC network. - Structure is [documented below](#nested_access_levels_access_levels_basic_conditions_conditions_vpc_network_sources_vpc_network_sources_vpc_subnetwork). + Structure is [documented below](#nested_access_levels_basic_conditions_vpc_network_sources_vpc_subnetwork). -The `vpc_subnetwork` block supports: +The `vpc_subnetwork` block supports: * `network` - (Required) @@ -278,17 +278,17 @@ The following arguments are supported: (Optional) CIDR block IP subnetwork specification. Must be IPv4. -The `custom` block supports: +The `custom` block supports: * `expr` - (Required) Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. - Structure is [documented below](#nested_access_levels_access_levels_custom_expr). + Structure is [documented below](#nested_access_levels_custom_expr). -The `expr` block supports: +The `expr` block supports: * `expression` - (Required) diff --git a/website/docs/r/access_context_manager_gcp_user_access_binding.html.markdown b/website/docs/r/access_context_manager_gcp_user_access_binding.html.markdown index df4a7d38360..34df11586fa 100644 --- a/website/docs/r/access_context_manager_gcp_user_access_binding.html.markdown +++ b/website/docs/r/access_context_manager_gcp_user_access_binding.html.markdown @@ -139,36 +139,36 @@ The following arguments are supported: * `scope` - (Optional) Optional. Application, etc. to which the access settings will be applied to. Implicitly, this is the scoped access settings key; as such, it must be unique and non-empty. - Structure is [documented below](#nested_scoped_access_settings_scoped_access_settings_scope). + Structure is [documented below](#nested_scoped_access_settings_scope). * `active_settings` - (Optional) Optional. Access settings for this scoped access settings. This field may be empty if dryRunSettings is set. - Structure is [documented below](#nested_scoped_access_settings_scoped_access_settings_active_settings). + Structure is [documented below](#nested_scoped_access_settings_active_settings). * `dry_run_settings` - (Optional) Optional. Dry-run access settings for this scoped access settings. This field may be empty if activeSettings is set. Cannot contain session settings. - Structure is [documented below](#nested_scoped_access_settings_scoped_access_settings_dry_run_settings). + Structure is [documented below](#nested_scoped_access_settings_dry_run_settings). -The `scope` block supports: +The `scope` block supports: * `client_scope` - (Optional) Optional. Client scope for this access scope. - Structure is [documented below](#nested_scoped_access_settings_scoped_access_settings_scope_client_scope). + Structure is [documented below](#nested_scoped_access_settings_scope_client_scope). -The `client_scope` block supports: +The `client_scope` block supports: * `restricted_client_application` - (Optional) Optional. The application that is subject to this binding's scope. Only one of clientId or name should be specified. - Structure is [documented below](#nested_scoped_access_settings_scoped_access_settings_scope_client_scope_restricted_client_application). + Structure is [documented below](#nested_scoped_access_settings_scope_client_scope_restricted_client_application). -The `restricted_client_application` block supports: +The `restricted_client_application` block supports: * `client_id` - (Optional) @@ -178,7 +178,7 @@ The following arguments are supported: (Optional) The name of the application. Example: "Cloud Console" -The `active_settings` block supports: +The `active_settings` block supports: * `access_levels` - (Optional) @@ -187,10 +187,10 @@ The following arguments are supported: * `session_settings` - (Optional) Optional. Session settings applied to user access on a given AccessScope. - Structure is [documented below](#nested_scoped_access_settings_scoped_access_settings_active_settings_session_settings). + Structure is [documented below](#nested_scoped_access_settings_active_settings_session_settings). -The `session_settings` block supports: +The `session_settings` block supports: * `session_reauth_method` - (Optional) @@ -213,7 +213,7 @@ The following arguments are supported: (Optional) Optional. This field enables or disables Google Cloud session length. When false, all fields set above will be disregarded and the session length is basically infinite. -The `dry_run_settings` block supports: +The `dry_run_settings` block supports: * `access_levels` - (Optional) diff --git a/website/docs/r/access_context_manager_service_perimeter.html.markdown b/website/docs/r/access_context_manager_service_perimeter.html.markdown index f0c5ad5d340..92e58f194f5 100644 --- a/website/docs/r/access_context_manager_service_perimeter.html.markdown +++ b/website/docs/r/access_context_manager_service_perimeter.html.markdown @@ -421,20 +421,20 @@ The following arguments are supported: (Optional) Defines the conditions on the source of a request causing this `IngressPolicy` to apply. - Structure is [documented below](#nested_status_ingress_policies_ingress_policies_ingress_from). + Structure is [documented below](#nested_status_ingress_policies_ingress_from). * `ingress_to` - (Optional) Defines the conditions on the `ApiOperation` and request destination that cause this `IngressPolicy` to apply. - Structure is [documented below](#nested_status_ingress_policies_ingress_policies_ingress_to). + Structure is [documented below](#nested_status_ingress_policies_ingress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `ingress_from` block supports: +The `ingress_from` block supports: * `identity_type` - (Optional) @@ -454,10 +454,10 @@ The following arguments are supported: * `sources` - (Optional) Sources that this `IngressPolicy` authorizes access from. - Structure is [documented below](#nested_status_ingress_policies_ingress_policies_ingress_from_sources). + Structure is [documented below](#nested_status_ingress_policies_ingress_from_sources). -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -482,7 +482,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `ingress_to` block supports: +The `ingress_to` block supports: * `resources` - (Optional) @@ -505,10 +505,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` the sources specified in corresponding `IngressFrom` are allowed to perform in this `ServicePerimeter`. - Structure is [documented below](#nested_status_ingress_policies_ingress_policies_ingress_to_operations). + Structure is [documented below](#nested_status_ingress_policies_ingress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -522,10 +522,10 @@ The following arguments are supported: the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_status_ingress_policies_ingress_policies_ingress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_status_ingress_policies_ingress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) @@ -543,20 +543,20 @@ The following arguments are supported: * `egress_from` - (Optional) Defines conditions on the source of a request causing this `EgressPolicy` to apply. - Structure is [documented below](#nested_status_egress_policies_egress_policies_egress_from). + Structure is [documented below](#nested_status_egress_policies_egress_from). * `egress_to` - (Optional) Defines the conditions on the `ApiOperation` and destination resources that cause this `EgressPolicy` to apply. - Structure is [documented below](#nested_status_egress_policies_egress_policies_egress_to). + Structure is [documented below](#nested_status_egress_policies_egress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `egress_from` block supports: +The `egress_from` block supports: * `identity_type` - (Optional) @@ -568,7 +568,7 @@ The following arguments are supported: * `sources` - (Optional) Sources that this EgressPolicy authorizes access from. - Structure is [documented below](#nested_status_egress_policies_egress_policies_egress_from_sources). + Structure is [documented below](#nested_status_egress_policies_egress_from_sources). * `source_restriction` - (Optional) @@ -584,7 +584,7 @@ The following arguments are supported: https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported. -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -599,7 +599,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `egress_to` block supports: +The `egress_to` block supports: * `resources` - (Optional) @@ -625,10 +625,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` that this egress rule applies to. A request matches if it contains an operation/service in this list. - Structure is [documented below](#nested_status_egress_policies_egress_policies_egress_to_operations). + Structure is [documented below](#nested_status_egress_policies_egress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -642,10 +642,10 @@ The following arguments are supported: to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_status_egress_policies_egress_policies_egress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_status_egress_policies_egress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) @@ -727,20 +727,20 @@ The following arguments are supported: (Optional) Defines the conditions on the source of a request causing this `IngressPolicy` to apply. - Structure is [documented below](#nested_spec_ingress_policies_ingress_policies_ingress_from). + Structure is [documented below](#nested_spec_ingress_policies_ingress_from). * `ingress_to` - (Optional) Defines the conditions on the `ApiOperation` and request destination that cause this `IngressPolicy` to apply. - Structure is [documented below](#nested_spec_ingress_policies_ingress_policies_ingress_to). + Structure is [documented below](#nested_spec_ingress_policies_ingress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `ingress_from` block supports: +The `ingress_from` block supports: * `identity_type` - (Optional) @@ -758,10 +758,10 @@ The following arguments are supported: * `sources` - (Optional) Sources that this `IngressPolicy` authorizes access from. - Structure is [documented below](#nested_spec_ingress_policies_ingress_policies_ingress_from_sources). + Structure is [documented below](#nested_spec_ingress_policies_ingress_from_sources). -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -783,7 +783,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `ingress_to` block supports: +The `ingress_to` block supports: * `resources` - (Optional) @@ -806,10 +806,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` the sources specified in corresponding `IngressFrom` are allowed to perform in this `ServicePerimeter`. - Structure is [documented below](#nested_spec_ingress_policies_ingress_policies_ingress_to_operations). + Structure is [documented below](#nested_spec_ingress_policies_ingress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -823,10 +823,10 @@ The following arguments are supported: the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_spec_ingress_policies_ingress_policies_ingress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_spec_ingress_policies_ingress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) @@ -844,20 +844,20 @@ The following arguments are supported: * `egress_from` - (Optional) Defines conditions on the source of a request causing this `EgressPolicy` to apply. - Structure is [documented below](#nested_spec_egress_policies_egress_policies_egress_from). + Structure is [documented below](#nested_spec_egress_policies_egress_from). * `egress_to` - (Optional) Defines the conditions on the `ApiOperation` and destination resources that cause this `EgressPolicy` to apply. - Structure is [documented below](#nested_spec_egress_policies_egress_policies_egress_to). + Structure is [documented below](#nested_spec_egress_policies_egress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `egress_from` block supports: +The `egress_from` block supports: * `identity_type` - (Optional) @@ -869,7 +869,7 @@ The following arguments are supported: * `sources` - (Optional) Sources that this EgressPolicy authorizes access from. - Structure is [documented below](#nested_spec_egress_policies_egress_policies_egress_from_sources). + Structure is [documented below](#nested_spec_egress_policies_egress_from_sources). * `source_restriction` - (Optional) @@ -883,7 +883,7 @@ The following arguments are supported: represent individual user or service account only. -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -898,7 +898,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `egress_to` block supports: +The `egress_to` block supports: * `resources` - (Optional) @@ -924,10 +924,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` that this egress rule applies to. A request matches if it contains an operation/service in this list. - Structure is [documented below](#nested_spec_egress_policies_egress_policies_egress_to_operations). + Structure is [documented below](#nested_spec_egress_policies_egress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -941,10 +941,10 @@ The following arguments are supported: to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_spec_egress_policies_egress_policies_egress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_spec_egress_policies_egress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) diff --git a/website/docs/r/access_context_manager_service_perimeter_dry_run_egress_policy.html.markdown b/website/docs/r/access_context_manager_service_perimeter_dry_run_egress_policy.html.markdown index 04d89d9b863..87017dffdd9 100644 --- a/website/docs/r/access_context_manager_service_perimeter_dry_run_egress_policy.html.markdown +++ b/website/docs/r/access_context_manager_service_perimeter_dry_run_egress_policy.html.markdown @@ -239,10 +239,10 @@ The following arguments are supported: to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_egress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_egress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) diff --git a/website/docs/r/access_context_manager_service_perimeter_dry_run_ingress_policy.html.markdown b/website/docs/r/access_context_manager_service_perimeter_dry_run_ingress_policy.html.markdown index 4160d82b947..4cd590ed027 100644 --- a/website/docs/r/access_context_manager_service_perimeter_dry_run_ingress_policy.html.markdown +++ b/website/docs/r/access_context_manager_service_perimeter_dry_run_ingress_policy.html.markdown @@ -246,10 +246,10 @@ The following arguments are supported: the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_ingress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_ingress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) diff --git a/website/docs/r/access_context_manager_service_perimeter_egress_policy.html.markdown b/website/docs/r/access_context_manager_service_perimeter_egress_policy.html.markdown index 0ba8a86f439..8efd418ae32 100644 --- a/website/docs/r/access_context_manager_service_perimeter_egress_policy.html.markdown +++ b/website/docs/r/access_context_manager_service_perimeter_egress_policy.html.markdown @@ -239,10 +239,10 @@ The following arguments are supported: to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_egress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_egress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) diff --git a/website/docs/r/access_context_manager_service_perimeter_ingress_policy.html.markdown b/website/docs/r/access_context_manager_service_perimeter_ingress_policy.html.markdown index 803c2c961ec..74e38aa3972 100644 --- a/website/docs/r/access_context_manager_service_perimeter_ingress_policy.html.markdown +++ b/website/docs/r/access_context_manager_service_perimeter_ingress_policy.html.markdown @@ -249,10 +249,10 @@ The following arguments are supported: the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_ingress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_ingress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) diff --git a/website/docs/r/access_context_manager_service_perimeters.html.markdown b/website/docs/r/access_context_manager_service_perimeters.html.markdown index eab0881f79f..4f21b7e2d81 100644 --- a/website/docs/r/access_context_manager_service_perimeters.html.markdown +++ b/website/docs/r/access_context_manager_service_perimeters.html.markdown @@ -151,7 +151,7 @@ The following arguments are supported: ServicePerimeter configuration. Specifies sets of resources, restricted services and access levels that determine perimeter content and boundaries. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status). + Structure is [documented below](#nested_service_perimeters_status). * `spec` - (Optional) @@ -159,7 +159,7 @@ The following arguments are supported: This configuration allows to specify and test ServicePerimeter configuration without enforcing actual access restrictions. Only allowed to be set when the `useExplicitDryRunSpec` flag is set. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec). + Structure is [documented below](#nested_service_perimeters_spec). * `use_explicit_dry_run_spec` - (Optional) @@ -174,7 +174,7 @@ The following arguments are supported: bet set to True if any of the fields in the spec are set to non-default values. -The `status` block supports: +The `status` block supports: * `resources` - (Optional) @@ -206,7 +206,7 @@ The following arguments are supported: (Optional) Specifies how APIs are allowed to communicate within the Service Perimeter. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_vpc_accessible_services). + Structure is [documented below](#nested_service_perimeters_status_vpc_accessible_services). * `ingress_policies` - (Optional) @@ -214,7 +214,7 @@ The following arguments are supported: have multiple `IngressPolicies`, each of which is evaluated separately. Access is granted if any `Ingress Policy` grants it. Must be empty for a perimeter bridge. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_ingress_policies). + Structure is [documented below](#nested_service_perimeters_status_ingress_policies). * `egress_policies` - (Optional) @@ -222,10 +222,10 @@ The following arguments are supported: have multiple EgressPolicies, each of which is evaluated separately. Access is granted if any EgressPolicy grants it. Must be empty for a perimeter bridge. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_egress_policies). + Structure is [documented below](#nested_service_perimeters_status_egress_policies). -The `vpc_accessible_services` block supports: +The `vpc_accessible_services` block supports: * `enable_restriction` - (Optional) @@ -237,26 +237,26 @@ The following arguments are supported: The list of APIs usable within the Service Perimeter. Must be empty unless `enableRestriction` is True. -The `ingress_policies` block supports: +The `ingress_policies` block supports: * `ingress_from` - (Optional) Defines the conditions on the source of a request causing this `IngressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_ingress_policies_ingress_policies_ingress_from). + Structure is [documented below](#nested_service_perimeters_status_ingress_policies_ingress_from). * `ingress_to` - (Optional) Defines the conditions on the `ApiOperation` and request destination that cause this `IngressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_ingress_policies_ingress_policies_ingress_to). + Structure is [documented below](#nested_service_perimeters_status_ingress_policies_ingress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `ingress_from` block supports: +The `ingress_from` block supports: * `identity_type` - (Optional) @@ -274,10 +274,10 @@ The following arguments are supported: * `sources` - (Optional) Sources that this `IngressPolicy` authorizes access from. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_ingress_policies_ingress_policies_ingress_from_sources). + Structure is [documented below](#nested_service_perimeters_status_ingress_policies_ingress_from_sources). -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -299,7 +299,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `ingress_to` block supports: +The `ingress_to` block supports: * `resources` - (Optional) @@ -322,10 +322,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` the sources specified in corresponding `IngressFrom` are allowed to perform in this `ServicePerimeter`. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_ingress_policies_ingress_policies_ingress_to_operations). + Structure is [documented below](#nested_service_perimeters_status_ingress_policies_ingress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -339,10 +339,10 @@ The following arguments are supported: the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_ingress_policies_ingress_policies_ingress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_service_perimeters_status_ingress_policies_ingress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) @@ -355,25 +355,25 @@ The following arguments are supported: Value for permission should be a valid Cloud IAM permission for the corresponding `serviceName` in `ApiOperation`. -The `egress_policies` block supports: +The `egress_policies` block supports: * `egress_from` - (Optional) Defines conditions on the source of a request causing this `EgressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_egress_policies_egress_policies_egress_from). + Structure is [documented below](#nested_service_perimeters_status_egress_policies_egress_from). * `egress_to` - (Optional) Defines the conditions on the `ApiOperation` and destination resources that cause this `EgressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_egress_policies_egress_policies_egress_to). + Structure is [documented below](#nested_service_perimeters_status_egress_policies_egress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `egress_from` block supports: +The `egress_from` block supports: * `identity_type` - (Optional) @@ -391,7 +391,7 @@ The following arguments are supported: * `sources` - (Optional) Sources that this EgressPolicy authorizes access from. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_egress_policies_egress_policies_egress_from_sources). + Structure is [documented below](#nested_service_perimeters_status_egress_policies_egress_from_sources). * `source_restriction` - (Optional) @@ -399,7 +399,7 @@ The following arguments are supported: Possible values are: `SOURCE_RESTRICTION_UNSPECIFIED`, `SOURCE_RESTRICTION_ENABLED`, `SOURCE_RESTRICTION_DISABLED`. -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -414,7 +414,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `egress_to` block supports: +The `egress_to` block supports: * `resources` - (Optional) @@ -440,10 +440,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` that this egress rule applies to. A request matches if it contains an operation/service in this list. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_egress_policies_egress_policies_egress_to_operations). + Structure is [documented below](#nested_service_perimeters_status_egress_policies_egress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -457,10 +457,10 @@ The following arguments are supported: to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_service_perimeters_service_perimeters_status_egress_policies_egress_policies_egress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_service_perimeters_status_egress_policies_egress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) @@ -473,7 +473,7 @@ The following arguments are supported: Value for permission should be a valid Cloud IAM permission for the corresponding `serviceName` in `ApiOperation`. -The `spec` block supports: +The `spec` block supports: * `resources` - (Optional) @@ -505,7 +505,7 @@ The following arguments are supported: (Optional) Specifies how APIs are allowed to communicate within the Service Perimeter. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_vpc_accessible_services). + Structure is [documented below](#nested_service_perimeters_spec_vpc_accessible_services). * `ingress_policies` - (Optional) @@ -513,7 +513,7 @@ The following arguments are supported: have multiple `IngressPolicies`, each of which is evaluated separately. Access is granted if any `Ingress Policy` grants it. Must be empty for a perimeter bridge. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_ingress_policies). + Structure is [documented below](#nested_service_perimeters_spec_ingress_policies). * `egress_policies` - (Optional) @@ -521,10 +521,10 @@ The following arguments are supported: have multiple EgressPolicies, each of which is evaluated separately. Access is granted if any EgressPolicy grants it. Must be empty for a perimeter bridge. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_egress_policies). + Structure is [documented below](#nested_service_perimeters_spec_egress_policies). -The `vpc_accessible_services` block supports: +The `vpc_accessible_services` block supports: * `enable_restriction` - (Optional) @@ -536,26 +536,26 @@ The following arguments are supported: The list of APIs usable within the Service Perimeter. Must be empty unless `enableRestriction` is True. -The `ingress_policies` block supports: +The `ingress_policies` block supports: * `ingress_from` - (Optional) Defines the conditions on the source of a request causing this `IngressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_ingress_policies_ingress_policies_ingress_from). + Structure is [documented below](#nested_service_perimeters_spec_ingress_policies_ingress_from). * `ingress_to` - (Optional) Defines the conditions on the `ApiOperation` and request destination that cause this `IngressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_ingress_policies_ingress_policies_ingress_to). + Structure is [documented below](#nested_service_perimeters_spec_ingress_policies_ingress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `ingress_from` block supports: +The `ingress_from` block supports: * `identity_type` - (Optional) @@ -573,10 +573,10 @@ The following arguments are supported: * `sources` - (Optional) Sources that this `IngressPolicy` authorizes access from. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_ingress_policies_ingress_policies_ingress_from_sources). + Structure is [documented below](#nested_service_perimeters_spec_ingress_policies_ingress_from_sources). -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -598,7 +598,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `ingress_to` block supports: +The `ingress_to` block supports: * `resources` - (Optional) @@ -621,10 +621,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` the sources specified in corresponding `IngressFrom` are allowed to perform in this `ServicePerimeter`. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_ingress_policies_ingress_policies_ingress_to_operations). + Structure is [documented below](#nested_service_perimeters_spec_ingress_policies_ingress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -638,10 +638,10 @@ The following arguments are supported: the service specified by serviceName field. A single `MethodSelector` entry with `*` specified for the method field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_ingress_policies_ingress_policies_ingress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_service_perimeters_spec_ingress_policies_ingress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) @@ -654,25 +654,25 @@ The following arguments are supported: Value for permission should be a valid Cloud IAM permission for the corresponding `serviceName` in `ApiOperation`. -The `egress_policies` block supports: +The `egress_policies` block supports: * `egress_from` - (Optional) Defines conditions on the source of a request causing this `EgressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_egress_policies_egress_policies_egress_from). + Structure is [documented below](#nested_service_perimeters_spec_egress_policies_egress_from). * `egress_to` - (Optional) Defines the conditions on the `ApiOperation` and destination resources that cause this `EgressPolicy` to apply. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_egress_policies_egress_policies_egress_to). + Structure is [documented below](#nested_service_perimeters_spec_egress_policies_egress_to). * `title` - (Optional) Human readable title. Must be unique within the perimeter. Does not affect behavior. -The `egress_from` block supports: +The `egress_from` block supports: * `identity_type` - (Optional) @@ -692,7 +692,7 @@ The following arguments are supported: * `sources` - (Optional) Sources that this EgressPolicy authorizes access from. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_egress_policies_egress_policies_egress_from_sources). + Structure is [documented below](#nested_service_perimeters_spec_egress_policies_egress_from_sources). * `source_restriction` - (Optional) @@ -700,7 +700,7 @@ The following arguments are supported: Possible values are: `SOURCE_RESTRICTION_UNSPECIFIED`, `SOURCE_RESTRICTION_ENABLED`, `SOURCE_RESTRICTION_DISABLED`. -The `sources` block supports: +The `sources` block supports: * `access_level` - (Optional) @@ -715,7 +715,7 @@ The following arguments are supported: organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. -The `egress_to` block supports: +The `egress_to` block supports: * `resources` - (Optional) @@ -741,10 +741,10 @@ The following arguments are supported: (Optional) A list of `ApiOperations` that this egress rule applies to. A request matches if it contains an operation/service in this list. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_egress_policies_egress_policies_egress_to_operations). + Structure is [documented below](#nested_service_perimeters_spec_egress_policies_egress_to_operations). -The `operations` block supports: +The `operations` block supports: * `service_name` - (Optional) @@ -758,10 +758,10 @@ The following arguments are supported: to the service specified by `serviceName` field. A single MethodSelector entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. - Structure is [documented below](#nested_service_perimeters_service_perimeters_spec_egress_policies_egress_policies_egress_to_operations_operations_method_selectors). + Structure is [documented below](#nested_service_perimeters_spec_egress_policies_egress_to_operations_method_selectors). -The `method_selectors` block supports: +The `method_selectors` block supports: * `method` - (Optional) diff --git a/website/docs/r/alloydb_cluster.html.markdown b/website/docs/r/alloydb_cluster.html.markdown index 813e1ccc98a..fc3c49ea7a6 100644 --- a/website/docs/r/alloydb_cluster.html.markdown +++ b/website/docs/r/alloydb_cluster.html.markdown @@ -680,10 +680,10 @@ Default value: "true" * `start_time` - (Required) Preferred time to start the maintenance operation on the specified day. Maintenance will start within 1 hour of this time. - Structure is [documented below](#nested_maintenance_update_policy_maintenance_windows_maintenance_windows_start_time). + Structure is [documented below](#nested_maintenance_update_policy_maintenance_windows_start_time). -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Required) diff --git a/website/docs/r/alloydb_instance.html.markdown b/website/docs/r/alloydb_instance.html.markdown index 2a0db74d73f..11e9ff78905 100644 --- a/website/docs/r/alloydb_instance.html.markdown +++ b/website/docs/r/alloydb_instance.html.markdown @@ -279,6 +279,11 @@ The following arguments are supported: Instance level network configuration. Structure is [documented below](#nested_network_config). +* `connection_pool_config` - + (Optional) + Configuration for Managed Connection Pool. + Structure is [documented below](#nested_connection_pool_config). + The `query_insights_config` block supports: @@ -472,6 +477,28 @@ The following arguments are supported: (Optional) CIDR range for one authorized network of the instance. +The `connection_pool_config` block supports: + +* `enabled` - + (Required) + Whether to enabled Managed Connection Pool. + +* `pooler_count` - + (Output) + The number of running poolers per instance. + +* `flags` - + (Optional) + Flags for configuring managed connection pooling when it is enabled. + These flags will only be set if `connection_pool_config.enabled` is + true. + Please see + https://cloud.google.com/alloydb/docs/configure-managed-connection-pooling#configuration-options + for a comprehensive list of flags that can be set. To specify the flags + in Terraform, please remove the "connection-pooling-" prefix and use + underscores instead of dashes in the name. For example, + "connection-pooling-pool-mode" would be "pool_mode". + ## Attributes Reference In addition to the arguments listed above, the following computed attributes are exported: diff --git a/website/docs/r/api_gateway_api_config.html.markdown b/website/docs/r/api_gateway_api_config.html.markdown index 2fd44d7fc0e..781d1a719e8 100644 --- a/website/docs/r/api_gateway_api_config.html.markdown +++ b/website/docs/r/api_gateway_api_config.html.markdown @@ -189,10 +189,10 @@ The following arguments are supported: * `document` - (Required) The OpenAPI Specification document file. - Structure is [documented below](#nested_openapi_documents_openapi_documents_document). + Structure is [documented below](#nested_openapi_documents_document). -The `document` block supports: +The `document` block supports: * `path` - (Required) @@ -209,15 +209,15 @@ The following arguments are supported: Input only. File descriptor set, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $ protoc --include_imports --include_source_info test.proto -o out.pb - Structure is [documented below](#nested_grpc_services_grpc_services_file_descriptor_set). + Structure is [documented below](#nested_grpc_services_file_descriptor_set). * `source` - (Optional) Uncompiled proto files associated with the descriptor set, used for display purposes (server-side compilation is not supported). These should match the inputs to 'protoc' command used to generate fileDescriptorSet. - Structure is [documented below](#nested_grpc_services_grpc_services_source). + Structure is [documented below](#nested_grpc_services_source). -The `file_descriptor_set` block supports: +The `file_descriptor_set` block supports: * `path` - (Required) @@ -227,7 +227,7 @@ The following arguments are supported: (Required) Base64 encoded content of the file. -The `source` block supports: +The `source` block supports: * `path` - (Required) diff --git a/website/docs/r/apigee_api_product.html.markdown b/website/docs/r/apigee_api_product.html.markdown index 7ab2f44159d..791f3d1a660 100644 --- a/website/docs/r/apigee_api_product.html.markdown +++ b/website/docs/r/apigee_api_product.html.markdown @@ -118,6 +118,17 @@ resource "google_apigee_instance" "apigee_instance" { peering_cidr_range = "SLASH_22" } +resource "google_apigee_environment" "env_dev" { + name = "dev" + org_id = google_apigee_organization.apigee_org.id +} + +resource "google_apigee_api" "test_apigee_api" { + name = "hello-world" + org_id = google_apigee_organization.apigee_org.name + config_bundle = "apigee_api_bundle.zip" +} + resource "google_apigee_api_product" "full_api_product" { org_id = google_apigee_organization.apigee_org.id name = "my-product" @@ -132,7 +143,7 @@ resource "google_apigee_api_product" "full_api_product" { value = "private" } - environments = ["dev", "hom"] + environments = ["dev"] proxies = ["hello-world"] api_resources = [ "/", @@ -149,7 +160,9 @@ resource "google_apigee_api_product" "full_api_product" { quota_counter_scope = "PROXY" depends_on = [ - google_apigee_instance.apigee_instance + google_apigee_instance.apigee_instance, + google_apigee_environment.env_dev, + google_apigee_api.test_apigee_api ] } ``` @@ -191,6 +204,11 @@ resource "google_apigee_instance" "apigee_instance" { peering_cidr_range = "SLASH_22" } +resource "google_apigee_environment" "env_dev" { + name = "dev" + org_id = google_apigee_organization.apigee_org.id +} + resource "google_apigee_api_product" "full_api_product" { org_id = google_apigee_organization.apigee_org.id name = "my-product" @@ -205,7 +223,7 @@ resource "google_apigee_api_product" "full_api_product" { quota_time_unit = "day" quota_counter_scope = "PROXY" - environments = ["dev", "hom"] + environments = ["dev"] # Set them in reverse order to test set scopes = [ @@ -349,7 +367,8 @@ resource "google_apigee_api_product" "full_api_product" { } depends_on = [ - google_apigee_instance.apigee_instance + google_apigee_instance.apigee_instance, + google_apigee_environment.env_dev ] } ``` @@ -481,20 +500,20 @@ The following arguments are supported: (Optional) List of resource/method pairs for the API proxy or remote service to which quota will applied. Note: Currently, you can specify only a single resource/method pair. The call will fail if more than one resource/method pair is provided. - Structure is [documented below](#nested_operation_group_operation_configs_operation_configs_operations). + Structure is [documented below](#nested_operation_group_operation_configs_operations). * `quota` - (Optional) Quota parameters to be enforced for the resources, methods, and API source combination. If none are specified, quota enforcement will not be done. - Structure is [documented below](#nested_operation_group_operation_configs_operation_configs_quota). + Structure is [documented below](#nested_operation_group_operation_configs_quota). * `attributes` - (Optional) Custom attributes associated with the operation. - Structure is [documented below](#nested_operation_group_operation_configs_operation_configs_attributes). + Structure is [documented below](#nested_operation_group_operation_configs_attributes). -The `operations` block supports: +The `operations` block supports: * `resource` - (Optional) @@ -504,7 +523,7 @@ The following arguments are supported: (Optional) Methods refers to the REST verbs, when none specified, all verb types are allowed. -The `quota` block supports: +The `quota` block supports: * `limit` - (Optional) @@ -518,7 +537,7 @@ The following arguments are supported: (Optional) Time unit defined for the interval. Valid values include second, minute, hour, day, month or year. If limit and interval are valid, the default value is hour; otherwise, the default is null. -The `attributes` block supports: +The `attributes` block supports: * `name` - (Optional) @@ -551,20 +570,20 @@ The following arguments are supported: (Optional) Required. List of GraphQL name/operation type pairs for the proxy or remote service to which quota will be applied. If only operation types are specified, the quota will be applied to all GraphQL requests irrespective of the GraphQL name. Note: Currently, you can specify only a single GraphQLOperation. Specifying more than one will cause the operation to fail. - Structure is [documented below](#nested_graphql_operation_group_operation_configs_operation_configs_operations). + Structure is [documented below](#nested_graphql_operation_group_operation_configs_operations). * `quota` - (Optional) Quota parameters to be enforced for the resources, methods, and API source combination. If none are specified, quota enforcement will not be done. - Structure is [documented below](#nested_graphql_operation_group_operation_configs_operation_configs_quota). + Structure is [documented below](#nested_graphql_operation_group_operation_configs_quota). * `attributes` - (Optional) Custom attributes associated with the operation. - Structure is [documented below](#nested_graphql_operation_group_operation_configs_operation_configs_attributes). + Structure is [documented below](#nested_graphql_operation_group_operation_configs_attributes). -The `operations` block supports: +The `operations` block supports: * `operation_types` - (Optional) @@ -575,7 +594,7 @@ The following arguments are supported: (Optional) GraphQL operation name. The name and operation type will be used to apply quotas. If no name is specified, the quota will be applied to all GraphQL operations irrespective of their operation names in the payload. -The `quota` block supports: +The `quota` block supports: * `limit` - (Optional) @@ -589,7 +608,7 @@ The following arguments are supported: (Optional) Time unit defined for the interval. Valid values include second, minute, hour, day, month or year. If limit and interval are valid, the default value is hour; otherwise, the default is null. -The `attributes` block supports: +The `attributes` block supports: * `name` - (Optional) @@ -622,19 +641,19 @@ The following arguments are supported: * `quota` - (Optional) Quota parameters to be enforced for the resources, methods, and API source combination. If none are specified, quota enforcement will not be done. - Structure is [documented below](#nested_grpc_operation_group_operation_configs_operation_configs_quota). + Structure is [documented below](#nested_grpc_operation_group_operation_configs_quota). * `attributes` - (Optional) Custom attributes associated with the operation. - Structure is [documented below](#nested_grpc_operation_group_operation_configs_operation_configs_attributes). + Structure is [documented below](#nested_grpc_operation_group_operation_configs_attributes). * `service` - (Optional) Required. gRPC Service name associated to be associated with the API proxy, on which quota rules can be applied upon. -The `quota` block supports: +The `quota` block supports: * `limit` - (Optional) @@ -648,7 +667,7 @@ The following arguments are supported: (Optional) Time unit defined for the interval. Valid values include second, minute, hour, day, month or year. If limit and interval are valid, the default value is hour; otherwise, the default is null. -The `attributes` block supports: +The `attributes` block supports: * `name` - (Optional) diff --git a/website/docs/r/apigee_developer_app.html.markdown b/website/docs/r/apigee_developer_app.html.markdown index e847d8a03a5..1cbb797b7ca 100644 --- a/website/docs/r/apigee_developer_app.html.markdown +++ b/website/docs/r/apigee_developer_app.html.markdown @@ -34,7 +34,7 @@ To get more information about DeveloperApp, see: * [Creating a developer](https://cloud.google.com/apigee/docs/api-platform/publish/creating-apps-surface-your-api) ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `credentials.credentials.consumer_secret`. +values will be stored in the raw state as plain text: `credentials.consumer_secret`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data). ## Example Usage - Apigee Developer App Basic @@ -314,15 +314,15 @@ In addition to the arguments listed above, the following computed attributes are * `api_products` - (Output) List of API products this credential can be used for. - Structure is [documented below](#nested_credentials_credentials_api_products). + Structure is [documented below](#nested_credentials_api_products). * `attributes` - (Output) Developer attributes (name/value pairs). The custom attribute limit is 18. - Structure is [documented below](#nested_credentials_credentials_attributes). + Structure is [documented below](#nested_credentials_attributes). -The `api_products` block contains: +The `api_products` block contains: * `apiproduct` - (Output) @@ -332,7 +332,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Status of the API product. Valid values are approved or revoked. -The `attributes` block contains: +The `attributes` block contains: * `name` - (Output) diff --git a/website/docs/r/apigee_security_feedback.html.markdown b/website/docs/r/apigee_security_feedback.html.markdown new file mode 100644 index 00000000000..e8c6267aa50 --- /dev/null +++ b/website/docs/r/apigee_security_feedback.html.markdown @@ -0,0 +1,206 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/apigee/SecurityFeedback.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Apigee" +description: |- + Represents a feedback report from an Advanced API Security customer. +--- + +# google_apigee_security_feedback + +Represents a feedback report from an Advanced API Security customer. +Manages customer feedback about ML models. + + +To get more information about SecurityFeedback, see: + +* [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.securityFeedback/create) +* How-to Guides + * [Create a SecurityFeedback](https://docs.cloud.google.com/apigee/docs/api-security/abuse-detection#exclude-traffic-from-abuse-detection) + +## Example Usage - Apigee Security Feedback Basic + + +```hcl +data "google_client_config" "current" {} + +resource "google_compute_network" "apigee_network" { + name = "apigee-network" +} + +resource "google_compute_global_address" "apigee_range" { + name = "apigee-range" + purpose = "VPC_PEERING" + address_type = "INTERNAL" + prefix_length = 16 + network = google_compute_network.apigee_network.id +} + +resource "google_service_networking_connection" "apigee_vpc_connection" { + network = google_compute_network.apigee_network.id + service = "servicenetworking.googleapis.com" + reserved_peering_ranges = [google_compute_global_address.apigee_range.name] +} + +resource "google_apigee_organization" "apigee_org" { + analytics_region = "us-central1" + project_id = data.google_client_config.current.project + authorized_network = google_compute_network.apigee_network.id + depends_on = [google_service_networking_connection.apigee_vpc_connection] +} + +resource "google_apigee_addons_config" "apigee_org_security_addons_config" { + org = google_apigee_organization.apigee_org.name + addons_config { + api_security_config { + enabled = true + } + } +} + +resource "google_apigee_security_feedback" "security_feedback" { + feedback_id = "my-feedback" + org_id = google_apigee_organization.apigee_org.id + display_name = "terraform test display name" + feedback_type = "EXCLUDED_DETECTION" + reason = "INTERNAL_SYSTEM" + comment = "terraform test comment" + feedback_contexts { + attribute = "ATTRIBUTE_ENVIRONMENTS" + values = [google_apigee_environment.apigee_environment.name] + } + feedback_contexts { + attribute = "ATTRIBUTE_IP_ADDRESS_RANGES" + values = ["10.0.0.0", "172.16.0.0/12"] + } + depends_on = [ + google_apigee_addons_config.apigee_org_security_addons_config + ] +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `feedback_contexts` - + (Required) + One or more attribute/value pairs for constraining the feedback. + Structure is [documented below](#nested_feedback_contexts). + +* `feedback_type` - + (Required) + The type of feedback being submitted. + Possible values are: `EXCLUDED_DETECTION`. + +* `org_id` - + (Required) + The Apigee Organization associated with the Apigee Security Feedback, + in the format `organizations/{{org_name}}`. + +* `feedback_id` - + (Required) + Resource ID of the security feedback. + + +* `display_name` - + (Optional) + The display name of the feedback. + +* `reason` - + (Optional) + The reason for the feedback. + Possible values are: `INTERNAL_SYSTEM`, `NON_RISK_CLIENT`, `NAT`, `PENETRATION_TEST`, `OTHER`. + +* `comment` - + (Optional) + Optional text the user can provide for additional, unstructured context. + + + +The `feedback_contexts` block supports: + +* `attribute` - + (Required) + The attribute the user is providing feedback about. + Possible values are: `ATTRIBUTE_ENVIRONMENTS`, `ATTRIBUTE_IP_ADDRESS_RANGES`. + +* `values` - + (Required) + The values of the attribute the user is providing feedback about, separated by commas. + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `{{org_id}}/securityFeedback/{{feedback_id}}` + +* `name` - + Name of the security feedback resource, + in the format `organizations/{{org_name}}/securityFeedback/{{feedback_id}}`. + +* `create_time` - + The time when this specific feedback id was created. + +* `update_time` - + The time when this specific feedback id was updated. + + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +SecurityFeedback can be imported using any of these accepted formats: + +* `{{org_id}}/securityFeedback/{{feedback_id}}` +* `{{org_id}}/{{feedback_id}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import SecurityFeedback using identity values. For example: + +```tf +import { + identity = { + orgId = "<-required value->" + feedbackId = "<-required value->" + } + to = google_apigee_security_feedback.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import SecurityFeedback using one of the formats above. For example: + +```tf +import { + id = "{{org_id}}/securityFeedback/{{feedback_id}}" + to = google_apigee_security_feedback.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), SecurityFeedback can be imported using one of the formats above. For example: + +``` +$ terraform import google_apigee_security_feedback.default {{org_id}}/securityFeedback/{{feedback_id}} +$ terraform import google_apigee_security_feedback.default {{org_id}}/{{feedback_id}} +``` diff --git a/website/docs/r/apihub_plugin.html.markdown b/website/docs/r/apihub_plugin.html.markdown index 69980430260..885dceaf074 100644 --- a/website/docs/r/apihub_plugin.html.markdown +++ b/website/docs/r/apihub_plugin.html.markdown @@ -236,12 +236,12 @@ The following arguments are supported: * `enum_options` - (Optional) Enum options. To be populated if `ValueType` is `ENUM`. - Structure is [documented below](#nested_config_template_additional_config_template_additional_config_template_enum_options). + Structure is [documented below](#nested_config_template_additional_config_template_enum_options). * `multi_select_options` - (Optional) Multi select options. To be populated if `ValueType` is `MULTI_SELECT`. - Structure is [documented below](#nested_config_template_additional_config_template_additional_config_template_multi_select_options). + Structure is [documented below](#nested_config_template_additional_config_template_multi_select_options). * `id` - (Required) @@ -271,7 +271,7 @@ The following arguments are supported: `ConfigVariable`. -The `enum_options` block supports: +The `enum_options` block supports: * `id` - (Required) @@ -285,7 +285,7 @@ The following arguments are supported: (Optional) Description of the option. -The `multi_select_options` block supports: +The `multi_select_options` block supports: * `id` - (Required) diff --git a/website/docs/r/apihub_plugin_instance.html.markdown b/website/docs/r/apihub_plugin_instance.html.markdown index 60551b77e83..18ca9010cd5 100644 --- a/website/docs/r/apihub_plugin_instance.html.markdown +++ b/website/docs/r/apihub_plugin_instance.html.markdown @@ -94,7 +94,7 @@ The following arguments are supported: * `hub_instance_action` - (Output) The execution status for the plugin instance. - Structure is [documented below](#nested_actions_actions_hub_instance_action). + Structure is [documented below](#nested_actions_hub_instance_action). * `action_id` - (Required) @@ -120,7 +120,7 @@ The following arguments are supported: * `curation_config` - (Optional) The curation information for this plugin instance. - Structure is [documented below](#nested_actions_actions_curation_config). + Structure is [documented below](#nested_actions_curation_config). * `schedule_time_zone` - (Optional) @@ -128,7 +128,7 @@ The following arguments are supported: be used. -The `hub_instance_action` block contains: +The `hub_instance_action` block contains: * `current_execution_state` - (Output) @@ -141,10 +141,10 @@ The following arguments are supported: * `last_execution` - (Output) The result of the last execution of the plugin instance. - Structure is [documented below](#nested_actions_actions_hub_instance_action_last_execution). + Structure is [documented below](#nested_actions_hub_instance_action_last_execution). -The `last_execution` block contains: +The `last_execution` block contains: * `result` - (Output) @@ -167,12 +167,12 @@ The following arguments are supported: (Output) The last execution end time of the plugin instance. -The `curation_config` block supports: +The `curation_config` block supports: * `custom_curation` - (Optional) Custom curation information for this plugin instance. - Structure is [documented below](#nested_actions_actions_curation_config_custom_curation). + Structure is [documented below](#nested_actions_curation_config_custom_curation). * `curation_type` - (Required) @@ -182,7 +182,7 @@ The following arguments are supported: CUSTOM_CURATION_FOR_API_METADATA -The `custom_curation` block supports: +The `custom_curation` block supports: * `curation` - (Required) diff --git a/website/docs/r/app_engine_flexible_app_version.html.markdown b/website/docs/r/app_engine_flexible_app_version.html.markdown index 4d1fd5a9896..00621ff6f37 100644 --- a/website/docs/r/app_engine_flexible_app_version.html.markdown +++ b/website/docs/r/app_engine_flexible_app_version.html.markdown @@ -467,22 +467,22 @@ The following arguments are supported: (Optional) Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script:" "auto". - Structure is [documented below](#nested_handlers_handlers_script). + Structure is [documented below](#nested_handlers_script). * `static_files` - (Optional) Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them. - Structure is [documented below](#nested_handlers_handlers_static_files). + Structure is [documented below](#nested_handlers_static_files). -The `script` block supports: +The `script` block supports: * `script_path` - (Required) Path to the script from the application root directory. -The `static_files` block supports: +The `static_files` block supports: * `path` - (Optional) diff --git a/website/docs/r/app_engine_standard_app_version.html.markdown b/website/docs/r/app_engine_standard_app_version.html.markdown index 7276d0cc4dd..202a3164e65 100644 --- a/website/docs/r/app_engine_standard_app_version.html.markdown +++ b/website/docs/r/app_engine_standard_app_version.html.markdown @@ -306,21 +306,21 @@ The following arguments are supported: (Optional) Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script:" "auto". - Structure is [documented below](#nested_handlers_handlers_script). + Structure is [documented below](#nested_handlers_script). * `static_files` - (Optional) Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them. - Structure is [documented below](#nested_handlers_handlers_static_files). + Structure is [documented below](#nested_handlers_static_files). -The `script` block supports: +The `script` block supports: * `script_path` - (Required) Path to the script from the application root directory. -The `static_files` block supports: +The `static_files` block supports: * `path` - (Optional) diff --git a/website/docs/r/apphub_boundary.html.markdown b/website/docs/r/apphub_boundary.html.markdown new file mode 100644 index 00000000000..f9b4a6513eb --- /dev/null +++ b/website/docs/r/apphub_boundary.html.markdown @@ -0,0 +1,129 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/apphub/Boundary.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "App Hub" +description: |- + Application management boundary. +--- + +# google_apphub_boundary + +Application management boundary. + + +To get more information about Boundary, see: + +* [API documentation](https://docs.cloud.google.com/app-hub/docs/reference/rest/v1/Boundary) +* How-to Guides + * [AppHub](https://docs.cloud.google.com/app-hub/docs/) + +## Example Usage - Apphub Boundary Basic + + +```hcl +resource "google_apphub_boundary" "example" { + location = "global" + crm_node = "projects/1111111111111" +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `location` - + (Required) + The location for the Boundary resource. Must be global. + + +* `crm_node` - + (Optional) + Optional. The resource name of the CRM node being attached to the + boundary. + Format: `projects/{project-number}` + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/boundary` + +* `name` - + Identifier. The resource name of the boundary. + Format: "projects/{project}/locations/{{location}}/boundary" + +* `create_time` - + Create time. + +* `update_time` - + Update time. + +* `type` - + Boundary type. + + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +Boundary can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/boundary` +* `{{project}}/{{location}}` +* `{{location}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import Boundary using identity values. For example: + +```tf +import { + identity = { + location = "<-required value->" + project = "<-optional value->" + } + to = google_apphub_boundary.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Boundary using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/boundary" + to = google_apphub_boundary.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Boundary can be imported using one of the formats above. For example: + +``` +$ terraform import google_apphub_boundary.default projects/{{project}}/locations/{{location}}/boundary +$ terraform import google_apphub_boundary.default {{project}}/{{location}} +$ terraform import google_apphub_boundary.default {{location}} +``` diff --git a/website/docs/r/apphub_service.html.markdown b/website/docs/r/apphub_service.html.markdown index cadd25225e9..2749af38e35 100644 --- a/website/docs/r/apphub_service.html.markdown +++ b/website/docs/r/apphub_service.html.markdown @@ -483,10 +483,10 @@ In addition to the arguments listed above, the following computed attributes are * `value` - (Output) The value of the extended metadata. - Structure is [documented below](#nested_service_properties_extended_metadata_extended_metadata_value). + Structure is [documented below](#nested_service_properties_extended_metadata_value). -The `value` block contains: +The `value` block contains: * `metadata_struct` - (Output) diff --git a/website/docs/r/apphub_workload.html.markdown b/website/docs/r/apphub_workload.html.markdown index 3160099aedf..b5dee498c06 100644 --- a/website/docs/r/apphub_workload.html.markdown +++ b/website/docs/r/apphub_workload.html.markdown @@ -504,10 +504,10 @@ In addition to the arguments listed above, the following computed attributes are * `value` - (Output) The value of the extended metadata. - Structure is [documented below](#nested_workload_properties_extended_metadata_extended_metadata_value). + Structure is [documented below](#nested_workload_properties_extended_metadata_value). -The `value` block contains: +The `value` block contains: * `metadata_struct` - (Output) diff --git a/website/docs/r/artifact_registry_repository.html.markdown b/website/docs/r/artifact_registry_repository.html.markdown index a7629c5b5aa..f186f545e71 100644 --- a/website/docs/r/artifact_registry_repository.html.markdown +++ b/website/docs/r/artifact_registry_repository.html.markdown @@ -833,16 +833,16 @@ The following arguments are supported: * `condition` - (Optional) Policy condition for matching versions. - Structure is [documented below](#nested_cleanup_policies_cleanup_policies_condition). + Structure is [documented below](#nested_cleanup_policies_condition). * `most_recent_versions` - (Optional) Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. - Structure is [documented below](#nested_cleanup_policies_cleanup_policies_most_recent_versions). + Structure is [documented below](#nested_cleanup_policies_most_recent_versions). -The `condition` block supports: +The `condition` block supports: * `tag_state` - (Optional) @@ -870,7 +870,7 @@ The following arguments are supported: (Optional) Match versions newer than a duration. -The `most_recent_versions` block supports: +The `most_recent_versions` block supports: * `package_name_prefixes` - (Optional) diff --git a/website/docs/r/backup_dr_backup_plan.html.markdown b/website/docs/r/backup_dr_backup_plan.html.markdown index 70e2251411d..7e145f3a47f 100644 --- a/website/docs/r/backup_dr_backup_plan.html.markdown +++ b/website/docs/r/backup_dr_backup_plan.html.markdown @@ -45,6 +45,7 @@ resource "google_backup_dr_backup_plan" "my-backup-plan-1" { backup_plan_id = "backup-plan-simple-test" resource_type = "compute.googleapis.com/Instance" backup_vault = google_backup_dr_backup_vault.my_backup_vault.id + max_custom_on_demand_retention_days = 30 backup_rules { rule_id = "rule-1" @@ -80,6 +81,7 @@ resource "google_backup_dr_backup_plan" "my-disk-backup-plan-1" { backup_plan_id = "backup-plan-disk-test" resource_type = "compute.googleapis.com/Disk" backup_vault = google_backup_dr_backup_vault.my_backup_vault.id + max_custom_on_demand_retention_days = 30 backup_rules { rule_id = "rule-1" @@ -165,6 +167,10 @@ The following arguments are supported: (Optional) The description allows for additional details about `BackupPlan` and its use cases to be provided. +* `max_custom_on_demand_retention_days` - + (Optional) + The maximum number of days for which an on-demand backup taken with custom retention can be retained. + * `log_retention_days` - (Optional) This is only applicable for CloudSql resource. Days for which logs will be stored. This value should be greater than or equal to minimum enforced log retention duration of the backup vault. @@ -187,10 +193,10 @@ The following arguments are supported: * `standard_schedule` - (Required) StandardSchedule defines a schedule that runs within the confines of a defined window of days. - Structure is [documented below](#nested_backup_rules_backup_rules_standard_schedule). + Structure is [documented below](#nested_backup_rules_standard_schedule). -The `standard_schedule` block supports: +The `standard_schedule` block supports: * `recurrence_type` - (Required) @@ -214,7 +220,7 @@ The following arguments are supported: * `week_day_of_month` - (Optional) Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run. - Structure is [documented below](#nested_backup_rules_backup_rules_standard_schedule_week_day_of_month). + Structure is [documented below](#nested_backup_rules_standard_schedule_week_day_of_month). * `months` - (Optional) @@ -229,10 +235,10 @@ The following arguments are supported: (Optional) A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as `NOT_RUN` if they do not start by the end of the window. - Structure is [documented below](#nested_backup_rules_backup_rules_standard_schedule_backup_window). + Structure is [documented below](#nested_backup_rules_standard_schedule_backup_window). -The `week_day_of_month` block supports: +The `week_day_of_month` block supports: * `week_of_month` - (Required) @@ -244,7 +250,7 @@ The following arguments are supported: Specifies the day of the week. Possible values are: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `backup_window` block supports: +The `backup_window` block supports: * `start_hour_of_day` - (Required) diff --git a/website/docs/r/backup_dr_backup_plan_association.html.markdown b/website/docs/r/backup_dr_backup_plan_association.html.markdown index df57c4d75d3..af28fbb7868 100644 --- a/website/docs/r/backup_dr_backup_plan_association.html.markdown +++ b/website/docs/r/backup_dr_backup_plan_association.html.markdown @@ -179,10 +179,10 @@ In addition to the arguments listed above, the following computed attributes are * `last_backup_error` - (Output) google.rpc.Status object to store the last backup error - Structure is [documented below](#nested_rules_config_info_rules_config_info_last_backup_error). + Structure is [documented below](#nested_rules_config_info_last_backup_error). -The `last_backup_error` block contains: +The `last_backup_error` block contains: * `code` - (Output) diff --git a/website/docs/r/beyondcorp_security_gateway.html.markdown b/website/docs/r/beyondcorp_security_gateway.html.markdown index 5f16edb3aa9..fd1ac4c82dc 100644 --- a/website/docs/r/beyondcorp_security_gateway.html.markdown +++ b/website/docs/r/beyondcorp_security_gateway.html.markdown @@ -135,10 +135,10 @@ The following arguments are supported: * `internet_gateway` - (Optional) Internet Gateway configuration. - Structure is [documented below](#nested_hubs_hub_internet_gateway). + Structure is [documented below](#nested_hubs_internet_gateway). -The `internet_gateway` block supports: +The `internet_gateway` block supports: * `assigned_ips` - (Output) diff --git a/website/docs/r/beyondcorp_security_gateway_application.html.markdown b/website/docs/r/beyondcorp_security_gateway_application.html.markdown index 544217a1844..6a9fe6d0949 100644 --- a/website/docs/r/beyondcorp_security_gateway_application.html.markdown +++ b/website/docs/r/beyondcorp_security_gateway_application.html.markdown @@ -235,46 +235,46 @@ The following arguments are supported: * `egress_policy` - (Optional) Optional. Routing policy information. - Structure is [documented below](#nested_upstreams_upstreams_egress_policy). + Structure is [documented below](#nested_upstreams_egress_policy). * `network` - (Optional) Network to forward traffic to. - Structure is [documented below](#nested_upstreams_upstreams_network). + Structure is [documented below](#nested_upstreams_network). * `external` - (Optional) List of the external endpoints to forward traffic to. - Structure is [documented below](#nested_upstreams_upstreams_external). + Structure is [documented below](#nested_upstreams_external). * `proxy_protocol` - (Optional) Shared proxy configuration for all apps. - Structure is [documented below](#nested_upstreams_upstreams_proxy_protocol). + Structure is [documented below](#nested_upstreams_proxy_protocol). -The `egress_policy` block supports: +The `egress_policy` block supports: * `regions` - (Required) Required. List of regions where the application sends traffic to. -The `network` block supports: +The `network` block supports: * `name` - (Required) Required. Network name is of the format: `projects/{project}/global/networks/{network}` -The `external` block supports: +The `external` block supports: * `endpoints` - (Required) List of the endpoints to forward traffic to. - Structure is [documented below](#nested_upstreams_upstreams_external_endpoints). + Structure is [documented below](#nested_upstreams_external_endpoints). -The `endpoints` block supports: +The `endpoints` block supports: * `hostname` - (Required) @@ -284,7 +284,7 @@ The following arguments are supported: (Required) Port of the endpoint. -The `proxy_protocol` block supports: +The `proxy_protocol` block supports: * `allowed_client_headers` - (Optional) @@ -293,7 +293,7 @@ The following arguments are supported: * `contextual_headers` - (Optional) Configuration for the contextual headers. - Structure is [documented below](#nested_upstreams_upstreams_proxy_protocol_contextual_headers). + Structure is [documented below](#nested_upstreams_proxy_protocol_contextual_headers). * `metadata_headers` - (Optional) @@ -313,22 +313,22 @@ The following arguments are supported: Client IP configuration. The client IP address is included if true. -The `contextual_headers` block supports: +The `contextual_headers` block supports: * `user_info` - (Optional) User info configuration. - Structure is [documented below](#nested_upstreams_upstreams_proxy_protocol_contextual_headers_user_info). + Structure is [documented below](#nested_upstreams_proxy_protocol_contextual_headers_user_info). * `group_info` - (Optional) Group info configuration. - Structure is [documented below](#nested_upstreams_upstreams_proxy_protocol_contextual_headers_group_info). + Structure is [documented below](#nested_upstreams_proxy_protocol_contextual_headers_group_info). * `device_info` - (Optional) Device info configuration. - Structure is [documented below](#nested_upstreams_upstreams_proxy_protocol_contextual_headers_device_info). + Structure is [documented below](#nested_upstreams_proxy_protocol_contextual_headers_device_info). * `output_type` - (Optional) @@ -336,21 +336,21 @@ The following arguments are supported: Possible values are: `PROTOBUF`, `JSON`, `NONE`. -The `user_info` block supports: +The `user_info` block supports: * `output_type` - (Optional) The output type of the delegated user info. Possible values are: `PROTOBUF`, `JSON`, `NONE`. -The `group_info` block supports: +The `group_info` block supports: * `output_type` - (Optional) The output type of the delegated group info. Possible values are: `PROTOBUF`, `JSON`, `NONE`. -The `device_info` block supports: +The `device_info` block supports: * `output_type` - (Optional) diff --git a/website/docs/r/biglake_iceberg_catalog.html.markdown b/website/docs/r/biglake_iceberg_catalog.html.markdown new file mode 100644 index 00000000000..807ae90b868 --- /dev/null +++ b/website/docs/r/biglake_iceberg_catalog.html.markdown @@ -0,0 +1,168 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Biglake" +description: |- + IcebergCatalogs are top-level containers for Apache Iceberg REST Catalog served Namespaces and Tables. +--- + +# google_biglake_iceberg_catalog + +IcebergCatalogs are top-level containers for Apache Iceberg REST Catalog served Namespaces and Tables. + + +To get more information about IcebergCatalog, see: +* How-to Guides + * [Use the BigLake metastore Iceberg REST catalog](https://docs.cloud.google.com/biglake/docs/blms-rest-catalog) + +~> **Warning:** If you are using User ADCs (Application Default Credentials) with this resource's IAM, +you must specify a `billing_project` and set `user_project_override` to true +in the provider configuration. Otherwise the IAM API will return 403s. +Your account must have the `serviceusage.services.use` permission on the +`billing_project` you defined. + +## Example Usage - Biglake Iceberg Catalog + + +```hcl +resource "google_storage_bucket" "bucket_for_my_iceberg_catalog" { + name = "my_iceberg_catalog" + location = "us-central1" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_biglake_iceberg_catalog" "my_iceberg_catalog" { + name = "my_iceberg_catalog" + catalog_type = "CATALOG_TYPE_GCS_BUCKET" + depends_on = [ + google_storage_bucket.bucket_for_my_iceberg_catalog + ] +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `catalog_type` - + (Required) + The catalog type of the IcebergCatalog. Currently only supports the type for Google Cloud Storage Buckets. + Possible values are: `CATALOG_TYPE_GCS_BUCKET`. + +* `name` - + (Required) + The name of the IcebergCatalog. Format: + projects/{project_id_or_number}/catalogs/{iceberg_catalog_id} + + +* `credential_mode` - + (Optional) + The credential mode used for the catalog. CREDENTIAL_MODE_END_USER - End user credentials, default. The authenticating user must have access to the catalog resources and the corresponding Google Cloud Storage files. CREDENTIAL_MODE_VENDED_CREDENTIALS - Use credential vending. The authenticating user must have access to the catalog resources and the system will provide the caller with downscoped credentials to access the Google Cloud Storage files. All table operations in this mode would require `X-Iceberg-Access-Delegation` header with `vended-credentials` value included. System will generate a service account and the catalog administrator must grant the service account appropriate permissions. + Possible values are: `CREDENTIAL_MODE_END_USER`, `CREDENTIAL_MODE_VENDED_CREDENTIALS`. + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}` + +* `biglake_service_account` - + Output only. The service account used for credential vending. It might be empty if credential vending was never enabled for the catalog. + +* `default_location` - + Output only. The default storage location for the catalog, e.g., `gs://my-bucket`. + +* `storage_regions` - + Output only. The GCP region(s) where the physical metadata for the tables is stored, e.g. `us-central1`, `nam4` or `us`. This will contain one value for all locations, except for the catalogs that are configured to use custom dual region buckets. + +* `create_time` - + Output only. The creation time of the IcebergCatalog. + +* `update_time` - + Output only. The last modification time of the IcebergCatalog. + +* `replicas` - + Output only. The replicas for the catalog metadata. + Structure is [documented below](#nested_replicas). + + +The `replicas` block contains: + +* `region` - + (Output) + The region of the replica, e.g., `us-east1`. + +* `state` - + (Output) + If the IcebergCatalog is replicated to multiple regions, this describes the current state of the replica. STATE_UNKNOWN - The replica state is unknown. STATE_PRIMARY - The replica is the writable primary. STATE_PRIMARY_IN_PROGRESS - The replica has been recently assigned as the primary, but not all namespaces are writeable yet. STATE_SECONDARY - The replica is a read-only secondary replica. + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +IcebergCatalog can be imported using any of these accepted formats: + +* `iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}` +* `{{project}}/{{name}}` +* `{{name}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import IcebergCatalog using identity values. For example: + +```tf +import { + identity = { + name = "<-required value->" + project = "<-optional value->" + } + to = google_biglake_iceberg_catalog.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import IcebergCatalog using one of the formats above. For example: + +```tf +import { + id = "iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}}" + to = google_biglake_iceberg_catalog.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), IcebergCatalog can be imported using one of the formats above. For example: + +``` +$ terraform import google_biglake_iceberg_catalog.default iceberg/v1/restcatalog/extensions/projects/{{project}}/catalogs/{{name}} +$ terraform import google_biglake_iceberg_catalog.default {{project}}/{{name}} +$ terraform import google_biglake_iceberg_catalog.default {{name}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). diff --git a/website/docs/r/biglake_iceberg_catalog_iam.html.markdown b/website/docs/r/biglake_iceberg_catalog_iam.html.markdown new file mode 100644 index 00000000000..632cf77a8f1 --- /dev/null +++ b/website/docs/r/biglake_iceberg_catalog_iam.html.markdown @@ -0,0 +1,152 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/biglakeiceberg/IcebergCatalog.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource_iam.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Biglake" +description: |- + Collection of resources to manage IAM policy for Biglake IcebergCatalog +--- + +# IAM policy for Biglake IcebergCatalog + +Three different resources help you manage your IAM policy for Biglake IcebergCatalog. Each of these resources serves a different use case: + +* `google_biglake_iceberg_catalog_iam_policy`: Authoritative. Sets the IAM policy for the icebergcatalog and replaces any existing policy already attached. +* `google_biglake_iceberg_catalog_iam_binding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the icebergcatalog are preserved. +* `google_biglake_iceberg_catalog_iam_member`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the icebergcatalog are preserved. + +A data source can be used to retrieve policy data in advent you do not need creation + +* `google_biglake_iceberg_catalog_iam_policy`: Retrieves the IAM policy for the icebergcatalog + +~> **Note:** `google_biglake_iceberg_catalog_iam_policy` **cannot** be used in conjunction with `google_biglake_iceberg_catalog_iam_binding` and `google_biglake_iceberg_catalog_iam_member` or they will fight over what your policy should be. + +~> **Note:** `google_biglake_iceberg_catalog_iam_binding` resources **can be** used in conjunction with `google_biglake_iceberg_catalog_iam_member` resources **only if** they do not grant privilege to the same role. + + + +## google_biglake_iceberg_catalog_iam_policy + +```hcl +data "google_iam_policy" "admin" { + binding { + role = "roles/biglake.editor" + members = [ + "user:jane@example.com", + ] + } +} + +resource "google_biglake_iceberg_catalog_iam_policy" "policy" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + policy_data = data.google_iam_policy.admin.policy_data +} +``` + +## google_biglake_iceberg_catalog_iam_binding + +```hcl +resource "google_biglake_iceberg_catalog_iam_binding" "binding" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + role = "roles/biglake.editor" + members = [ + "user:jane@example.com", + ] +} +``` + +## google_biglake_iceberg_catalog_iam_member + +```hcl +resource "google_biglake_iceberg_catalog_iam_member" "member" { + project = google_biglake_iceberg_catalog.my_iceberg_catalog.project + name = google_biglake_iceberg_catalog.my_iceberg_catalog.name + role = "roles/biglake.editor" + member = "user:jane@example.com" +} +``` + + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Used to find the parent resource to bind the IAM policy to + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used. + +* `member/members` - (Required) Identities that will be granted the privilege in `role`. + Each entry can have one of the following values: + * **allUsers**: A special identifier that represents anyone who is on the internet; with or without a Google account. + * **allAuthenticatedUsers**: A special identifier that represents anyone who is authenticated with a Google account or a service account. + * **user:{emailid}**: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com. + * **serviceAccount:{emailid}**: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com. + * **group:{emailid}**: An email address that represents a Google group. For example, admins@example.com. + * **domain:{domain}**: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com. + * **projectOwner:projectid**: Owners of the given project. For example, "projectOwner:my-example-project" + * **projectEditor:projectid**: Editors of the given project. For example, "projectEditor:my-example-project" + * **projectViewer:projectid**: Viewers of the given project. For example, "projectViewer:my-example-project" + * **Federated identities**: One or more federated identities in a workload or workforce identity pool, workload running on GKE, etc. Refer to the [Principal identifiers documentation](https://cloud.google.com/iam/docs/principal-identifiers#allow) for examples of targets and valid configuration. For example, "principal://iam.googleapis.com/locations/global/workforcePools/example-contractors/subject/joe@example.com" + +* `role` - (Required) The role that should be applied. Only one + `google_biglake_iceberg_catalog_iam_binding` can be used per role. Note that custom roles must be of the format + `[projects|organizations]/{parent-name}/roles/{role-name}`. + +* `policy_data` - (Required only by `google_biglake_iceberg_catalog_iam_policy`) The policy data generated by + a `google_iam_policy` data source. + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are +exported: + +* `etag` - (Computed) The etag of the IAM policy. + +## Import + +For all import syntaxes, the "resource in question" can take any of the following forms: + +* projects/{{project}}/catalogs/{{name}} +* {{project}}/{{name}} +* {{name}} + +Any variables not passed in the import command will be taken from the provider configuration. + +Biglake icebergcatalog IAM resources can be imported using the resource identifiers, role, and member. + +IAM member imports use space-delimited identifiers: the resource in question, the role, and the member identity, e.g. +``` +$ terraform import google_biglake_iceberg_catalog_iam_member.editor "projects/{{project}}/catalogs/{{iceberg_catalog}} roles/biglake.editor user:jane@example.com" +``` + +IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g. +``` +$ terraform import google_biglake_iceberg_catalog_iam_binding.editor "projects/{{project}}/catalogs/{{iceberg_catalog}} roles/biglake.editor" +``` + +IAM policy imports use the identifier of the resource in question, e.g. +``` +$ terraform import google_biglake_iceberg_catalog_iam_policy.editor projects/{{project}}/catalogs/{{iceberg_catalog}} +``` + +-> **Custom Roles** If you're importing a IAM resource with a custom role, make sure to use the + full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`. + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). diff --git a/website/docs/r/bigquery_dataset.html.markdown b/website/docs/r/bigquery_dataset.html.markdown index e76dae1bb40..be67d6faa1d 100644 --- a/website/docs/r/bigquery_dataset.html.markdown +++ b/website/docs/r/bigquery_dataset.html.markdown @@ -427,12 +427,12 @@ destroying the resource will fail if tables are present. this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. - Structure is [documented below](#nested_access_access_view). + Structure is [documented below](#nested_access_view). * `dataset` - (Optional) Grants all resources of particular types in a particular dataset read access to the current dataset. - Structure is [documented below](#nested_access_access_dataset). + Structure is [documented below](#nested_access_dataset). * `routine` - (Optional) @@ -441,16 +441,16 @@ destroying the resource will fail if tables are present. this dataset. The role field is not required when this field is set. If that routine is updated by any user, access to the routine needs to be granted again via an update operation. - Structure is [documented below](#nested_access_access_routine). + Structure is [documented below](#nested_access_routine). * `condition` - (Optional) Condition for the binding. If CEL expression in this field is true, this access binding will be considered. - Structure is [documented below](#nested_access_access_condition). + Structure is [documented below](#nested_access_condition). -The `view` block supports: +The `view` block supports: * `dataset_id` - (Required) @@ -466,12 +466,12 @@ destroying the resource will fail if tables are present. A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. -The `dataset` block supports: +The `dataset` block supports: * `dataset` - (Required) The dataset this entry applies to - Structure is [documented below](#nested_access_access_dataset_dataset). + Structure is [documented below](#nested_access_dataset_dataset). * `target_types` - (Required) @@ -479,7 +479,7 @@ destroying the resource will fail if tables are present. but additional target types may be added in the future. Possible values: VIEWS -The `dataset` block supports: +The `dataset` block supports: * `dataset_id` - (Required) @@ -489,7 +489,7 @@ destroying the resource will fail if tables are present. (Required) The ID of the project containing this table. -The `routine` block supports: +The `routine` block supports: * `dataset_id` - (Required) @@ -505,7 +505,7 @@ destroying the resource will fail if tables are present. A-Z), numbers (0-9), or underscores (_). The maximum length is 256 characters. -The `condition` block supports: +The `condition` block supports: * `expression` - (Required) diff --git a/website/docs/r/bigquery_job.html.markdown b/website/docs/r/bigquery_job.html.markdown index 1f61ea42037..688939307ba 100644 --- a/website/docs/r/bigquery_job.html.markdown +++ b/website/docs/r/bigquery_job.html.markdown @@ -517,22 +517,22 @@ The following arguments are supported: * `query` - (Optional) Configures a query job. - Structure is [documented below](#nested_configuration_query). + Structure is [documented below](#nested_query). * `load` - (Optional) Configures a load job. - Structure is [documented below](#nested_configuration_load). + Structure is [documented below](#nested_load). * `copy` - (Optional) Copies a table. - Structure is [documented below](#nested_configuration_copy). + Structure is [documented below](#nested_copy). * `extract` - (Optional) Configures an extract job. - Structure is [documented below](#nested_configuration_extract). + Structure is [documented below](#nested_extract). * `reservation` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) @@ -548,7 +548,7 @@ The following arguments are supported: -The `query` block supports: +The `query` block supports: * `query` - (Required) @@ -561,12 +561,12 @@ The following arguments are supported: Describes the table where the query results should be stored. This property must be set for large results that exceed the maximum response size. For queries that produce anonymous (cached) results, this field will be populated by BigQuery. - Structure is [documented below](#nested_configuration_query_destination_table). + Structure is [documented below](#nested_query_destination_table). * `user_defined_function_resources` - (Optional) Describes user-defined function resources used in the query. - Structure is [documented below](#nested_configuration_query_user_defined_function_resources). + Structure is [documented below](#nested_query_user_defined_function_resources). * `create_disposition` - (Optional) @@ -591,7 +591,7 @@ The following arguments are supported: * `default_dataset` - (Optional) Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names. - Structure is [documented below](#nested_configuration_query_default_dataset). + Structure is [documented below](#nested_query_default_dataset). * `priority` - (Optional) @@ -648,12 +648,12 @@ The following arguments are supported: * `destination_encryption_configuration` - (Optional) Custom encryption configuration (e.g., Cloud KMS keys) - Structure is [documented below](#nested_configuration_query_destination_encryption_configuration). + Structure is [documented below](#nested_query_destination_encryption_configuration). * `script_options` - (Optional) Options controlling the execution of scripts. - Structure is [documented below](#nested_configuration_query_script_options). + Structure is [documented below](#nested_query_script_options). * `continuous` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) @@ -664,10 +664,10 @@ The following arguments are supported: Connection properties to customize query behavior. Under JDBC, these correspond directly to connection properties passed to the DriverManager. Under ODBC, these correspond to properties in the connection string. - Structure is [documented below](#nested_configuration_query_connection_properties). + Structure is [documented below](#nested_query_connection_properties). -The `destination_table` block supports: +The `destination_table` block supports: * `project_id` - (Optional) @@ -682,7 +682,7 @@ The following arguments are supported: The table. Can be specified `{{table_id}}` if `project_id` and `dataset_id` are also set, or of the form `projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}` if not. -The `user_defined_function_resources` block supports: +The `user_defined_function_resources` block supports: * `resource_uri` - (Optional) @@ -693,7 +693,7 @@ The following arguments are supported: An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. -The `default_dataset` block supports: +The `default_dataset` block supports: * `dataset_id` - (Required) @@ -704,7 +704,7 @@ The following arguments are supported: (Optional) The ID of the project containing this table. -The `destination_encryption_configuration` block supports: +The `destination_encryption_configuration` block supports: * `kms_key_name` - (Required) @@ -715,7 +715,7 @@ The following arguments are supported: (Output) Describes the Cloud KMS encryption key version used to protect destination BigQuery table. -The `script_options` block supports: +The `script_options` block supports: * `statement_timeout_ms` - (Optional) @@ -731,7 +731,7 @@ The following arguments are supported: used to populate the schema and query results of the script job. Possible values are: `LAST`, `FIRST_SELECT`. -The `connection_properties` block supports: +The `connection_properties` block supports: * `key` - (Required) @@ -746,7 +746,7 @@ The following arguments are supported: (Required) The value of the property to set. -The `load` block supports: +The `load` block supports: * `source_uris` - (Required) @@ -760,7 +760,7 @@ The following arguments are supported: * `destination_table` - (Required) The destination table to load the data into. - Structure is [documented below](#nested_configuration_load_destination_table). + Structure is [documented below](#nested_load_destination_table). * `create_disposition` - (Optional) @@ -881,20 +881,20 @@ The following arguments are supported: * `time_partitioning` - (Optional) Time-based partitioning specification for the destination table. - Structure is [documented below](#nested_configuration_load_time_partitioning). + Structure is [documented below](#nested_load_time_partitioning). * `destination_encryption_configuration` - (Optional) Custom encryption configuration (e.g., Cloud KMS keys) - Structure is [documented below](#nested_configuration_load_destination_encryption_configuration). + Structure is [documented below](#nested_load_destination_encryption_configuration). * `parquet_options` - (Optional) Parquet Options for load and make external tables. - Structure is [documented below](#nested_configuration_load_parquet_options). + Structure is [documented below](#nested_load_parquet_options). -The `destination_table` block supports: +The `destination_table` block supports: * `project_id` - (Optional) @@ -909,7 +909,7 @@ The following arguments are supported: The table. Can be specified `{{table_id}}` if `project_id` and `dataset_id` are also set, or of the form `projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}` if not. -The `time_partitioning` block supports: +The `time_partitioning` block supports: * `type` - (Required) @@ -926,7 +926,7 @@ The following arguments are supported: The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. A wrapper is used here because an empty string is an invalid value. -The `destination_encryption_configuration` block supports: +The `destination_encryption_configuration` block supports: * `kms_key_name` - (Required) @@ -937,7 +937,7 @@ The following arguments are supported: (Output) Describes the Cloud KMS encryption key version used to protect destination BigQuery table. -The `parquet_options` block supports: +The `parquet_options` block supports: * `enum_as_string` - (Optional) @@ -947,17 +947,17 @@ The following arguments are supported: (Optional) If sourceFormat is set to PARQUET, indicates whether to use schema inference specifically for Parquet LIST logical type. -The `copy` block supports: +The `copy` block supports: * `source_tables` - (Required) Source tables to copy. - Structure is [documented below](#nested_configuration_copy_source_tables). + Structure is [documented below](#nested_copy_source_tables). * `destination_table` - (Optional) The destination table. - Structure is [documented below](#nested_configuration_copy_destination_table). + Structure is [documented below](#nested_copy_destination_table). * `create_disposition` - (Optional) @@ -982,10 +982,10 @@ The following arguments are supported: * `destination_encryption_configuration` - (Optional) Custom encryption configuration (e.g., Cloud KMS keys) - Structure is [documented below](#nested_configuration_copy_destination_encryption_configuration). + Structure is [documented below](#nested_copy_destination_encryption_configuration). -The `source_tables` block supports: +The `source_tables` block supports: * `project_id` - (Optional) @@ -1000,7 +1000,7 @@ The following arguments are supported: The table. Can be specified `{{table_id}}` if `project_id` and `dataset_id` are also set, or of the form `projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}` if not. -The `destination_table` block supports: +The `destination_table` block supports: * `project_id` - (Optional) @@ -1015,7 +1015,7 @@ The following arguments are supported: The table. Can be specified `{{table_id}}` if `project_id` and `dataset_id` are also set, or of the form `projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}` if not. -The `destination_encryption_configuration` block supports: +The `destination_encryption_configuration` block supports: * `kms_key_name` - (Required) @@ -1026,7 +1026,7 @@ The following arguments are supported: (Output) Describes the Cloud KMS encryption key version used to protect destination BigQuery table. -The `extract` block supports: +The `extract` block supports: * `destination_uris` - (Required) @@ -1059,15 +1059,15 @@ The following arguments are supported: * `source_table` - (Optional) A reference to the table being exported. - Structure is [documented below](#nested_configuration_extract_source_table). + Structure is [documented below](#nested_extract_source_table). * `source_model` - (Optional) A reference to the model being exported. - Structure is [documented below](#nested_configuration_extract_source_model). + Structure is [documented below](#nested_extract_source_model). -The `source_table` block supports: +The `source_table` block supports: * `project_id` - (Optional) @@ -1082,7 +1082,7 @@ The following arguments are supported: The table. Can be specified `{{table_id}}` if `project_id` and `dataset_id` are also set, or of the form `projects/{{project}}/datasets/{{dataset_id}}/tables/{{table_id}}` if not. -The `source_model` block supports: +The `source_model` block supports: * `project_id` - (Required) diff --git a/website/docs/r/bigtable_schema_bundle.html.markdown b/website/docs/r/bigtable_schema_bundle.html.markdown index 720eddba72b..8ff59b6d9ca 100644 --- a/website/docs/r/bigtable_schema_bundle.html.markdown +++ b/website/docs/r/bigtable_schema_bundle.html.markdown @@ -118,6 +118,12 @@ In addition to the arguments listed above, the following computed attributes are * `name` - The unique name of the requested schema bundle. Values are of the form `projects//instances//tables//schemaBundles/`. +* `etag` - + etag is used for optimistic concurrency control as a way to help prevent simultaneous + updates of a schema bundle from overwriting each other. This may be sent on update and delete + requests to ensure the client has an update-to-date value before proceeding. The server returns + an ABORTED error on a mismatched etag. + ## Timeouts diff --git a/website/docs/r/binary_authorization_attestor.html.markdown b/website/docs/r/binary_authorization_attestor.html.markdown index 7f2e31c4dff..fb620f84e98 100644 --- a/website/docs/r/binary_authorization_attestor.html.markdown +++ b/website/docs/r/binary_authorization_attestor.html.markdown @@ -221,10 +221,10 @@ The following arguments are supported: type of public key, but it MUST be a valid RFC3986 URI. If id is left blank, a default one will be computed based on the digest of the DER encoding of the public key. - Structure is [documented below](#nested_attestation_authority_note_public_keys_public_keys_pkix_public_key). + Structure is [documented below](#nested_attestation_authority_note_public_keys_pkix_public_key). -The `pkix_public_key` block supports: +The `pkix_public_key` block supports: * `public_key_pem` - (Optional) diff --git a/website/docs/r/certificate_manager_certificate_map.html.markdown b/website/docs/r/certificate_manager_certificate_map.html.markdown index 67f0ed6bef4..4a9c3c9fc59 100644 --- a/website/docs/r/certificate_manager_certificate_map.html.markdown +++ b/website/docs/r/certificate_manager_certificate_map.html.markdown @@ -106,7 +106,7 @@ In addition to the arguments listed above, the following computed attributes are * `ip_configs` - (Optional) An IP configuration where this Certificate Map is serving - Structure is [documented below](#nested_gclb_targets_gclb_targets_ip_configs). + Structure is [documented below](#nested_gclb_targets_ip_configs). * `target_https_proxy` - (Optional) @@ -121,7 +121,7 @@ In addition to the arguments listed above, the following computed attributes are `targetSslProxy` may be set. -The `ip_configs` block supports: +The `ip_configs` block supports: * `ip_address` - (Optional) diff --git a/website/docs/r/certificate_manager_trust_config.html.markdown b/website/docs/r/certificate_manager_trust_config.html.markdown index c68490b0025..753e43e8318 100644 --- a/website/docs/r/certificate_manager_trust_config.html.markdown +++ b/website/docs/r/certificate_manager_trust_config.html.markdown @@ -31,7 +31,7 @@ To get more information about TrustConfig, see: * [Official Documentation](https://cloud.google.com/certificate-manager/docs) ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `trust_stores.trust_stores.trust_anchors.trust_anchors.pem_certificate`, `trust_stores.trust_stores.intermediate_cas.intermediate_cas.pem_certificate`. +values will be stored in the raw state as plain text: `trust_stores.trust_anchors.pem_certificate`, `trust_stores.intermediate_cas.pem_certificate`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
@@ -135,16 +135,16 @@ The following arguments are supported: * `trust_anchors` - (Optional) List of Trust Anchors to be used while performing validation against a given TrustStore. - Structure is [documented below](#nested_trust_stores_trust_stores_trust_anchors). + Structure is [documented below](#nested_trust_stores_trust_anchors). * `intermediate_cas` - (Optional) Set of intermediate CA certificates used for the path building phase of chain validation. The field is currently not supported if trust config is used for the workload certificate feature. - Structure is [documented below](#nested_trust_stores_trust_stores_intermediate_cas). + Structure is [documented below](#nested_trust_stores_intermediate_cas). -The `trust_anchors` block supports: +The `trust_anchors` block supports: * `pem_certificate` - (Optional) @@ -152,7 +152,7 @@ The following arguments are supported: Each certificate provided in PEM format may occupy up to 5kB. **Note**: This property is sensitive and will not be displayed in the plan. -The `intermediate_cas` block supports: +The `intermediate_cas` block supports: * `pem_certificate` - (Optional) diff --git a/website/docs/r/ces_app.html.markdown b/website/docs/r/ces_app.html.markdown index 65224bd2e40..4eec2df81be 100644 --- a/website/docs/r/ces_app.html.markdown +++ b/website/docs/r/ces_app.html.markdown @@ -874,10 +874,10 @@ The following arguments are supported: * `schema` - (Required) Represents a select subset of an OpenAPI 3.0 schema object. - Structure is [documented below](#nested_variable_declarations_variable_declarations_schema). + Structure is [documented below](#nested_variable_declarations_schema). -The `schema` block supports: +The `schema` block supports: * `title` - (Optional) diff --git a/website/docs/r/ces_app_version.html.markdown b/website/docs/r/ces_app_version.html.markdown index 6b6487554cf..12a7dc45224 100644 --- a/website/docs/r/ces_app_version.html.markdown +++ b/website/docs/r/ces_app_version.html.markdown @@ -155,7 +155,7 @@ In addition to the arguments listed above, the following computed attributes are The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. - Structure is [documented below](#nested_snapshot_agents_agents_after_agent_callbacks). + Structure is [documented below](#nested_snapshot_agents_after_agent_callbacks). * `after_model_callbacks` - (Output) @@ -164,7 +164,7 @@ In addition to the arguments listed above, the following computed attributes are The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. - Structure is [documented below](#nested_snapshot_agents_agents_after_model_callbacks). + Structure is [documented below](#nested_snapshot_agents_after_model_callbacks). * `after_tool_callbacks` - (Output) @@ -173,7 +173,7 @@ In addition to the arguments listed above, the following computed attributes are The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. - Structure is [documented below](#nested_snapshot_agents_agents_after_tool_callbacks). + Structure is [documented below](#nested_snapshot_agents_after_tool_callbacks). * `before_agent_callbacks` - (Output) @@ -181,7 +181,7 @@ In addition to the arguments listed above, the following computed attributes are The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. - Structure is [documented below](#nested_snapshot_agents_agents_before_agent_callbacks). + Structure is [documented below](#nested_snapshot_agents_before_agent_callbacks). * `before_model_callbacks` - (Output) @@ -190,7 +190,7 @@ In addition to the arguments listed above, the following computed attributes are The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. - Structure is [documented below](#nested_snapshot_agents_agents_before_model_callbacks). + Structure is [documented below](#nested_snapshot_agents_before_model_callbacks). * `before_tool_callbacks` - (Output) @@ -199,7 +199,7 @@ In addition to the arguments listed above, the following computed attributes are The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. - Structure is [documented below](#nested_snapshot_agents_agents_before_tool_callbacks). + Structure is [documented below](#nested_snapshot_agents_before_tool_callbacks). * `child_agents` - (Output) @@ -247,7 +247,7 @@ In addition to the arguments listed above, the following computed attributes are * `model_settings` - (Output) Model settings contains various configurations for the LLM model. - Structure is [documented below](#nested_snapshot_agents_agents_model_settings). + Structure is [documented below](#nested_snapshot_agents_model_settings). * `name` - (Output) @@ -261,7 +261,7 @@ In addition to the arguments listed above, the following computed attributes are agent flow. The corresponding Dialogflow agent will process subsequent user queries until the session ends or flow ends and the control is transferred back to the parent CES agent. - Structure is [documented below](#nested_snapshot_agents_agents_remote_dialogflow_agent). + Structure is [documented below](#nested_snapshot_agents_remote_dialogflow_agent). * `tools` - (Output) @@ -271,14 +271,14 @@ In addition to the arguments listed above, the following computed attributes are * `toolsets` - (Output) List of toolsets for the agent. - Structure is [documented below](#nested_snapshot_agents_agents_toolsets). + Structure is [documented below](#nested_snapshot_agents_toolsets). * `update_time` - (Output) Timestamp when the agent was last updated. -The `after_agent_callbacks` block contains: +The `after_agent_callbacks` block contains: * `description` - (Output) @@ -293,7 +293,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `after_model_callbacks` block contains: +The `after_model_callbacks` block contains: * `description` - (Output) @@ -308,7 +308,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `after_tool_callbacks` block contains: +The `after_tool_callbacks` block contains: * `description` - (Output) @@ -323,7 +323,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `before_agent_callbacks` block contains: +The `before_agent_callbacks` block contains: * `description` - (Output) @@ -338,7 +338,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `before_model_callbacks` block contains: +The `before_model_callbacks` block contains: * `description` - (Output) @@ -353,7 +353,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `before_tool_callbacks` block contains: +The `before_tool_callbacks` block contains: * `description` - (Output) @@ -368,7 +368,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `model_settings` block contains: +The `model_settings` block contains: * `model` - (Output) @@ -382,7 +382,7 @@ In addition to the arguments listed above, the following computed attributes are produce responses that are more predictable. Higher temperatures produce responses that are more creative. -The `remote_dialogflow_agent` block contains: +The `remote_dialogflow_agent` block contains: * `agent` - (Output) @@ -411,7 +411,7 @@ In addition to the arguments listed above, the following computed attributes are variables names to be sent back to the CES agent after the Dialogflow agent execution ends. -The `toolsets` block contains: +The `toolsets` block contains: * `toolset` - (Output) @@ -913,10 +913,10 @@ In addition to the arguments listed above, the following computed attributes are * `schema` - (Output) Represents a select subset of an OpenAPI 3.0 schema object. - Structure is [documented below](#nested_snapshot_app_variable_declarations_variable_declarations_schema). + Structure is [documented below](#nested_snapshot_app_variable_declarations_schema). -The `schema` block contains: +The `schema` block contains: * `description` - (Output) @@ -1060,7 +1060,7 @@ In addition to the arguments listed above, the following computed attributes are * `messages` - (Output) The collection of messages that make up the conversation. - Structure is [documented below](#nested_snapshot_examples_examples_messages). + Structure is [documented below](#nested_snapshot_examples_messages). * `name` - (Output) @@ -1073,30 +1073,30 @@ In addition to the arguments listed above, the following computed attributes are Timestamp when the example was last updated. -The `messages` block contains: +The `messages` block contains: * `chunks` - (Output) Content of the message as a series of chunks. - Structure is [documented below](#nested_snapshot_examples_examples_messages_messages_chunks). + Structure is [documented below](#nested_snapshot_examples_messages_chunks). * `role` - (Output) The role within the conversation, e.g., user, agent. -The `chunks` block contains: +The `chunks` block contains: * `agent_transfer` - (Output) Represents an event indicating the transfer of a conversation to a different agent. - Structure is [documented below](#nested_snapshot_examples_examples_messages_messages_chunks_chunks_agent_transfer). + Structure is [documented below](#nested_snapshot_examples_messages_chunks_agent_transfer). * `image` - (Output) Represents an image input or output in the conversation. - Structure is [documented below](#nested_snapshot_examples_examples_messages_messages_chunks_chunks_image). + Structure is [documented below](#nested_snapshot_examples_messages_chunks_image). * `text` - (Output) @@ -1105,12 +1105,12 @@ In addition to the arguments listed above, the following computed attributes are * `tool_call` - (Output) Request for the client or the agent to execute the specified tool. - Structure is [documented below](#nested_snapshot_examples_examples_messages_messages_chunks_chunks_tool_call). + Structure is [documented below](#nested_snapshot_examples_messages_chunks_tool_call). * `tool_response` - (Output) The execution result of a specific tool from the client or the agent. - Structure is [documented below](#nested_snapshot_examples_examples_messages_messages_chunks_chunks_tool_response). + Structure is [documented below](#nested_snapshot_examples_messages_chunks_tool_response). * `updated_variables` - (Output) @@ -1118,7 +1118,7 @@ In addition to the arguments listed above, the following computed attributes are keyed by variable names. -The `agent_transfer` block contains: +The `agent_transfer` block contains: * `display_name` - (Output) @@ -1130,7 +1130,7 @@ In addition to the arguments listed above, the following computed attributes are handle the conversation from this point forward. Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` -The `image` block contains: +The `image` block contains: * `data` - (Output) @@ -1144,7 +1144,7 @@ In addition to the arguments listed above, the following computed attributes are * image/jpeg * image/webp -The `tool_call` block contains: +The `tool_call` block contains: * `args` - (Output) @@ -1168,10 +1168,10 @@ In addition to the arguments listed above, the following computed attributes are * `toolset_tool` - (Output) A tool that is created from a toolset. - Structure is [documented below](#nested_snapshot_examples_examples_messages_messages_chunks_chunks_tool_call_toolset_tool). + Structure is [documented below](#nested_snapshot_examples_messages_chunks_tool_call_toolset_tool). -The `toolset_tool` block contains: +The `toolset_tool` block contains: * `toolset` - (Output) @@ -1183,7 +1183,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The tool ID to filter the tools to retrieve the schema for. -The `tool_response` block contains: +The `tool_response` block contains: * `display_name` - (Output) @@ -1208,10 +1208,10 @@ In addition to the arguments listed above, the following computed attributes are * `toolset_tool` - (Output) A tool that is created from a toolset. - Structure is [documented below](#nested_snapshot_examples_examples_messages_messages_chunks_chunks_tool_response_toolset_tool). + Structure is [documented below](#nested_snapshot_examples_messages_chunks_tool_response_toolset_tool). -The `toolset_tool` block contains: +The `toolset_tool` block contains: * `toolset` - (Output) @@ -1228,18 +1228,18 @@ In addition to the arguments listed above, the following computed attributes are * `action` - (Output) Action that is taken when a certain precondition is met. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_action). + Structure is [documented below](#nested_snapshot_guardrails_action). * `code_callback` - (Output) Guardrail that blocks the conversation based on the code callbacks provided. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_code_callback). + Structure is [documented below](#nested_snapshot_guardrails_code_callback). * `content_filter` - (Output) Guardrail that bans certain content from being used in the conversation. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_content_filter). + Structure is [documented below](#nested_snapshot_guardrails_content_filter). * `create_time` - (Output) @@ -1267,20 +1267,20 @@ In addition to the arguments listed above, the following computed attributes are (Output) Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_llm_policy). + Structure is [documented below](#nested_snapshot_guardrails_llm_policy). * `llm_prompt_security` - (Output) Guardrail that blocks the conversation if the input is considered unsafe based on the LLM classification. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_llm_prompt_security). + Structure is [documented below](#nested_snapshot_guardrails_llm_prompt_security). * `model_safety` - (Output) Model safety settings overrides. When this is set, it will override the default settings and trigger the guardrail if the response is considered unsafe. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_model_safety). + Structure is [documented below](#nested_snapshot_guardrails_model_safety). * `name` - (Output) @@ -1293,40 +1293,40 @@ In addition to the arguments listed above, the following computed attributes are Timestamp when the guardrail was last updated. -The `action` block contains: +The `action` block contains: * `generative_answer` - (Output) The agent will immediately respond with a generative answer. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_action_generative_answer). + Structure is [documented below](#nested_snapshot_guardrails_action_generative_answer). * `respond_immediately` - (Output) The agent will immediately respond with a preconfigured response. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_action_respond_immediately). + Structure is [documented below](#nested_snapshot_guardrails_action_respond_immediately). * `transfer_agent` - (Output) The agent will transfer the conversation to a different agent. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_action_transfer_agent). + Structure is [documented below](#nested_snapshot_guardrails_action_transfer_agent). -The `generative_answer` block contains: +The `generative_answer` block contains: * `prompt` - (Output) The prompt to use for the generative answer. -The `respond_immediately` block contains: +The `respond_immediately` block contains: * `responses` - (Output) The canned responses for the agent to choose from. The response is chosen randomly. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_action_respond_immediately_responses). + Structure is [documented below](#nested_snapshot_guardrails_action_respond_immediately_responses). -The `responses` block contains: +The `responses` block contains: * `disabled` - (Output) @@ -1337,7 +1337,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Text for the agent to respond with. -The `transfer_agent` block contains: +The `transfer_agent` block contains: * `agent` - (Output) @@ -1346,34 +1346,34 @@ In addition to the arguments listed above, the following computed attributes are Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` -The `code_callback` block contains: +The `code_callback` block contains: * `after_agent_callback` - (Output) A callback defines the custom logic to be executed at various stages of agent interaction. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_code_callback_after_agent_callback). + Structure is [documented below](#nested_snapshot_guardrails_code_callback_after_agent_callback). * `after_model_callback` - (Output) A callback defines the custom logic to be executed at various stages of agent interaction. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_code_callback_after_model_callback). + Structure is [documented below](#nested_snapshot_guardrails_code_callback_after_model_callback). * `before_agent_callback` - (Output) A callback defines the custom logic to be executed at various stages of agent interaction. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_code_callback_before_agent_callback). + Structure is [documented below](#nested_snapshot_guardrails_code_callback_before_agent_callback). * `before_model_callback` - (Output) A callback defines the custom logic to be executed at various stages of agent interaction. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_code_callback_before_model_callback). + Structure is [documented below](#nested_snapshot_guardrails_code_callback_before_model_callback). -The `after_agent_callback` block contains: +The `after_agent_callback` block contains: * `description` - (Output) @@ -1388,7 +1388,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `after_model_callback` block contains: +The `after_model_callback` block contains: * `description` - (Output) @@ -1403,7 +1403,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `before_agent_callback` block contains: +The `before_agent_callback` block contains: * `description` - (Output) @@ -1418,7 +1418,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `before_model_callback` block contains: +The `before_model_callback` block contains: * `description` - (Output) @@ -1433,7 +1433,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The python code to execute for the callback. -The `content_filter` block contains: +The `content_filter` block contains: * `banned_contents` - (Output) @@ -1459,7 +1459,7 @@ In addition to the arguments listed above, the following computed attributes are WORD_BOUNDARY_STRING_MATCH REGEXP_MATCH -The `llm_policy` block contains: +The `llm_policy` block contains: * `fail_open` - (Output) @@ -1475,7 +1475,7 @@ In addition to the arguments listed above, the following computed attributes are * `model_settings` - (Output) Model settings contains various configurations for the LLM model. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_llm_policy_model_settings). + Structure is [documented below](#nested_snapshot_guardrails_llm_policy_model_settings). * `policy_scope` - (Output) @@ -1493,7 +1493,7 @@ In addition to the arguments listed above, the following computed attributes are Policy prompt. -The `model_settings` block contains: +The `model_settings` block contains: * `model` - (Output) @@ -1507,21 +1507,21 @@ In addition to the arguments listed above, the following computed attributes are produce responses that are more predictable. Higher temperatures produce responses that are more creative. -The `llm_prompt_security` block contains: +The `llm_prompt_security` block contains: * `custom_policy` - (Output) Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_llm_prompt_security_custom_policy). + Structure is [documented below](#nested_snapshot_guardrails_llm_prompt_security_custom_policy). * `default_settings` - (Output) Configuration for default system security settings. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_llm_prompt_security_default_settings). + Structure is [documented below](#nested_snapshot_guardrails_llm_prompt_security_default_settings). -The `custom_policy` block contains: +The `custom_policy` block contains: * `fail_open` - (Output) @@ -1537,7 +1537,7 @@ In addition to the arguments listed above, the following computed attributes are * `model_settings` - (Output) Model settings contains various configurations for the LLM model. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_llm_prompt_security_custom_policy_model_settings). + Structure is [documented below](#nested_snapshot_guardrails_llm_prompt_security_custom_policy_model_settings). * `policy_scope` - (Output) @@ -1555,7 +1555,7 @@ In addition to the arguments listed above, the following computed attributes are Policy prompt. -The `model_settings` block contains: +The `model_settings` block contains: * `model` - (Output) @@ -1569,7 +1569,7 @@ In addition to the arguments listed above, the following computed attributes are produce responses that are more predictable. Higher temperatures produce responses that are more creative. -The `default_settings` block contains: +The `default_settings` block contains: * `default_prompt_template` - (Output) @@ -1577,15 +1577,15 @@ In addition to the arguments listed above, the following computed attributes are This field is for display purposes to show the user what prompt the system uses by default. It is OUTPUT_ONLY. -The `model_safety` block contains: +The `model_safety` block contains: * `safety_settings` - (Output) List of safety settings. - Structure is [documented below](#nested_snapshot_guardrails_guardrails_model_safety_safety_settings). + Structure is [documented below](#nested_snapshot_guardrails_model_safety_safety_settings). -The `safety_settings` block contains: +The `safety_settings` block contains: * `category` - (Output) @@ -1614,7 +1614,7 @@ In addition to the arguments listed above, the following computed attributes are tool is chosen by the agent, control is handed off to the client. The client is responsible for executing the function and returning the result as a ToolResponse to continue the interaction with the agent. - Structure is [documented below](#nested_snapshot_tools_tools_client_function). + Structure is [documented below](#nested_snapshot_tools_client_function). * `create_time` - (Output) @@ -1626,7 +1626,7 @@ In addition to the arguments listed above, the following computed attributes are Accepts either a datastore or an engine, but not both. See Vertex AI Search: https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool). + Structure is [documented below](#nested_snapshot_tools_data_store_tool). * `display_name` - (Output) @@ -1656,7 +1656,7 @@ In addition to the arguments listed above, the following computed attributes are Represents a tool to perform Google web searches for grounding. See https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-search. - Structure is [documented below](#nested_snapshot_tools_tools_google_search_tool). + Structure is [documented below](#nested_snapshot_tools_google_search_tool). * `name` - (Output) @@ -1667,12 +1667,12 @@ In addition to the arguments listed above, the following computed attributes are * `open_api_tool` - (Output) A remote API tool defined by an OpenAPI schema. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool). + Structure is [documented below](#nested_snapshot_tools_open_api_tool). * `python_function` - (Output) A Python function tool. - Structure is [documented below](#nested_snapshot_tools_tools_python_function). + Structure is [documented below](#nested_snapshot_tools_python_function). * `update_time` - (Output) @@ -1681,10 +1681,10 @@ In addition to the arguments listed above, the following computed attributes are * `system_tool` - (Output) The system tool. - Structure is [documented below](#nested_snapshot_tools_tools_system_tool). + Structure is [documented below](#nested_snapshot_tools_system_tool). -The `client_function` block contains: +The `client_function` block contains: * `description` - (Output) @@ -1697,15 +1697,15 @@ In addition to the arguments listed above, the following computed attributes are * `parameters` - (Output) Represents a select subset of an OpenAPI 3.0 schema object. - Structure is [documented below](#nested_snapshot_tools_tools_client_function_parameters). + Structure is [documented below](#nested_snapshot_tools_client_function_parameters). * `response` - (Output) Represents a select subset of an OpenAPI 3.0 schema object. - Structure is [documented below](#nested_snapshot_tools_tools_client_function_response). + Structure is [documented below](#nested_snapshot_tools_client_function_response). -The `parameters` block contains: +The `parameters` block contains: * `description` - (Output) @@ -1797,7 +1797,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Schema of the elements of Type.ARRAY. -The `response` block contains: +The `response` block contains: * `description` - (Output) @@ -1889,12 +1889,12 @@ In addition to the arguments listed above, the following computed attributes are (Output) Schema of the elements of Type.ARRAY. -The `data_store_tool` block contains: +The `data_store_tool` block contains: * `boost_specs` - (Output) Boost specification to boost certain documents. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_boost_specs). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_boost_specs). * `description` - (Output) @@ -1904,7 +1904,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Configuration for searching within an Engine, potentially targeting specific DataStores. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_engine_source). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_engine_source). * `max_results` - (Output) @@ -1914,14 +1914,14 @@ In addition to the arguments listed above, the following computed attributes are * `modality_configs` - (Output) The modality configs for the data store. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_modality_configs). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_modality_configs). * `name` - (Output) The data store tool name. -The `boost_specs` block contains: +The `boost_specs` block contains: * `data_stores` - (Output) @@ -1932,18 +1932,18 @@ In addition to the arguments listed above, the following computed attributes are * `spec` - (Output) A list of boosting specifications. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_boost_specs_boost_specs_spec). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_boost_specs_spec). -The `spec` block contains: +The `spec` block contains: * `condition_boost_specs` - (Output) A list of boosting specifications. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_boost_specs_boost_specs_spec_spec_condition_boost_specs). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_boost_specs_spec_condition_boost_specs). -The `condition_boost_specs` block contains: +The `condition_boost_specs` block contains: * `boost` - (Output) @@ -1961,7 +1961,7 @@ In addition to the arguments listed above, the following computed attributes are Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_boost_specs_boost_specs_spec_spec_condition_boost_specs_condition_boost_specs_boost_control_spec). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_boost_specs_spec_condition_boost_specs_boost_control_spec). * `condition` - (Output) @@ -1972,7 +1972,7 @@ In addition to the arguments listed above, the following computed attributes are (lang_code: ANY("en", "fr")) -The `boost_control_spec` block contains: +The `boost_control_spec` block contains: * `attribute_type` - (Output) @@ -1990,7 +1990,7 @@ In addition to the arguments listed above, the following computed attributes are The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_boost_specs_boost_specs_spec_spec_condition_boost_specs_condition_boost_specs_boost_control_spec_control_points). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_boost_specs_spec_condition_boost_specs_boost_control_spec_control_points). * `field_name` - (Output) @@ -2005,7 +2005,7 @@ In addition to the arguments listed above, the following computed attributes are LINEAR -The `control_points` block contains: +The `control_points` block contains: * `attribute_value` - (Output) @@ -2021,14 +2021,14 @@ In addition to the arguments listed above, the following computed attributes are The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. -The `engine_source` block contains: +The `engine_source` block contains: * `data_store_sources` - (Output) Use to target specific DataStores within the Engine. If empty, the search applies to all DataStores associated with the Engine. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_engine_source_data_store_sources). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_engine_source_data_store_sources). * `engine` - (Output) @@ -2044,12 +2044,12 @@ In addition to the arguments listed above, the following computed attributes are https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata -The `data_store_sources` block contains: +The `data_store_sources` block contains: * `data_store` - (Output) A DataStore resource in Vertex AI Search. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_engine_source_data_store_sources_data_store_sources_data_store). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_engine_source_data_store_sources_data_store). * `filter` - (Output) @@ -2058,12 +2058,12 @@ In addition to the arguments listed above, the following computed attributes are https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata -The `data_store` block contains: +The `data_store` block contains: * `connector_config` - (Output) The connector config for the data store connection. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_engine_source_data_store_sources_data_store_sources_data_store_connector_config). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_engine_source_data_store_sources_data_store_connector_config). * `create_time` - (Output) @@ -2098,7 +2098,7 @@ In addition to the arguments listed above, the following computed attributes are CONNECTOR -The `connector_config` block contains: +The `connector_config` block contains: * `collection` - (Output) @@ -2113,12 +2113,12 @@ In addition to the arguments listed above, the following computed attributes are The name of the data source. Example: `salesforce`, `jira`, `confluence`, `bigquery`. -The `modality_configs` block contains: +The `modality_configs` block contains: * `grounding_config` - (Output) Grounding configuration. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_modality_configs_modality_configs_grounding_config). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_modality_configs_grounding_config). * `modality_type` - (Output) @@ -2130,15 +2130,15 @@ In addition to the arguments listed above, the following computed attributes are * `rewriter_config` - (Output) Rewriter configuration. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_modality_configs_modality_configs_rewriter_config). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_modality_configs_rewriter_config). * `summarization_config` - (Output) Summarization configuration. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_modality_configs_modality_configs_summarization_config). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_modality_configs_summarization_config). -The `grounding_config` block contains: +The `grounding_config` block contains: * `disabled` - (Output) @@ -2154,7 +2154,7 @@ In addition to the arguments listed above, the following computed attributes are For example, a level of 3 means that the groundedness score must be 3 or higher for the response to be returned. -The `rewriter_config` block contains: +The `rewriter_config` block contains: * `disabled` - (Output) @@ -2163,14 +2163,14 @@ In addition to the arguments listed above, the following computed attributes are * `model_settings` - (Output) Model settings contains various configurations for the LLM model. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_modality_configs_modality_configs_rewriter_config_model_settings). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_modality_configs_rewriter_config_model_settings). * `prompt` - (Output) The prompt definition. If not set, default prompt will be used. -The `model_settings` block contains: +The `model_settings` block contains: * `model` - (Output) @@ -2184,7 +2184,7 @@ In addition to the arguments listed above, the following computed attributes are produce responses that are more predictable. Higher temperatures produce responses that are more creative. -The `summarization_config` block contains: +The `summarization_config` block contains: * `disabled` - (Output) @@ -2193,14 +2193,14 @@ In addition to the arguments listed above, the following computed attributes are * `model_settings` - (Output) Model settings contains various configurations for the LLM model. - Structure is [documented below](#nested_snapshot_tools_tools_data_store_tool_modality_configs_modality_configs_summarization_config_model_settings). + Structure is [documented below](#nested_snapshot_tools_data_store_tool_modality_configs_summarization_config_model_settings). * `prompt` - (Output) The prompt definition. If not set, default prompt will be used. -The `model_settings` block contains: +The `model_settings` block contains: * `model` - (Output) @@ -2214,7 +2214,7 @@ In addition to the arguments listed above, the following computed attributes are produce responses that are more predictable. Higher temperatures produce responses that are more creative. -The `google_search_tool` block contains: +The `google_search_tool` block contains: * `description` - (Output) @@ -2230,12 +2230,12 @@ In addition to the arguments listed above, the following computed attributes are (Output) The name of the tool. -The `open_api_tool` block contains: +The `open_api_tool` block contains: * `api_authentication` - (Output) Authentication information required for API calls. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool_api_authentication). + Structure is [documented below](#nested_snapshot_tools_open_api_tool_api_authentication). * `description` - (Output) @@ -2259,12 +2259,12 @@ In addition to the arguments listed above, the following computed attributes are * `service_directory_config` - (Output) Configuration for tools using Service Directory. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool_service_directory_config). + Structure is [documented below](#nested_snapshot_tools_open_api_tool_service_directory_config). * `tls_config` - (Output) The TLS configuration. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool_tls_config). + Structure is [documented below](#nested_snapshot_tools_open_api_tool_tls_config). * `url` - (Output) @@ -2275,22 +2275,22 @@ In addition to the arguments listed above, the following computed attributes are placeholder in the schema. -The `api_authentication` block contains: +The `api_authentication` block contains: * `api_key_config` - (Output) Configurations for authentication with API key. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool_api_authentication_api_key_config). + Structure is [documented below](#nested_snapshot_tools_open_api_tool_api_authentication_api_key_config). * `oauth_config` - (Output) Configurations for authentication with OAuth. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool_api_authentication_oauth_config). + Structure is [documented below](#nested_snapshot_tools_open_api_tool_api_authentication_oauth_config). * `service_account_auth_config` - (Output) Configurations for authentication using a custom service account. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool_api_authentication_service_account_auth_config). + Structure is [documented below](#nested_snapshot_tools_open_api_tool_api_authentication_service_account_auth_config). * `service_agent_id_token_auth_config` - (Output) @@ -2299,7 +2299,7 @@ In addition to the arguments listed above, the following computed attributes are from service agent. -The `api_key_config` block contains: +The `api_key_config` block contains: * `api_key_secret_version` - (Output) @@ -2321,7 +2321,7 @@ In addition to the arguments listed above, the following computed attributes are HEADER QUERY_STRING -The `oauth_config` block contains: +The `oauth_config` block contains: * `client_id` - (Output) @@ -2350,7 +2350,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The token endpoint in the OAuth provider to exchange for an access token. -The `service_account_auth_config` block contains: +The `service_account_auth_config` block contains: * `service_account` - (Output) @@ -2362,7 +2362,7 @@ In addition to the arguments listed above, the following computed attributes are CES service agent `service-@gcp-sa-ces.iam.gserviceaccount.com`. -The `service_directory_config` block contains: +The `service_directory_config` block contains: * `service` - (Output) @@ -2373,16 +2373,16 @@ In addition to the arguments listed above, the following computed attributes are Location of the service directory must be the same as the location of the app. -The `tls_config` block contains: +The `tls_config` block contains: * `ca_certs` - (Output) Specifies a list of allowed custom CA certificates for HTTPS verification. - Structure is [documented below](#nested_snapshot_tools_tools_open_api_tool_tls_config_ca_certs). + Structure is [documented below](#nested_snapshot_tools_open_api_tool_tls_config_ca_certs). -The `ca_certs` block contains: +The `ca_certs` block contains: * `cert` - (Output) @@ -2403,7 +2403,7 @@ In addition to the arguments listed above, the following computed attributes are The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates. -The `python_function` block contains: +The `python_function` block contains: * `description` - (Output) @@ -2420,7 +2420,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The Python code to execute for the tool. -The `system_tool` block contains: +The `system_tool` block contains: * `description` - (Output) @@ -2466,19 +2466,19 @@ In addition to the arguments listed above, the following computed attributes are (Output) A toolset that contains a list of tools that are defined by an OpenAPI schema. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset). * `update_time` - (Output) Timestamp when the toolset was last updated. -The `open_api_toolset` block contains: +The `open_api_toolset` block contains: * `api_authentication` - (Output) Authentication information required for API calls. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_api_authentication). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_api_authentication). * `ignore_unknown_fields` - (Output) @@ -2492,12 +2492,12 @@ In addition to the arguments listed above, the following computed attributes are * `service_directory_config` - (Output) Configuration for tools using Service Directory. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_service_directory_config). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_service_directory_config). * `tls_config` - (Output) The TLS configuration. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_tls_config). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_tls_config). * `url` - (Output) @@ -2509,22 +2509,22 @@ In addition to the arguments listed above, the following computed attributes are it will replace the placeholder in the schema. -The `api_authentication` block contains: +The `api_authentication` block contains: * `api_key_config` - (Output) Configurations for authentication with API key. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_api_authentication_api_key_config). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_api_authentication_api_key_config). * `oauth_config` - (Output) Configurations for authentication with OAuth. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_api_authentication_oauth_config). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_api_authentication_oauth_config). * `service_account_auth_config` - (Output) Configurations for authentication using a custom service account. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_api_authentication_service_account_auth_config). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_api_authentication_service_account_auth_config). * `service_agent_id_token_auth_config` - (Output) @@ -2535,10 +2535,10 @@ In addition to the arguments listed above, the following computed attributes are * `bearer_token_config` - (Output) Configurations for authentication with a bearer token. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_api_authentication_bearer_token_config). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_api_authentication_bearer_token_config). -The `api_key_config` block contains: +The `api_key_config` block contains: * `api_key_secret_version` - (Output) @@ -2560,7 +2560,7 @@ In addition to the arguments listed above, the following computed attributes are HEADER QUERY_STRING -The `oauth_config` block contains: +The `oauth_config` block contains: * `client_id` - (Output) @@ -2589,7 +2589,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The token endpoint in the OAuth provider to exchange for an access token. -The `service_account_auth_config` block contains: +The `service_account_auth_config` block contains: * `service_account` - (Output) @@ -2601,12 +2601,12 @@ In addition to the arguments listed above, the following computed attributes are CES service agent `service-@gcp-sa-ces.iam.gserviceaccount.com`. -The `bearer_token_config` block contains: +The `bearer_token_config` block contains: * `token` - (Output) -The `service_directory_config` block contains: +The `service_directory_config` block contains: * `service` - (Output) @@ -2617,16 +2617,16 @@ In addition to the arguments listed above, the following computed attributes are Location of the service directory must be the same as the location of the app. -The `tls_config` block contains: +The `tls_config` block contains: * `ca_certs` - (Output) Specifies a list of allowed custom CA certificates for HTTPS verification. - Structure is [documented below](#nested_snapshot_toolsets_toolsets_open_api_toolset_tls_config_ca_certs). + Structure is [documented below](#nested_snapshot_toolsets_open_api_toolset_tls_config_ca_certs). -The `ca_certs` block contains: +The `ca_certs` block contains: * `cert` - (Output) diff --git a/website/docs/r/ces_example.html.markdown b/website/docs/r/ces_example.html.markdown index 2786e840064..b8b24937862 100644 --- a/website/docs/r/ces_example.html.markdown +++ b/website/docs/r/ces_example.html.markdown @@ -248,25 +248,25 @@ The following arguments are supported: * `chunks` - (Optional) Content of the message as a series of chunks. - Structure is [documented below](#nested_messages_messages_chunks). + Structure is [documented below](#nested_messages_chunks). * `role` - (Optional) The role within the conversation, e.g., user, agent. -The `chunks` block supports: +The `chunks` block supports: * `agent_transfer` - (Optional) Represents an event indicating the transfer of a conversation to a different agent. - Structure is [documented below](#nested_messages_messages_chunks_chunks_agent_transfer). + Structure is [documented below](#nested_messages_chunks_agent_transfer). * `image` - (Optional) Represents an image input or output in the conversation. - Structure is [documented below](#nested_messages_messages_chunks_chunks_image). + Structure is [documented below](#nested_messages_chunks_image). * `text` - (Optional) @@ -275,12 +275,12 @@ The following arguments are supported: * `tool_call` - (Optional) Request for the client or the agent to execute the specified tool. - Structure is [documented below](#nested_messages_messages_chunks_chunks_tool_call). + Structure is [documented below](#nested_messages_chunks_tool_call). * `tool_response` - (Optional) The execution result of a specific tool from the client or the agent. - Structure is [documented below](#nested_messages_messages_chunks_chunks_tool_response). + Structure is [documented below](#nested_messages_chunks_tool_response). * `updated_variables` - (Optional) @@ -288,7 +288,7 @@ The following arguments are supported: keyed by variable names. -The `agent_transfer` block supports: +The `agent_transfer` block supports: * `display_name` - (Output) @@ -300,7 +300,7 @@ The following arguments are supported: handle the conversation from this point forward. Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` -The `image` block supports: +The `image` block supports: * `data` - (Required) @@ -314,7 +314,7 @@ The following arguments are supported: * image/jpeg * image/webp -The `tool_call` block supports: +The `tool_call` block supports: * `args` - (Optional) @@ -338,10 +338,10 @@ The following arguments are supported: * `toolset_tool` - (Optional) A tool that is created from a toolset. - Structure is [documented below](#nested_messages_messages_chunks_chunks_tool_call_toolset_tool). + Structure is [documented below](#nested_messages_chunks_tool_call_toolset_tool). -The `toolset_tool` block supports: +The `toolset_tool` block supports: * `toolset` - (Required) @@ -353,7 +353,7 @@ The following arguments are supported: (Optional) The tool ID to filter the tools to retrieve the schema for. -The `tool_response` block supports: +The `tool_response` block supports: * `display_name` - (Output) @@ -378,10 +378,10 @@ The following arguments are supported: * `toolset_tool` - (Optional) A tool that is created from a toolset. - Structure is [documented below](#nested_messages_messages_chunks_chunks_tool_response_toolset_tool). + Structure is [documented below](#nested_messages_chunks_tool_response_toolset_tool). -The `toolset_tool` block supports: +The `toolset_tool` block supports: * `toolset` - (Required) diff --git a/website/docs/r/ces_tool.html.markdown b/website/docs/r/ces_tool.html.markdown index 3017c9cb1b0..45cd00725bc 100644 --- a/website/docs/r/ces_tool.html.markdown +++ b/website/docs/r/ces_tool.html.markdown @@ -649,18 +649,18 @@ The following arguments are supported: * `spec` - (Required) A list of boosting specifications. - Structure is [documented below](#nested_data_store_tool_boost_specs_boost_specs_spec). + Structure is [documented below](#nested_data_store_tool_boost_specs_spec). -The `spec` block supports: +The `spec` block supports: * `condition_boost_specs` - (Required) A list of boosting specifications. - Structure is [documented below](#nested_data_store_tool_boost_specs_boost_specs_spec_spec_condition_boost_specs). + Structure is [documented below](#nested_data_store_tool_boost_specs_spec_condition_boost_specs). -The `condition_boost_specs` block supports: +The `condition_boost_specs` block supports: * `boost` - (Optional) @@ -678,7 +678,7 @@ The following arguments are supported: Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. - Structure is [documented below](#nested_data_store_tool_boost_specs_boost_specs_spec_spec_condition_boost_specs_condition_boost_specs_boost_control_spec). + Structure is [documented below](#nested_data_store_tool_boost_specs_spec_condition_boost_specs_boost_control_spec). * `condition` - (Required) @@ -689,7 +689,7 @@ The following arguments are supported: (lang_code: ANY("en", "fr")) -The `boost_control_spec` block supports: +The `boost_control_spec` block supports: * `attribute_type` - (Optional) @@ -707,7 +707,7 @@ The following arguments are supported: The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. - Structure is [documented below](#nested_data_store_tool_boost_specs_boost_specs_spec_spec_condition_boost_specs_condition_boost_specs_boost_control_spec_control_points). + Structure is [documented below](#nested_data_store_tool_boost_specs_spec_condition_boost_specs_boost_control_spec_control_points). * `field_name` - (Optional) @@ -722,7 +722,7 @@ The following arguments are supported: LINEAR -The `control_points` block supports: +The `control_points` block supports: * `attribute_value` - (Optional) @@ -766,7 +766,7 @@ The following arguments are supported: * `data_store` - (Optional) A DataStore resource in Vertex AI Search. - Structure is [documented below](#nested_data_store_tool_engine_source_data_store_sources_data_store_sources_data_store). + Structure is [documented below](#nested_data_store_tool_engine_source_data_store_sources_data_store). * `filter` - (Optional) @@ -775,12 +775,12 @@ The following arguments are supported: https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata -The `data_store` block supports: +The `data_store` block supports: * `connector_config` - (Output) The connector config for the data store connection. - Structure is [documented below](#nested_data_store_tool_engine_source_data_store_sources_data_store_sources_data_store_connector_config). + Structure is [documented below](#nested_data_store_tool_engine_source_data_store_sources_data_store_connector_config). * `create_time` - (Output) @@ -815,7 +815,7 @@ The following arguments are supported: CONNECTOR -The `connector_config` block contains: +The `connector_config` block contains: * `collection` - (Output) @@ -835,7 +835,7 @@ The following arguments are supported: * `grounding_config` - (Optional) Grounding configuration. - Structure is [documented below](#nested_data_store_tool_modality_configs_modality_configs_grounding_config). + Structure is [documented below](#nested_data_store_tool_modality_configs_grounding_config). * `modality_type` - (Required) @@ -847,15 +847,15 @@ The following arguments are supported: * `rewriter_config` - (Optional) Rewriter configuration. - Structure is [documented below](#nested_data_store_tool_modality_configs_modality_configs_rewriter_config). + Structure is [documented below](#nested_data_store_tool_modality_configs_rewriter_config). * `summarization_config` - (Optional) Summarization configuration. - Structure is [documented below](#nested_data_store_tool_modality_configs_modality_configs_summarization_config). + Structure is [documented below](#nested_data_store_tool_modality_configs_summarization_config). -The `grounding_config` block supports: +The `grounding_config` block supports: * `disabled` - (Optional) @@ -871,7 +871,7 @@ The following arguments are supported: For example, a level of 3 means that the groundedness score must be 3 or higher for the response to be returned. -The `rewriter_config` block supports: +The `rewriter_config` block supports: * `disabled` - (Optional) @@ -880,14 +880,14 @@ The following arguments are supported: * `model_settings` - (Required) Model settings contains various configurations for the LLM model. - Structure is [documented below](#nested_data_store_tool_modality_configs_modality_configs_rewriter_config_model_settings). + Structure is [documented below](#nested_data_store_tool_modality_configs_rewriter_config_model_settings). * `prompt` - (Optional) The prompt definition. If not set, default prompt will be used. -The `model_settings` block supports: +The `model_settings` block supports: * `model` - (Optional) @@ -901,7 +901,7 @@ The following arguments are supported: produce responses that are more predictable. Higher temperatures produce responses that are more creative. -The `summarization_config` block supports: +The `summarization_config` block supports: * `disabled` - (Optional) @@ -910,14 +910,14 @@ The following arguments are supported: * `model_settings` - (Optional) Model settings contains various configurations for the LLM model. - Structure is [documented below](#nested_data_store_tool_modality_configs_modality_configs_summarization_config_model_settings). + Structure is [documented below](#nested_data_store_tool_modality_configs_summarization_config_model_settings). * `prompt` - (Optional) The prompt definition. If not set, default prompt will be used. -The `model_settings` block supports: +The `model_settings` block supports: * `model` - (Optional) diff --git a/website/docs/r/chronicle_data_access_scope.html.markdown b/website/docs/r/chronicle_data_access_scope.html.markdown index 77cd71f64f8..de8e5f680f0 100644 --- a/website/docs/r/chronicle_data_access_scope.html.markdown +++ b/website/docs/r/chronicle_data_access_scope.html.markdown @@ -211,7 +211,7 @@ The following arguments are supported: * `ingestion_label` - (Optional) Representation of an ingestion label type. - Structure is [documented below](#nested_allowed_data_access_labels_allowed_data_access_labels_ingestion_label). + Structure is [documented below](#nested_allowed_data_access_labels_ingestion_label). * `display_name` - (Output) @@ -222,7 +222,7 @@ The following arguments are supported: The ingestion key value pair will match the key of the tuple. -The `ingestion_label` block supports: +The `ingestion_label` block supports: * `ingestion_label_key` - (Required) @@ -260,10 +260,10 @@ The following arguments are supported: * `ingestion_label` - (Optional) Representation of an ingestion label type. - Structure is [documented below](#nested_denied_data_access_labels_denied_data_access_labels_ingestion_label). + Structure is [documented below](#nested_denied_data_access_labels_ingestion_label). -The `ingestion_label` block supports: +The `ingestion_label` block supports: * `ingestion_label_key` - (Required) diff --git a/website/docs/r/chronicle_rule.html.markdown b/website/docs/r/chronicle_rule.html.markdown index 31c359f850d..ea5a4c60143 100644 --- a/website/docs/r/chronicle_rule.html.markdown +++ b/website/docs/r/chronicle_rule.html.markdown @@ -228,7 +228,7 @@ In addition to the arguments listed above, the following computed attributes are (Optional) CompilationPosition represents the location of a compilation diagnostic in rule text. - Structure is [documented below](#nested_compilation_diagnostics_compilation_diagnostics_position). + Structure is [documented below](#nested_compilation_diagnostics_position). * `severity` - (Output) @@ -243,7 +243,7 @@ In addition to the arguments listed above, the following computed attributes are Output only. Link to documentation that describes a diagnostic in more detail. -The `position` block supports: +The `position` block supports: * `start_line` - (Output) diff --git a/website/docs/r/cloud_identity_group_membership.html.markdown b/website/docs/r/cloud_identity_group_membership.html.markdown index 359d576a0c2..abaa30e156f 100644 --- a/website/docs/r/cloud_identity_group_membership.html.markdown +++ b/website/docs/r/cloud_identity_group_membership.html.markdown @@ -156,10 +156,10 @@ The following arguments are supported: (Optional) The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry. - Structure is [documented below](#nested_roles_roles_expiry_detail). + Structure is [documented below](#nested_roles_expiry_detail). -The `expiry_detail` block supports: +The `expiry_detail` block supports: * `expire_time` - (Required) diff --git a/website/docs/r/cloud_run_service.html.markdown b/website/docs/r/cloud_run_service.html.markdown index da23eb3b2e2..26ed76bc476 100644 --- a/website/docs/r/cloud_run_service.html.markdown +++ b/website/docs/r/cloud_run_service.html.markdown @@ -369,7 +369,7 @@ The following arguments are supported: (Optional) Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations - Structure is [documented below](#nested_spec_traffic). + Structure is [documented below](#nested_traffic). * `template` - (Optional) @@ -382,7 +382,7 @@ The following arguments are supported: https://github.com/knative/serving/blob/main/docs/client-conventions.md#associate-modifications-with-revisions Cloud Run does not currently support referencing a build that is responsible for materializing the container image from source. - Structure is [documented below](#nested_spec_template). + Structure is [documented below](#nested_template). * `metadata` - (Optional) @@ -401,7 +401,7 @@ this field is set to false, the revision name will still autogenerate.) -The `traffic` block supports: +The `traffic` block supports: * `revision_name` - (Optional) @@ -428,7 +428,7 @@ this field is set to false, the revision name will still autogenerate.) and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.) -The `template` block supports: +The `template` block supports: * `metadata` - (Optional) @@ -439,15 +439,15 @@ this field is set to false, the revision name will still autogenerate.) "autoscaling.knative.dev/maxScale" annotation key. To set Cloud SQL connections for the revision, use the "run.googleapis.com/cloudsql-instances" annotation key. - Structure is [documented below](#nested_spec_template_metadata). + Structure is [documented below](#nested_template_metadata). * `spec` - (Required) RevisionSpec holds the desired state of the Revision (from the client). - Structure is [documented below](#nested_spec_template_spec). + Structure is [documented below](#nested_template_spec). -The `metadata` block supports: +The `metadata` block supports: * `labels` - (Optional) @@ -532,12 +532,12 @@ this field is set to false, the revision name will still autogenerate.) Is required when creating resources. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. -The `spec` block supports: +The `spec` block supports: * `containers` - (Required) Containers defines the unit of execution for this Revision. - Structure is [documented below](#nested_spec_template_spec_containers). + Structure is [documented below](#nested_template_spec_containers). * `node_selector` - (Optional) @@ -565,7 +565,7 @@ this field is set to false, the revision name will still autogenerate.) * `volumes` - (Optional) Volume represents a named volume in a container. - Structure is [documented below](#nested_spec_template_spec_volumes). + Structure is [documented below](#nested_template_spec_volumes). * `serving_state` - (Output, Deprecated) @@ -577,7 +577,7 @@ this field is set to false, the revision name will still autogenerate.) ~> **Warning:** `serving_state` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API. -The `containers` block supports: +The `containers` block supports: * `name` - (Optional) @@ -603,7 +603,7 @@ this field is set to false, the revision name will still autogenerate.) When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env_from). + Structure is [documented below](#nested_template_spec_containers_env_from). ~> **Warning:** `env_from` is deprecated and will be removed in a future major release. This field is not supported by the Cloud Run API. @@ -620,43 +620,43 @@ this field is set to false, the revision name will still autogenerate.) * `env` - (Optional) List of environment variables to set in the container. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env). + Structure is [documented below](#nested_template_spec_containers_env). * `ports` - (Optional) List of open ports in the container. - Structure is [documented below](#nested_spec_template_spec_containers_containers_ports). + Structure is [documented below](#nested_template_spec_containers_ports). * `resources` - (Optional) Compute Resources required by this container. Used to set values such as max memory - Structure is [documented below](#nested_spec_template_spec_containers_containers_resources). + Structure is [documented below](#nested_template_spec_containers_resources). * `volume_mounts` - (Optional) Volume to mount into the container's filesystem. Only supports SecretVolumeSources. - Structure is [documented below](#nested_spec_template_spec_containers_containers_volume_mounts). + Structure is [documented below](#nested_template_spec_containers_volume_mounts). * `startup_probe` - (Optional) Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. - Structure is [documented below](#nested_spec_template_spec_containers_containers_startup_probe). + Structure is [documented below](#nested_template_spec_containers_startup_probe). * `readiness_probe` - (Optional) Periodic probe of container readiness. - Structure is [documented below](#nested_spec_template_spec_containers_containers_readiness_probe). + Structure is [documented below](#nested_template_spec_containers_readiness_probe). * `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. - Structure is [documented below](#nested_spec_template_spec_containers_containers_liveness_probe). + Structure is [documented below](#nested_template_spec_containers_liveness_probe). -The `env_from` block supports: +The `env_from` block supports: * `prefix` - (Optional) @@ -665,15 +665,15 @@ this field is set to false, the revision name will still autogenerate.) * `config_map_ref` - (Optional) The ConfigMap to select from. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env_from_env_from_config_map_ref). + Structure is [documented below](#nested_template_spec_containers_env_from_config_map_ref). * `secret_ref` - (Optional) The Secret to select from. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env_from_env_from_secret_ref). + Structure is [documented below](#nested_template_spec_containers_env_from_secret_ref). -The `config_map_ref` block supports: +The `config_map_ref` block supports: * `optional` - (Optional) @@ -682,34 +682,34 @@ this field is set to false, the revision name will still autogenerate.) * `local_object_reference` - (Optional) The ConfigMap to select from. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env_from_env_from_config_map_ref_local_object_reference). + Structure is [documented below](#nested_template_spec_containers_env_from_config_map_ref_local_object_reference). -The `local_object_reference` block supports: +The `local_object_reference` block supports: * `name` - (Required) Name of the referent. -The `secret_ref` block supports: +The `secret_ref` block supports: * `local_object_reference` - (Optional) The Secret to select from. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env_from_env_from_secret_ref_local_object_reference). + Structure is [documented below](#nested_template_spec_containers_env_from_secret_ref_local_object_reference). * `optional` - (Optional) Specify whether the Secret must be defined -The `local_object_reference` block supports: +The `local_object_reference` block supports: * `name` - (Required) Name of the referent. -The `env` block supports: +The `env` block supports: * `name` - (Optional) @@ -722,18 +722,18 @@ this field is set to false, the revision name will still autogenerate.) * `value_from` - (Optional) Source for the environment variable's value. Only supports secret_key_ref. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env_env_value_from). + Structure is [documented below](#nested_template_spec_containers_env_value_from). -The `value_from` block supports: +The `value_from` block supports: * `secret_key_ref` - (Required) Selects a key (version) of a secret in Secret Manager. - Structure is [documented below](#nested_spec_template_spec_containers_containers_env_env_value_from_secret_key_ref). + Structure is [documented below](#nested_template_spec_containers_env_value_from_secret_key_ref). -The `secret_key_ref` block supports: +The `secret_key_ref` block supports: * `key` - (Required) @@ -749,7 +749,7 @@ this field is set to false, the revision name will still autogenerate.) If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation. -The `ports` block supports: +The `ports` block supports: * `name` - (Optional) @@ -763,7 +763,7 @@ this field is set to false, the revision name will still autogenerate.) (Optional) Port number the container listens on. This must be a valid port number (between 1 and 65535). Defaults to "8080". -The `resources` block supports: +The `resources` block supports: * `limits` - (Optional) @@ -783,7 +783,7 @@ this field is set to false, the revision name will still autogenerate.) The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go -The `volume_mounts` block supports: +The `volume_mounts` block supports: * `mount_path` - (Required) @@ -798,7 +798,7 @@ this field is set to false, the revision name will still autogenerate.) (Required) This must match the Name of a Volume. -The `startup_probe` block supports: +The `startup_probe` block supports: * `initial_delay_seconds` - (Optional) @@ -825,27 +825,27 @@ this field is set to false, the revision name will still autogenerate.) * `tcp_socket` - (Optional) TcpSocket specifies an action involving a TCP port. - Structure is [documented below](#nested_spec_template_spec_containers_containers_startup_probe_tcp_socket). + Structure is [documented below](#nested_template_spec_containers_startup_probe_tcp_socket). * `http_get` - (Optional) HttpGet specifies the http request to perform. - Structure is [documented below](#nested_spec_template_spec_containers_containers_startup_probe_http_get). + Structure is [documented below](#nested_template_spec_containers_startup_probe_http_get). * `grpc` - (Optional) GRPC specifies an action involving a GRPC port. - Structure is [documented below](#nested_spec_template_spec_containers_containers_startup_probe_grpc). + Structure is [documented below](#nested_template_spec_containers_startup_probe_grpc). -The `tcp_socket` block supports: +The `tcp_socket` block supports: * `port` - (Optional) Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort. -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -859,10 +859,10 @@ this field is set to false, the revision name will still autogenerate.) * `http_headers` - (Optional) Custom headers to set in the request. HTTP allows repeated headers. - Structure is [documented below](#nested_spec_template_spec_containers_containers_startup_probe_http_get_http_headers). + Structure is [documented below](#nested_template_spec_containers_startup_probe_http_get_http_headers). -The `http_headers` block supports: +The `http_headers` block supports: * `name` - (Required) @@ -872,7 +872,7 @@ this field is set to false, the revision name will still autogenerate.) (Optional) The header field value. -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -885,7 +885,7 @@ this field is set to false, the revision name will still autogenerate.) (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. -The `readiness_probe` block supports: +The `readiness_probe` block supports: * `timeout_seconds` - (Optional) @@ -910,15 +910,15 @@ this field is set to false, the revision name will still autogenerate.) * `http_get` - (Optional) HttpGet specifies the http request to perform. - Structure is [documented below](#nested_spec_template_spec_containers_containers_readiness_probe_http_get). + Structure is [documented below](#nested_template_spec_containers_readiness_probe_http_get). * `grpc` - (Optional) GRPC specifies an action involving a GRPC port. - Structure is [documented below](#nested_spec_template_spec_containers_containers_readiness_probe_grpc). + Structure is [documented below](#nested_template_spec_containers_readiness_probe_grpc). -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -929,7 +929,7 @@ this field is set to false, the revision name will still autogenerate.) Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort. -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -942,7 +942,7 @@ this field is set to false, the revision name will still autogenerate.) (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. -The `liveness_probe` block supports: +The `liveness_probe` block supports: * `initial_delay_seconds` - (Optional) @@ -969,15 +969,15 @@ this field is set to false, the revision name will still autogenerate.) * `http_get` - (Optional) HttpGet specifies the http request to perform. - Structure is [documented below](#nested_spec_template_spec_containers_containers_liveness_probe_http_get). + Structure is [documented below](#nested_template_spec_containers_liveness_probe_http_get). * `grpc` - (Optional) GRPC specifies an action involving a GRPC port. - Structure is [documented below](#nested_spec_template_spec_containers_containers_liveness_probe_grpc). + Structure is [documented below](#nested_template_spec_containers_liveness_probe_grpc). -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -991,10 +991,10 @@ this field is set to false, the revision name will still autogenerate.) * `http_headers` - (Optional) Custom headers to set in the request. HTTP allows repeated headers. - Structure is [documented below](#nested_spec_template_spec_containers_containers_liveness_probe_http_get_http_headers). + Structure is [documented below](#nested_template_spec_containers_liveness_probe_http_get_http_headers). -The `http_headers` block supports: +The `http_headers` block supports: * `name` - (Required) @@ -1004,7 +1004,7 @@ this field is set to false, the revision name will still autogenerate.) (Optional) The header field value. -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -1017,7 +1017,7 @@ this field is set to false, the revision name will still autogenerate.) (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. -The `volumes` block supports: +The `volumes` block supports: * `name` - (Required) @@ -1028,26 +1028,26 @@ this field is set to false, the revision name will still autogenerate.) The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret_name. - Structure is [documented below](#nested_spec_template_spec_volumes_volumes_secret). + Structure is [documented below](#nested_template_spec_volumes_secret). * `empty_dir` - (Optional) Ephemeral storage which can be backed by real disks (HD, SSD), network storage or memory (i.e. tmpfs). For now only in memory (tmpfs) is supported. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs). - Structure is [documented below](#nested_spec_template_spec_volumes_volumes_empty_dir). + Structure is [documented below](#nested_template_spec_volumes_empty_dir). * `csi` - (Optional) A filesystem specified by the Container Storage Interface (CSI). - Structure is [documented below](#nested_spec_template_spec_volumes_volumes_csi). + Structure is [documented below](#nested_template_spec_volumes_csi). * `nfs` - (Optional) A filesystem backed by a Network File System share. This filesystem requires the run.googleapis.com/execution-environment annotation to be unset or set to "gen2" - Structure is [documented below](#nested_spec_template_spec_volumes_volumes_nfs). + Structure is [documented below](#nested_template_spec_volumes_nfs). -The `secret` block supports: +The `secret` block supports: * `secret_name` - (Required) @@ -1075,10 +1075,10 @@ this field is set to false, the revision name will still autogenerate.) If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a key and a path. - Structure is [documented below](#nested_spec_template_spec_volumes_volumes_secret_items). + Structure is [documented below](#nested_template_spec_volumes_secret_items). -The `items` block supports: +The `items` block supports: * `key` - (Required) @@ -1099,7 +1099,7 @@ this field is set to false, the revision name will still autogenerate.) conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. -The `empty_dir` block supports: +The `empty_dir` block supports: * `medium` - (Optional) @@ -1109,7 +1109,7 @@ this field is set to false, the revision name will still autogenerate.) (Optional) Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir. -The `csi` block supports: +The `csi` block supports: * `driver` - (Required) @@ -1127,7 +1127,7 @@ this field is set to false, the revision name will still autogenerate.) * gcsfuse.run.googleapis.com * bucketName: The name of the Cloud Storage Bucket that backs this volume. The Cloud Run Service identity must have access to this bucket. -The `nfs` block supports: +The `nfs` block supports: * `server` - (Required) diff --git a/website/docs/r/cloud_run_v2_job.html.markdown b/website/docs/r/cloud_run_v2_job.html.markdown index 156324691b9..98147c6a177 100644 --- a/website/docs/r/cloud_run_v2_job.html.markdown +++ b/website/docs/r/cloud_run_v2_job.html.markdown @@ -604,23 +604,23 @@ When the field is set to false, deleting the job is allowed. * `env` - (Optional) List of environment variables to set in the container. - Structure is [documented below](#nested_template_template_containers_containers_env). + Structure is [documented below](#nested_template_template_containers_env). * `resources` - (Optional) Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - Structure is [documented below](#nested_template_template_containers_containers_resources). + Structure is [documented below](#nested_template_template_containers_resources). * `ports` - (Optional) List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on - Structure is [documented below](#nested_template_template_containers_containers_ports). + Structure is [documented below](#nested_template_template_containers_ports). * `volume_mounts` - (Optional) Volume to mount into the container's filesystem. - Structure is [documented below](#nested_template_template_containers_containers_volume_mounts). + Structure is [documented below](#nested_template_template_containers_volume_mounts). * `working_dir` - (Optional) @@ -635,10 +635,10 @@ When the field is set to false, deleting the job is allowed. Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. - Structure is [documented below](#nested_template_template_containers_containers_startup_probe). + Structure is [documented below](#nested_template_template_containers_startup_probe). -The `env` block supports: +The `env` block supports: * `name` - (Required) @@ -651,18 +651,18 @@ When the field is set to false, deleting the job is allowed. * `value_source` - (Optional) Source for the environment variable's value. - Structure is [documented below](#nested_template_template_containers_containers_env_env_value_source). + Structure is [documented below](#nested_template_template_containers_env_value_source). -The `value_source` block supports: +The `value_source` block supports: * `secret_key_ref` - (Optional) Selects a secret and a specific version from Cloud Secret Manager. - Structure is [documented below](#nested_template_template_containers_containers_env_env_value_source_secret_key_ref). + Structure is [documented below](#nested_template_template_containers_env_value_source_secret_key_ref). -The `secret_key_ref` block supports: +The `secret_key_ref` block supports: * `secret` - (Required) @@ -672,13 +672,13 @@ When the field is set to false, deleting the job is allowed. (Required) The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version. -The `resources` block supports: +The `resources` block supports: * `limits` - (Optional) Only memory, CPU, and nvidia.com/gpu are supported. Use key `cpu` for CPU limit, `memory` for memory limit, `nvidia.com/gpu` for gpu limit. Note: The only supported values for CPU are '1', '2', '4', '6', and '8'. Setting 4 CPU requires at least 2Gi of memory, setting 6 or more CPU requires at least 4Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go -The `ports` block supports: +The `ports` block supports: * `name` - (Optional) @@ -688,7 +688,7 @@ When the field is set to false, deleting the job is allowed. (Optional) Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536. -The `volume_mounts` block supports: +The `volume_mounts` block supports: * `name` - (Required) @@ -702,7 +702,7 @@ When the field is set to false, deleting the job is allowed. (Optional) Path within the volume from which the container's volume should be mounted. -The `startup_probe` block supports: +The `startup_probe` block supports: * `initial_delay_seconds` - (Optional) @@ -729,27 +729,27 @@ When the field is set to false, deleting the job is allowed. * `tcp_socket` - (Optional) TcpSocket specifies an action involving a TCP port. - Structure is [documented below](#nested_template_template_containers_containers_startup_probe_tcp_socket). + Structure is [documented below](#nested_template_template_containers_startup_probe_tcp_socket). * `http_get` - (Optional) HttpGet specifies the http request to perform. - Structure is [documented below](#nested_template_template_containers_containers_startup_probe_http_get). + Structure is [documented below](#nested_template_template_containers_startup_probe_http_get). * `grpc` - (Optional) GRPC specifies an action involving a GRPC port. - Structure is [documented below](#nested_template_template_containers_containers_startup_probe_grpc). + Structure is [documented below](#nested_template_template_containers_startup_probe_grpc). -The `tcp_socket` block supports: +The `tcp_socket` block supports: * `port` - (Optional) Port number to access on the container. Number must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort. -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -763,10 +763,10 @@ When the field is set to false, deleting the job is allowed. * `http_headers` - (Optional) Custom headers to set in the request. HTTP allows repeated headers. - Structure is [documented below](#nested_template_template_containers_containers_startup_probe_http_get_http_headers). + Structure is [documented below](#nested_template_template_containers_startup_probe_http_get_http_headers). -The `http_headers` block supports: +The `http_headers` block supports: * `name` - (Required) @@ -776,7 +776,7 @@ When the field is set to false, deleting the job is allowed. (Optional) The header field value. -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -798,30 +798,30 @@ When the field is set to false, deleting the job is allowed. * `secret` - (Optional) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - Structure is [documented below](#nested_template_template_volumes_volumes_secret). + Structure is [documented below](#nested_template_template_volumes_secret). * `cloud_sql_instance` - (Optional) For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. - Structure is [documented below](#nested_template_template_volumes_volumes_cloud_sql_instance). + Structure is [documented below](#nested_template_template_volumes_cloud_sql_instance). * `empty_dir` - (Optional) Ephemeral storage used as a shared volume. - Structure is [documented below](#nested_template_template_volumes_volumes_empty_dir). + Structure is [documented below](#nested_template_template_volumes_empty_dir). * `gcs` - (Optional) Cloud Storage bucket mounted as a volume using GCSFuse. - Structure is [documented below](#nested_template_template_volumes_volumes_gcs). + Structure is [documented below](#nested_template_template_volumes_gcs). * `nfs` - (Optional) NFS share mounted as a volume. - Structure is [documented below](#nested_template_template_volumes_volumes_nfs). + Structure is [documented below](#nested_template_template_volumes_nfs). -The `secret` block supports: +The `secret` block supports: * `secret` - (Required) @@ -834,10 +834,10 @@ When the field is set to false, deleting the job is allowed. * `items` - (Optional) If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version. - Structure is [documented below](#nested_template_template_volumes_volumes_secret_items). + Structure is [documented below](#nested_template_template_volumes_secret_items). -The `items` block supports: +The `items` block supports: * `path` - (Required) @@ -851,13 +851,13 @@ When the field is set to false, deleting the job is allowed. (Optional) Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. -The `cloud_sql_instance` block supports: +The `cloud_sql_instance` block supports: * `instances` - (Optional) The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} -The `empty_dir` block supports: +The `empty_dir` block supports: * `medium` - (Optional) @@ -869,7 +869,7 @@ When the field is set to false, deleting the job is allowed. (Optional) Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -884,7 +884,7 @@ When the field is set to false, deleting the job is allowed. A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes. -The `nfs` block supports: +The `nfs` block supports: * `server` - (Required) diff --git a/website/docs/r/cloud_run_v2_service.html.markdown b/website/docs/r/cloud_run_v2_service.html.markdown index 0d17d24921d..ef9483358a3 100644 --- a/website/docs/r/cloud_run_v2_service.html.markdown +++ b/website/docs/r/cloud_run_v2_service.html.markdown @@ -622,6 +622,56 @@ resource "google_cloud_run_v2_service" "default" { } } ``` + +## Example Usage - Cloudrunv2 Service Zip Deploy + + +```hcl +resource "google_storage_bucket" "sourcebucket" { + provider = google-beta + name = "${data.google_project.project.project_id}-tf-test-gcf-source%{random_suffix}" # Every bucket name must be globally unique + location = "US" + uniform_bucket_level_access = true +} + +resource "google_storage_bucket_object" "source_tar" { + provider = google-beta + name = "function-source.zip" + bucket = google_storage_bucket.sourcebucket.name + source = "./test-fixtures/cr-zip-nodejs-hello.tar.gz" +} + +resource "google_cloud_run_v2_service" "default" { + provider = google-beta + name = "cloudrun-zip-service" + location = "us-central1" + deletion_protection = false + + template { + containers { + image = "scratch" + base_image_uri = "us-central1-docker.pkg.dev/serverless-runtimes/google-24-full/runtimes/nodejs24" + command = ["node"] + args = ["index.js"] + source_code { + cloud_storage_source { + bucket = google_storage_bucket.sourcebucket.name + object = google_storage_bucket_object.source_tar.name + generation = google_storage_bucket_object.source_tar.generation + } + } + } + } +} + +data "google_project" "project" { + provider = google-beta +} +``` ## Argument Reference @@ -891,23 +941,23 @@ When the field is set to false, deleting the service is allowed. * `env` - (Optional) List of environment variables to set in the container. - Structure is [documented below](#nested_template_containers_containers_env). + Structure is [documented below](#nested_template_containers_env). * `resources` - (Optional) Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - Structure is [documented below](#nested_template_containers_containers_resources). + Structure is [documented below](#nested_template_containers_resources). * `ports` - (Optional) List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on - Structure is [documented below](#nested_template_containers_containers_ports). + Structure is [documented below](#nested_template_containers_ports). * `volume_mounts` - (Optional) Volume to mount into the container's filesystem. - Structure is [documented below](#nested_template_containers_containers_volume_mounts). + Structure is [documented below](#nested_template_containers_volume_mounts). * `working_dir` - (Optional) @@ -916,12 +966,12 @@ When the field is set to false, deleting the service is allowed. * `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - Structure is [documented below](#nested_template_containers_containers_liveness_probe). + Structure is [documented below](#nested_template_containers_liveness_probe). * `startup_probe` - (Optional) Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - Structure is [documented below](#nested_template_containers_containers_startup_probe). + Structure is [documented below](#nested_template_containers_startup_probe). * `depends_on` - (Optional) @@ -934,10 +984,15 @@ When the field is set to false, deleting the service is allowed. * `build_info` - (Output) The build info of the container image. - Structure is [documented below](#nested_template_containers_containers_build_info). + Structure is [documented below](#nested_template_containers_build_info). + +* `source_code` - + (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + Location of the source. + Structure is [documented below](#nested_template_containers_source_code). -The `env` block supports: +The `env` block supports: * `name` - (Required) @@ -950,18 +1005,18 @@ When the field is set to false, deleting the service is allowed. * `value_source` - (Optional) Source for the environment variable's value. - Structure is [documented below](#nested_template_containers_containers_env_env_value_source). + Structure is [documented below](#nested_template_containers_env_value_source). -The `value_source` block supports: +The `value_source` block supports: * `secret_key_ref` - (Optional) Selects a secret and a specific version from Cloud Secret Manager. - Structure is [documented below](#nested_template_containers_containers_env_env_value_source_secret_key_ref). + Structure is [documented below](#nested_template_containers_env_value_source_secret_key_ref). -The `secret_key_ref` block supports: +The `secret_key_ref` block supports: * `secret` - (Required) @@ -971,7 +1026,7 @@ When the field is set to false, deleting the service is allowed. (Optional) The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version. -The `resources` block supports: +The `resources` block supports: * `limits` - (Optional) @@ -986,7 +1041,7 @@ When the field is set to false, deleting the service is allowed. (Optional) Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency. -The `ports` block supports: +The `ports` block supports: * `name` - (Optional) @@ -996,7 +1051,7 @@ When the field is set to false, deleting the service is allowed. (Optional) Port number the container listens on. This must be a valid TCP port number, 0 < containerPort < 65536. -The `volume_mounts` block supports: +The `volume_mounts` block supports: * `name` - (Required) @@ -1010,7 +1065,7 @@ When the field is set to false, deleting the service is allowed. (Optional) Path within the volume from which the container's volume should be mounted. -The `liveness_probe` block supports: +The `liveness_probe` block supports: * `initial_delay_seconds` - (Optional) @@ -1031,20 +1086,20 @@ When the field is set to false, deleting the service is allowed. * `http_get` - (Optional) HTTPGet specifies the http request to perform. - Structure is [documented below](#nested_template_containers_containers_liveness_probe_http_get). + Structure is [documented below](#nested_template_containers_liveness_probe_http_get). * `grpc` - (Optional) GRPC specifies an action involving a GRPC port. - Structure is [documented below](#nested_template_containers_containers_liveness_probe_grpc). + Structure is [documented below](#nested_template_containers_liveness_probe_grpc). * `tcp_socket` - (Optional) TCPSocketAction describes an action based on opening a socket - Structure is [documented below](#nested_template_containers_containers_liveness_probe_tcp_socket). + Structure is [documented below](#nested_template_containers_liveness_probe_tcp_socket). -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -1058,10 +1113,10 @@ When the field is set to false, deleting the service is allowed. * `http_headers` - (Optional) Custom headers to set in the request. HTTP allows repeated headers. - Structure is [documented below](#nested_template_containers_containers_liveness_probe_http_get_http_headers). + Structure is [documented below](#nested_template_containers_liveness_probe_http_get_http_headers). -The `http_headers` block supports: +The `http_headers` block supports: * `name` - (Required) @@ -1071,7 +1126,7 @@ When the field is set to false, deleting the service is allowed. (Optional) The header field value -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -1084,7 +1139,7 @@ When the field is set to false, deleting the service is allowed. (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. -The `tcp_socket` block supports: +The `tcp_socket` block supports: * `port` - (Required) @@ -1092,7 +1147,7 @@ When the field is set to false, deleting the service is allowed. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. -The `startup_probe` block supports: +The `startup_probe` block supports: * `initial_delay_seconds` - (Optional) @@ -1113,20 +1168,20 @@ When the field is set to false, deleting the service is allowed. * `http_get` - (Optional) HTTPGet specifies the http request to perform. Exactly one of HTTPGet or TCPSocket must be specified. - Structure is [documented below](#nested_template_containers_containers_startup_probe_http_get). + Structure is [documented below](#nested_template_containers_startup_probe_http_get). * `tcp_socket` - (Optional) TCPSocket specifies an action involving a TCP port. Exactly one of HTTPGet or TCPSocket must be specified. - Structure is [documented below](#nested_template_containers_containers_startup_probe_tcp_socket). + Structure is [documented below](#nested_template_containers_startup_probe_tcp_socket). * `grpc` - (Optional) GRPC specifies an action involving a GRPC port. - Structure is [documented below](#nested_template_containers_containers_startup_probe_grpc). + Structure is [documented below](#nested_template_containers_startup_probe_grpc). -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -1140,10 +1195,10 @@ When the field is set to false, deleting the service is allowed. * `http_headers` - (Optional) Custom headers to set in the request. HTTP allows repeated headers. - Structure is [documented below](#nested_template_containers_containers_startup_probe_http_get_http_headers). + Structure is [documented below](#nested_template_containers_startup_probe_http_get_http_headers). -The `http_headers` block supports: +The `http_headers` block supports: * `name` - (Required) @@ -1153,14 +1208,14 @@ When the field is set to false, deleting the service is allowed. (Optional) The header field value -The `tcp_socket` block supports: +The `tcp_socket` block supports: * `port` - (Optional) Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the same value as container.ports[0].containerPort. -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -1173,7 +1228,7 @@ When the field is set to false, deleting the service is allowed. (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. -The `build_info` block contains: +The `build_info` block contains: * `function_target` - (Output) @@ -1183,6 +1238,28 @@ When the field is set to false, deleting the service is allowed. (Output) Source code location of the image. +The `source_code` block supports: + +* `cloud_storage_source` - + (Optional) + Cloud Storage source. + Structure is [documented below](#nested_template_containers_source_code_cloud_storage_source). + + +The `cloud_storage_source` block supports: + +* `bucket` - + (Required) + The Cloud Storage bucket name. + +* `object` - + (Required) + The Cloud Storage object name. + +* `generation` - + (Optional) + The Cloud Storage object generation. The is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer. + The `volumes` block supports: * `name` - @@ -1192,30 +1269,30 @@ When the field is set to false, deleting the service is allowed. * `secret` - (Optional) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - Structure is [documented below](#nested_template_volumes_volumes_secret). + Structure is [documented below](#nested_template_volumes_secret). * `cloud_sql_instance` - (Optional) For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. - Structure is [documented below](#nested_template_volumes_volumes_cloud_sql_instance). + Structure is [documented below](#nested_template_volumes_cloud_sql_instance). * `empty_dir` - (Optional) Ephemeral storage used as a shared volume. - Structure is [documented below](#nested_template_volumes_volumes_empty_dir). + Structure is [documented below](#nested_template_volumes_empty_dir). * `gcs` - (Optional) Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. - Structure is [documented below](#nested_template_volumes_volumes_gcs). + Structure is [documented below](#nested_template_volumes_gcs). * `nfs` - (Optional) Represents an NFS mount. - Structure is [documented below](#nested_template_volumes_volumes_nfs). + Structure is [documented below](#nested_template_volumes_nfs). -The `secret` block supports: +The `secret` block supports: * `secret` - (Required) @@ -1228,10 +1305,10 @@ When the field is set to false, deleting the service is allowed. * `items` - (Optional) If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version. - Structure is [documented below](#nested_template_volumes_volumes_secret_items). + Structure is [documented below](#nested_template_volumes_secret_items). -The `items` block supports: +The `items` block supports: * `path` - (Required) @@ -1245,13 +1322,13 @@ When the field is set to false, deleting the service is allowed. (Optional) Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. -The `cloud_sql_instance` block supports: +The `cloud_sql_instance` block supports: * `instances` - (Optional) The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} -The `empty_dir` block supports: +The `empty_dir` block supports: * `medium` - (Optional) @@ -1263,7 +1340,7 @@ When the field is set to false, deleting the service is allowed. (Optional) Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -1278,7 +1355,7 @@ When the field is set to false, deleting the service is allowed. A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes. -The `nfs` block supports: +The `nfs` block supports: * `server` - (Required) diff --git a/website/docs/r/cloud_run_v2_worker_pool.html.markdown b/website/docs/r/cloud_run_v2_worker_pool.html.markdown index ddb0be3072c..12a1e6bde1e 100644 --- a/website/docs/r/cloud_run_v2_worker_pool.html.markdown +++ b/website/docs/r/cloud_run_v2_worker_pool.html.markdown @@ -464,29 +464,6 @@ resource "google_filestore_instance" "default" { } } ``` - -## Example Usage - Cloudrunv2 Worker Pool Custom Audiences - - -```hcl -resource "google_cloud_run_v2_worker_pool" "default" { - name = "cloudrun-worker-pool" - location = "us-central1" - deletion_protection = false - launch_stage = "BETA" - - custom_audiences = ["aud1"] - template { - containers { - image = "us-docker.pkg.dev/cloudrun/container/worker-pool" - } - } -} -```
Open in Cloud Shell @@ -621,10 +598,12 @@ The following arguments are supported: Structure is [documented below](#nested_binary_authorization). * `custom_audiences` - - (Optional) + (Optional, Deprecated) One or more custom audiences that you want this worker pool to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences. + ~> **Warning:** `custom_audiences` is deprecated since it is not applicable to WorkerPool resource and will be removed in a future major release. + * `scaling` - (Optional) Scaling settings that apply to the worker pool. @@ -770,17 +749,17 @@ When the field is set to false, deleting the WorkerPool is allowed. * `env` - (Optional) List of environment variables to set in the container. - Structure is [documented below](#nested_template_containers_containers_env). + Structure is [documented below](#nested_template_containers_env). * `resources` - (Optional) Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - Structure is [documented below](#nested_template_containers_containers_resources). + Structure is [documented below](#nested_template_containers_resources). * `volume_mounts` - (Optional) Volume to mount into the container's filesystem. - Structure is [documented below](#nested_template_containers_containers_volume_mounts). + Structure is [documented below](#nested_template_containers_volume_mounts). * `working_dir` - (Optional) @@ -789,15 +768,15 @@ When the field is set to false, deleting the WorkerPool is allowed. * `liveness_probe` - (Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. - Structure is [documented below](#nested_template_containers_containers_liveness_probe). + Structure is [documented below](#nested_template_containers_liveness_probe). * `startup_probe` - (Optional) Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. - Structure is [documented below](#nested_template_containers_containers_startup_probe). + Structure is [documented below](#nested_template_containers_startup_probe). -The `env` block supports: +The `env` block supports: * `name` - (Required) @@ -810,18 +789,18 @@ When the field is set to false, deleting the WorkerPool is allowed. * `value_source` - (Optional) Source for the environment variable's value. - Structure is [documented below](#nested_template_containers_containers_env_env_value_source). + Structure is [documented below](#nested_template_containers_env_value_source). -The `value_source` block supports: +The `value_source` block supports: * `secret_key_ref` - (Optional) Selects a secret and a specific version from Cloud Secret Manager. - Structure is [documented below](#nested_template_containers_containers_env_env_value_source_secret_key_ref). + Structure is [documented below](#nested_template_containers_env_value_source_secret_key_ref). -The `secret_key_ref` block supports: +The `secret_key_ref` block supports: * `secret` - (Required) @@ -831,13 +810,13 @@ When the field is set to false, deleting the WorkerPool is allowed. (Optional) The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version. -The `resources` block supports: +The `resources` block supports: * `limits` - (Optional) Only memory, CPU, and nvidia.com/gpu are supported. Use key `cpu` for CPU limit, `memory` for memory limit, `nvidia.com/gpu` for gpu limit. Note: The only supported values for CPU are '1', '2', '4', '6', and '8'. Setting 4 CPU requires at least 2Gi of memory, setting 6 or more CPU requires at least 4Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go -The `volume_mounts` block supports: +The `volume_mounts` block supports: * `name` - (Required) @@ -851,7 +830,7 @@ When the field is set to false, deleting the WorkerPool is allowed. (Optional) Path within the volume from which the container's volume should be mounted. -The `liveness_probe` block supports: +The `liveness_probe` block supports: * `initial_delay_seconds` - (Optional) @@ -872,20 +851,20 @@ When the field is set to false, deleting the WorkerPool is allowed. * `http_get` - (Optional) Optional. HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified. - Structure is [documented below](#nested_template_containers_containers_liveness_probe_http_get). + Structure is [documented below](#nested_template_containers_liveness_probe_http_get). * `tcp_socket` - (Optional) Optional. TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified. - Structure is [documented below](#nested_template_containers_containers_liveness_probe_tcp_socket). + Structure is [documented below](#nested_template_containers_liveness_probe_tcp_socket). * `grpc` - (Optional) Optional. GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified. - Structure is [documented below](#nested_template_containers_containers_liveness_probe_grpc). + Structure is [documented below](#nested_template_containers_liveness_probe_grpc). -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -898,10 +877,10 @@ When the field is set to false, deleting the WorkerPool is allowed. * `http_headers` - (Optional) Optional. Custom headers to set in the request. HTTP allows repeated headers. - Structure is [documented below](#nested_template_containers_containers_liveness_probe_http_get_http_headers). + Structure is [documented below](#nested_template_containers_liveness_probe_http_get_http_headers). -The `http_headers` block supports: +The `http_headers` block supports: * `port` - (Required) @@ -911,13 +890,13 @@ When the field is set to false, deleting the WorkerPool is allowed. (Optional) Optional. The header field value -The `tcp_socket` block supports: +The `tcp_socket` block supports: * `port` - (Optional) Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -927,7 +906,7 @@ When the field is set to false, deleting the WorkerPool is allowed. (Optional) Optional. Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this is not specified, the default behavior is defined by gRPC -The `startup_probe` block supports: +The `startup_probe` block supports: * `initial_delay_seconds` - (Optional) @@ -948,20 +927,20 @@ When the field is set to false, deleting the WorkerPool is allowed. * `http_get` - (Optional) Optional. HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified. - Structure is [documented below](#nested_template_containers_containers_startup_probe_http_get). + Structure is [documented below](#nested_template_containers_startup_probe_http_get). * `tcp_socket` - (Optional) Optional. TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified. - Structure is [documented below](#nested_template_containers_containers_startup_probe_tcp_socket). + Structure is [documented below](#nested_template_containers_startup_probe_tcp_socket). * `grpc` - (Optional) Optional. GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified. - Structure is [documented below](#nested_template_containers_containers_startup_probe_grpc). + Structure is [documented below](#nested_template_containers_startup_probe_grpc). -The `http_get` block supports: +The `http_get` block supports: * `path` - (Optional) @@ -974,10 +953,10 @@ When the field is set to false, deleting the WorkerPool is allowed. * `http_headers` - (Optional) Optional. Custom headers to set in the request. HTTP allows repeated headers. - Structure is [documented below](#nested_template_containers_containers_startup_probe_http_get_http_headers). + Structure is [documented below](#nested_template_containers_startup_probe_http_get_http_headers). -The `http_headers` block supports: +The `http_headers` block supports: * `port` - (Required) @@ -987,13 +966,13 @@ When the field is set to false, deleting the WorkerPool is allowed. (Optional) Optional. The header field value -The `tcp_socket` block supports: +The `tcp_socket` block supports: * `port` - (Optional) Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort. -The `grpc` block supports: +The `grpc` block supports: * `port` - (Optional) @@ -1012,30 +991,30 @@ When the field is set to false, deleting the WorkerPool is allowed. * `secret` - (Optional) Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - Structure is [documented below](#nested_template_volumes_volumes_secret). + Structure is [documented below](#nested_template_volumes_secret). * `cloud_sql_instance` - (Optional) For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. - Structure is [documented below](#nested_template_volumes_volumes_cloud_sql_instance). + Structure is [documented below](#nested_template_volumes_cloud_sql_instance). * `empty_dir` - (Optional) Ephemeral storage used as a shared volume. - Structure is [documented below](#nested_template_volumes_volumes_empty_dir). + Structure is [documented below](#nested_template_volumes_empty_dir). * `gcs` - (Optional) Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment. - Structure is [documented below](#nested_template_volumes_volumes_gcs). + Structure is [documented below](#nested_template_volumes_gcs). * `nfs` - (Optional) Represents an NFS mount. - Structure is [documented below](#nested_template_volumes_volumes_nfs). + Structure is [documented below](#nested_template_volumes_nfs). -The `secret` block supports: +The `secret` block supports: * `secret` - (Required) @@ -1048,10 +1027,10 @@ When the field is set to false, deleting the WorkerPool is allowed. * `items` - (Optional) If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version. - Structure is [documented below](#nested_template_volumes_volumes_secret_items). + Structure is [documented below](#nested_template_volumes_secret_items). -The `items` block supports: +The `items` block supports: * `path` - (Required) @@ -1065,13 +1044,13 @@ When the field is set to false, deleting the WorkerPool is allowed. (Optional) Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. -The `cloud_sql_instance` block supports: +The `cloud_sql_instance` block supports: * `instances` - (Optional) The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance} -The `empty_dir` block supports: +The `empty_dir` block supports: * `medium` - (Optional) @@ -1083,7 +1062,7 @@ When the field is set to false, deleting the WorkerPool is allowed. (Optional) Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. This field's values are of the 'Quantity' k8s type: https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -1098,7 +1077,7 @@ When the field is set to false, deleting the WorkerPool is allowed. A list of flags to pass to the gcsfuse command for configuring this volume. Flags should be passed without leading dashes. -The `nfs` block supports: +The `nfs` block supports: * `server` - (Required) diff --git a/website/docs/r/cloud_security_compliance_cloud_control.html.markdown b/website/docs/r/cloud_security_compliance_cloud_control.html.markdown index b3b26b50c65..0835486c829 100644 --- a/website/docs/r/cloud_security_compliance_cloud_control.html.markdown +++ b/website/docs/r/cloud_security_compliance_cloud_control.html.markdown @@ -256,7 +256,7 @@ The following arguments are supported: * `default_value` - (Optional) Possible parameter value types. - Structure is [documented below](#nested_parameter_spec_parameter_spec_default_value). + Structure is [documented below](#nested_parameter_spec_default_value). * `description` - (Optional) @@ -277,17 +277,17 @@ The following arguments are supported: * `substitution_rules` - (Optional) List of parameter substitutions. - Structure is [documented below](#nested_parameter_spec_parameter_spec_substitution_rules). + Structure is [documented below](#nested_parameter_spec_substitution_rules). * `sub_parameters` - (Optional) The parameter spec of the cloud control. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters). + Structure is [documented below](#nested_parameter_spec_sub_parameters). * `validation` - (Optional) Validation of the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation). + Structure is [documented below](#nested_parameter_spec_validation). * `value_type` - (Required) @@ -300,7 +300,7 @@ The following arguments are supported: ONEOF -The `default_value` block supports: +The `default_value` block supports: * `bool_value` - (Optional) @@ -313,19 +313,19 @@ The following arguments are supported: * `oneof_value` - (Optional) Sub-parameter values. - Structure is [documented below](#nested_parameter_spec_parameter_spec_default_value_oneof_value). + Structure is [documented below](#nested_parameter_spec_default_value_oneof_value). * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_default_value_string_list_value). + Structure is [documented below](#nested_parameter_spec_default_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `oneof_value` block supports: +The `oneof_value` block supports: * `name` - (Optional) @@ -334,10 +334,10 @@ The following arguments are supported: * `parameter_value` - (Optional) The value of the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_default_value_oneof_value_parameter_value). + Structure is [documented below](#nested_parameter_spec_default_value_oneof_value_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -350,57 +350,57 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_default_value_oneof_value_parameter_value_string_list_value). + Structure is [documented below](#nested_parameter_spec_default_value_oneof_value_parameter_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `substitution_rules` block supports: +The `substitution_rules` block supports: * `attribute_substitution_rule` - (Optional) Attribute at the given path is substituted entirely. - Structure is [documented below](#nested_parameter_spec_parameter_spec_substitution_rules_substitution_rules_attribute_substitution_rule). + Structure is [documented below](#nested_parameter_spec_substitution_rules_attribute_substitution_rule). * `placeholder_substitution_rule` - (Optional) Placeholder is substituted in the rendered string. - Structure is [documented below](#nested_parameter_spec_parameter_spec_substitution_rules_substitution_rules_placeholder_substitution_rule). + Structure is [documented below](#nested_parameter_spec_substitution_rules_placeholder_substitution_rule). -The `attribute_substitution_rule` block supports: +The `attribute_substitution_rule` block supports: * `attribute` - (Optional) Fully qualified proto attribute path (in dot notation). Example: rules[0].cel_expression.resource_types_values -The `placeholder_substitution_rule` block supports: +The `placeholder_substitution_rule` block supports: * `attribute` - (Optional) Fully qualified proto attribute path (e.g., dot notation) -The `sub_parameters` block supports: +The `sub_parameters` block supports: * `default_value` - (Optional) Possible parameter value types. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_default_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_default_value). * `description` - (Optional) @@ -421,12 +421,12 @@ The following arguments are supported: * `substitution_rules` - (Optional) List of parameter substitutions. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_substitution_rules). + Structure is [documented below](#nested_parameter_spec_sub_parameters_substitution_rules). * `validation` - (Optional) Validation of the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation). * `value_type` - (Required) @@ -439,7 +439,7 @@ The following arguments are supported: ONEOF -The `default_value` block supports: +The `default_value` block supports: * `bool_value` - (Optional) @@ -452,19 +452,19 @@ The following arguments are supported: * `oneof_value` - (Optional) Sub-parameter values. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_default_value_oneof_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_default_value_oneof_value). * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_default_value_string_list_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_default_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `oneof_value` block supports: +The `oneof_value` block supports: * `name` - (Optional) @@ -473,10 +473,10 @@ The following arguments are supported: * `parameter_value` - (Optional) The value of the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_default_value_oneof_value_parameter_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_default_value_oneof_value_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -489,78 +489,78 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_default_value_oneof_value_parameter_value_string_list_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_default_value_oneof_value_parameter_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `substitution_rules` block supports: +The `substitution_rules` block supports: * `attribute_substitution_rule` - (Optional) Attribute at the given path is substituted entirely. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_substitution_rules_substitution_rules_attribute_substitution_rule). + Structure is [documented below](#nested_parameter_spec_sub_parameters_substitution_rules_attribute_substitution_rule). * `placeholder_substitution_rule` - (Optional) Placeholder is substituted in the rendered string. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_substitution_rules_substitution_rules_placeholder_substitution_rule). + Structure is [documented below](#nested_parameter_spec_sub_parameters_substitution_rules_placeholder_substitution_rule). -The `attribute_substitution_rule` block supports: +The `attribute_substitution_rule` block supports: * `attribute` - (Optional) Fully qualified proto attribute path (in dot notation). Example: rules[0].cel_expression.resource_types_values -The `placeholder_substitution_rule` block supports: +The `placeholder_substitution_rule` block supports: * `attribute` - (Optional) Fully qualified proto attribute path (e.g., dot notation) -The `validation` block supports: +The `validation` block supports: * `allowed_values` - (Optional) Allowed set of values for the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_allowed_values). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_allowed_values). * `int_range` - (Optional) Number range for number parameters. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_int_range). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_int_range). * `regexp_pattern` - (Optional) Regular Expression Validator for parameter values. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_regexp_pattern). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_regexp_pattern). -The `allowed_values` block supports: +The `allowed_values` block supports: * `values` - (Required) List of allowed values for the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_allowed_values_values). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_allowed_values_values). -The `values` block supports: +The `values` block supports: * `bool_value` - (Optional) @@ -573,19 +573,19 @@ The following arguments are supported: * `oneof_value` - (Optional) Sub-parameter values. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_allowed_values_values_values_oneof_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_allowed_values_values_oneof_value). * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_allowed_values_values_values_string_list_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_allowed_values_values_string_list_value). * `string_value` - (Optional) Represents a string value. -The `oneof_value` block supports: +The `oneof_value` block supports: * `name` - (Optional) @@ -594,10 +594,10 @@ The following arguments are supported: * `parameter_value` - (Optional) The value of the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_allowed_values_values_values_oneof_value_parameter_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_allowed_values_values_oneof_value_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -610,26 +610,26 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_sub_parameters_sub_parameters_validation_allowed_values_values_values_oneof_value_parameter_value_string_list_value). + Structure is [documented below](#nested_parameter_spec_sub_parameters_validation_allowed_values_values_oneof_value_parameter_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `int_range` block supports: +The `int_range` block supports: * `max` - (Required) @@ -639,39 +639,39 @@ The following arguments are supported: (Required) Minimum allowed value for the numeric parameter (inclusive). -The `regexp_pattern` block supports: +The `regexp_pattern` block supports: * `pattern` - (Required) Regex Pattern to match the value(s) of parameter. -The `validation` block supports: +The `validation` block supports: * `allowed_values` - (Optional) Allowed set of values for the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_allowed_values). + Structure is [documented below](#nested_parameter_spec_validation_allowed_values). * `int_range` - (Optional) Number range for number parameters. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_int_range). + Structure is [documented below](#nested_parameter_spec_validation_int_range). * `regexp_pattern` - (Optional) Regular Expression Validator for parameter values. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_regexp_pattern). + Structure is [documented below](#nested_parameter_spec_validation_regexp_pattern). -The `allowed_values` block supports: +The `allowed_values` block supports: * `values` - (Required) List of allowed values for the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_allowed_values_values). + Structure is [documented below](#nested_parameter_spec_validation_allowed_values_values). -The `values` block supports: +The `values` block supports: * `bool_value` - (Optional) @@ -684,19 +684,19 @@ The following arguments are supported: * `oneof_value` - (Optional) Sub-parameter values. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_allowed_values_values_values_oneof_value). + Structure is [documented below](#nested_parameter_spec_validation_allowed_values_values_oneof_value). * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_allowed_values_values_values_string_list_value). + Structure is [documented below](#nested_parameter_spec_validation_allowed_values_values_string_list_value). * `string_value` - (Optional) Represents a string value. -The `oneof_value` block supports: +The `oneof_value` block supports: * `name` - (Optional) @@ -705,10 +705,10 @@ The following arguments are supported: * `parameter_value` - (Optional) The value of the parameter. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_allowed_values_values_values_oneof_value_parameter_value). + Structure is [documented below](#nested_parameter_spec_validation_allowed_values_values_oneof_value_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -721,26 +721,26 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_parameter_spec_parameter_spec_validation_allowed_values_values_values_oneof_value_parameter_value_string_list_value). + Structure is [documented below](#nested_parameter_spec_validation_allowed_values_values_oneof_value_parameter_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `int_range` block supports: +The `int_range` block supports: * `max` - (Required) @@ -750,7 +750,7 @@ The following arguments are supported: (Required) Minimum allowed value for the numeric parameter (inclusive). -The `regexp_pattern` block supports: +The `regexp_pattern` block supports: * `pattern` - (Required) @@ -762,7 +762,7 @@ The following arguments are supported: (Optional) A [CEL expression](https://cloud.google.com/certificate-authority-service/docs/using-cel). - Structure is [documented below](#nested_rules_rules_cel_expression). + Structure is [documented below](#nested_rules_cel_expression). * `description` - (Optional) @@ -773,7 +773,7 @@ The following arguments are supported: The functionality enabled by the Rule. -The `cel_expression` block supports: +The `cel_expression` block supports: * `expression` - (Required) @@ -783,10 +783,10 @@ The following arguments are supported: * `resource_types_values` - (Optional) A list of strings. - Structure is [documented below](#nested_rules_rules_cel_expression_resource_types_values). + Structure is [documented below](#nested_rules_cel_expression_resource_types_values). -The `resource_types_values` block supports: +The `resource_types_values` block supports: * `values` - (Required) diff --git a/website/docs/r/cloud_security_compliance_framework.html.markdown b/website/docs/r/cloud_security_compliance_framework.html.markdown index f31e1203923..566bd1a6f0c 100644 --- a/website/docs/r/cloud_security_compliance_framework.html.markdown +++ b/website/docs/r/cloud_security_compliance_framework.html.markdown @@ -146,10 +146,10 @@ The following arguments are supported: Parameters is a key-value pair that is required by the CloudControl. The specification of these parameters will be present in cloudcontrol.Eg: { "name": "location","value": "us-west-1"}. - Structure is [documented below](#nested_cloud_control_details_cloud_control_details_parameters). + Structure is [documented below](#nested_cloud_control_details_parameters). -The `parameters` block supports: +The `parameters` block supports: * `name` - (Required) @@ -158,10 +158,10 @@ The following arguments are supported: * `parameter_value` - (Required) Possible parameter value types. - Structure is [documented below](#nested_cloud_control_details_cloud_control_details_parameters_parameters_parameter_value). + Structure is [documented below](#nested_cloud_control_details_parameters_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -174,7 +174,7 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_cloud_control_details_cloud_control_details_parameters_parameters_parameter_value_string_list_value). + Structure is [documented below](#nested_cloud_control_details_parameters_parameter_value_string_list_value). * `string_value` - (Optional) @@ -183,16 +183,16 @@ The following arguments are supported: * `oneof_value` - (Optional) Sub-parameter values. - Structure is [documented below](#nested_cloud_control_details_cloud_control_details_parameters_parameters_parameter_value_oneof_value). + Structure is [documented below](#nested_cloud_control_details_parameters_parameter_value_oneof_value). -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `oneof_value` block supports: +The `oneof_value` block supports: * `name` - (Optional) @@ -201,10 +201,10 @@ The following arguments are supported: * `parameter_value` - (Optional) The value of the parameter. - Structure is [documented below](#nested_cloud_control_details_cloud_control_details_parameters_parameters_parameter_value_oneof_value_parameter_value). + Structure is [documented below](#nested_cloud_control_details_parameters_parameter_value_oneof_value_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -217,14 +217,14 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_cloud_control_details_cloud_control_details_parameters_parameters_parameter_value_oneof_value_parameter_value_string_list_value). + Structure is [documented below](#nested_cloud_control_details_parameters_parameter_value_oneof_value_parameter_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) diff --git a/website/docs/r/cloud_security_compliance_framework_deployment.html.markdown b/website/docs/r/cloud_security_compliance_framework_deployment.html.markdown index 4bb48437fc9..8b9bf9c1501 100644 --- a/website/docs/r/cloud_security_compliance_framework_deployment.html.markdown +++ b/website/docs/r/cloud_security_compliance_framework_deployment.html.markdown @@ -399,7 +399,7 @@ The following arguments are supported: * `cloud_control_details` - (Required) CloudControlDetails contains the details of a CloudControl. - Structure is [documented below](#nested_cloud_control_metadata_cloud_control_metadata_cloud_control_details). + Structure is [documented below](#nested_cloud_control_metadata_cloud_control_details). * `enforcement_mode` - (Required) @@ -410,7 +410,7 @@ The following arguments are supported: AUDIT -The `cloud_control_details` block supports: +The `cloud_control_details` block supports: * `major_revision_id` - (Required) @@ -427,10 +427,10 @@ The following arguments are supported: Parameters is a key-value pair that is required by the CloudControl. The specification of these parameters will be present in cloudcontrol.Eg: { "name": "location","value": "us-west-1"}. - Structure is [documented below](#nested_cloud_control_metadata_cloud_control_metadata_cloud_control_details_parameters). + Structure is [documented below](#nested_cloud_control_metadata_cloud_control_details_parameters). -The `parameters` block supports: +The `parameters` block supports: * `name` - (Required) @@ -439,10 +439,10 @@ The following arguments are supported: * `parameter_value` - (Required) Possible parameter value types. - Structure is [documented below](#nested_cloud_control_metadata_cloud_control_metadata_cloud_control_details_parameters_parameters_parameter_value). + Structure is [documented below](#nested_cloud_control_metadata_cloud_control_details_parameters_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -455,7 +455,7 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_cloud_control_metadata_cloud_control_metadata_cloud_control_details_parameters_parameters_parameter_value_string_list_value). + Structure is [documented below](#nested_cloud_control_metadata_cloud_control_details_parameters_parameter_value_string_list_value). * `string_value` - (Optional) @@ -464,16 +464,16 @@ The following arguments are supported: * `oneof_value` - (Optional) Sub-parameter values. - Structure is [documented below](#nested_cloud_control_metadata_cloud_control_metadata_cloud_control_details_parameters_parameters_parameter_value_oneof_value). + Structure is [documented below](#nested_cloud_control_metadata_cloud_control_details_parameters_parameter_value_oneof_value). -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) The strings in the list. -The `oneof_value` block supports: +The `oneof_value` block supports: * `name` - (Optional) @@ -482,10 +482,10 @@ The following arguments are supported: * `parameter_value` - (Optional) The value of the parameter. - Structure is [documented below](#nested_cloud_control_metadata_cloud_control_metadata_cloud_control_details_parameters_parameters_parameter_value_oneof_value_parameter_value). + Structure is [documented below](#nested_cloud_control_metadata_cloud_control_details_parameters_parameter_value_oneof_value_parameter_value). -The `parameter_value` block supports: +The `parameter_value` block supports: * `bool_value` - (Optional) @@ -498,14 +498,14 @@ The following arguments are supported: * `string_list_value` - (Optional) A list of strings. - Structure is [documented below](#nested_cloud_control_metadata_cloud_control_metadata_cloud_control_details_parameters_parameters_parameter_value_oneof_value_parameter_value_string_list_value). + Structure is [documented below](#nested_cloud_control_metadata_cloud_control_details_parameters_parameter_value_oneof_value_parameter_value_string_list_value). * `string_value` - (Optional) Represents a string value. -The `string_list_value` block supports: +The `string_list_value` block supports: * `values` - (Required) diff --git a/website/docs/r/cloud_tasks_queue.html.markdown b/website/docs/r/cloud_tasks_queue.html.markdown index 35f753554e9..8fb4b290afa 100644 --- a/website/docs/r/cloud_tasks_queue.html.markdown +++ b/website/docs/r/cloud_tasks_queue.html.markdown @@ -428,10 +428,10 @@ The following arguments are supported: * `header` - (Required) Header embodying a key and a value. - Structure is [documented below](#nested_http_target_header_overrides_header_overrides_header). + Structure is [documented below](#nested_http_target_header_overrides_header). -The `header` block supports: +The `header` block supports: * `key` - (Required) diff --git a/website/docs/r/cloudbuild_trigger.html.markdown b/website/docs/r/cloudbuild_trigger.html.markdown index 6c73bca823e..e6b44da0ade 100644 --- a/website/docs/r/cloudbuild_trigger.html.markdown +++ b/website/docs/r/cloudbuild_trigger.html.markdown @@ -1517,7 +1517,7 @@ The following arguments are supported: are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. - Structure is [documented below](#nested_build_step_step_volumes). + Structure is [documented below](#nested_build_step_volumes). * `wait_for` - (Optional) @@ -1547,7 +1547,7 @@ The following arguments are supported: If `allowFailure` is also specified, this field will take precedence. -The `volumes` block supports: +The `volumes` block supports: * `name` - (Required) diff --git a/website/docs/r/clouddeploy_automation.html.markdown b/website/docs/r/clouddeploy_automation.html.markdown index 3bc04ce4e47..2e88d95d022 100644 --- a/website/docs/r/clouddeploy_automation.html.markdown +++ b/website/docs/r/clouddeploy_automation.html.markdown @@ -253,25 +253,25 @@ The following arguments are supported: * `promote_release_rule` - (Optional) Optional. `PromoteReleaseRule` will automatically promote a release from the current target to a specified target. - Structure is [documented below](#nested_rules_rules_promote_release_rule). + Structure is [documented below](#nested_rules_promote_release_rule). * `advance_rollout_rule` - (Optional) Optional. The `AdvanceRolloutRule` will automatically advance a successful Rollout. - Structure is [documented below](#nested_rules_rules_advance_rollout_rule). + Structure is [documented below](#nested_rules_advance_rollout_rule). * `repair_rollout_rule` - (Optional) Optional. The RepairRolloutRule will automatically repair a failed rollout. - Structure is [documented below](#nested_rules_rules_repair_rollout_rule). + Structure is [documented below](#nested_rules_repair_rollout_rule). * `timed_promote_release_rule` - (Optional) Optional. The `TimedPromoteReleaseRule` will automatically promote a release from the current target(s) to the specified target(s) on a configured schedule. - Structure is [documented below](#nested_rules_rules_timed_promote_release_rule). + Structure is [documented below](#nested_rules_timed_promote_release_rule). -The `promote_release_rule` block supports: +The `promote_release_rule` block supports: * `id` - (Required) @@ -289,7 +289,7 @@ The following arguments are supported: (Optional) Optional. The starting phase of the rollout created by this operation. Default to the first phase. -The `advance_rollout_rule` block supports: +The `advance_rollout_rule` block supports: * `id` - (Required) @@ -303,7 +303,7 @@ The following arguments are supported: (Optional) Optional. Proceeds only after phase name matched any one in the list. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. -The `repair_rollout_rule` block supports: +The `repair_rollout_rule` block supports: * `id` - (Required) @@ -320,23 +320,23 @@ The following arguments are supported: * `repair_phases` - (Optional) Optional. Proceeds only after phase name matched any one in the list. This value must consist of lower-case letters, numbers, and hyphens, start with a letter and end with a letter or a number, and have a max length of 63 characters. In other words, it must match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - Structure is [documented below](#nested_rules_rules_repair_rollout_rule_repair_phases). + Structure is [documented below](#nested_rules_repair_rollout_rule_repair_phases). -The `repair_phases` block supports: +The `repair_phases` block supports: * `retry` - (Optional) Optional. Retries a failed job. - Structure is [documented below](#nested_rules_rules_repair_rollout_rule_repair_phases_repair_phases_retry). + Structure is [documented below](#nested_rules_repair_rollout_rule_repair_phases_retry). * `rollback` - (Optional) Optional. Rolls back a Rollout. - Structure is [documented below](#nested_rules_rules_repair_rollout_rule_repair_phases_repair_phases_rollback). + Structure is [documented below](#nested_rules_repair_rollout_rule_repair_phases_rollback). -The `retry` block supports: +The `retry` block supports: * `attempts` - (Required) @@ -351,7 +351,7 @@ The following arguments are supported: Optional. The pattern of how wait time will be increased. Default is linear. Backoff mode will be ignored if wait is 0. Possible values are: `BACKOFF_MODE_UNSPECIFIED`, `BACKOFF_MODE_LINEAR`, `BACKOFF_MODE_EXPONENTIAL`. -The `rollback` block supports: +The `rollback` block supports: * `destination_phase` - (Optional) @@ -361,7 +361,7 @@ The following arguments are supported: (Optional) Optional. If pending rollout exists on the target, the rollback operation will be aborted. -The `timed_promote_release_rule` block supports: +The `timed_promote_release_rule` block supports: * `id` - (Required) diff --git a/website/docs/r/clouddeploy_custom_target_type.html.markdown b/website/docs/r/clouddeploy_custom_target_type.html.markdown index 73c6bb7115e..d265ef476b8 100644 --- a/website/docs/r/clouddeploy_custom_target_type.html.markdown +++ b/website/docs/r/clouddeploy_custom_target_type.html.markdown @@ -205,20 +205,20 @@ The following arguments are supported: * `git` - (Optional) Remote git repository containing the Skaffold Config modules. - Structure is [documented below](#nested_custom_actions_include_skaffold_modules_include_skaffold_modules_git). + Structure is [documented below](#nested_custom_actions_include_skaffold_modules_git). * `google_cloud_storage` - (Optional) Cloud Storage bucket containing Skaffold Config modules. - Structure is [documented below](#nested_custom_actions_include_skaffold_modules_include_skaffold_modules_google_cloud_storage). + Structure is [documented below](#nested_custom_actions_include_skaffold_modules_google_cloud_storage). * `google_cloud_build_repo` - (Optional) Cloud Build 2nd gen repository containing the Skaffold Config modules. - Structure is [documented below](#nested_custom_actions_include_skaffold_modules_include_skaffold_modules_google_cloud_build_repo). + Structure is [documented below](#nested_custom_actions_include_skaffold_modules_google_cloud_build_repo). -The `git` block supports: +The `git` block supports: * `repo` - (Required) @@ -232,7 +232,7 @@ The following arguments are supported: (Optional) Git ref the package should be cloned from. -The `google_cloud_storage` block supports: +The `google_cloud_storage` block supports: * `source` - (Required) @@ -242,7 +242,7 @@ The following arguments are supported: (Optional) Relative path from the source to the Skaffold file. -The `google_cloud_build_repo` block supports: +The `google_cloud_build_repo` block supports: * `repository` - (Required) diff --git a/website/docs/r/clouddeploy_deploy_policy.html.markdown b/website/docs/r/clouddeploy_deploy_policy.html.markdown index b5e5c0235fc..44a76199dab 100644 --- a/website/docs/r/clouddeploy_deploy_policy.html.markdown +++ b/website/docs/r/clouddeploy_deploy_policy.html.markdown @@ -224,15 +224,15 @@ The following arguments are supported: * `target` - (Optional) Contains attributes about a target. - Structure is [documented below](#nested_selectors_selectors_target). + Structure is [documented below](#nested_selectors_target). * `delivery_pipeline` - (Optional) Contains attributes about a delivery pipeline. - Structure is [documented below](#nested_selectors_selectors_delivery_pipeline). + Structure is [documented below](#nested_selectors_delivery_pipeline). -The `target` block supports: +The `target` block supports: * `id` - (Optional) @@ -242,7 +242,7 @@ The following arguments are supported: (Optional) Target labels. -The `delivery_pipeline` block supports: +The `delivery_pipeline` block supports: * `id` - (Optional) @@ -259,10 +259,10 @@ The following arguments are supported: * `rollout_restriction` - (Optional) Rollout restrictions. - Structure is [documented below](#nested_rules_rules_rollout_restriction). + Structure is [documented below](#nested_rules_rollout_restriction). -The `rollout_restriction` block supports: +The `rollout_restriction` block supports: * `id` - (Required) @@ -281,10 +281,10 @@ The following arguments are supported: * `time_windows` - (Optional) Time window within which actions are restricted. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows). -The `time_windows` block supports: +The `time_windows` block supports: * `time_zone` - (Required) @@ -293,38 +293,38 @@ The following arguments are supported: * `one_time_windows` - (Optional) One-time windows within which actions are restricted. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_one_time_windows). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_one_time_windows). * `weekly_windows` - (Optional) Recurring weekly windows within which actions are restricted. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_weekly_windows). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_weekly_windows). -The `one_time_windows` block supports: +The `one_time_windows` block supports: * `start_date` - (Required) Start date. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_one_time_windows_one_time_windows_start_date). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_one_time_windows_start_date). * `end_date` - (Required) End date. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_one_time_windows_one_time_windows_end_date). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_one_time_windows_end_date). * `start_time` - (Required) Start time (inclusive). Use 00:00 for the beginning of the day. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_one_time_windows_one_time_windows_start_time). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_one_time_windows_start_time). * `end_time` - (Required) End time (exclusive). You may use 24:00 for the end of the day. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_one_time_windows_one_time_windows_end_time). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_one_time_windows_end_time). -The `start_date` block supports: +The `start_date` block supports: * `year` - (Optional) @@ -338,7 +338,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `end_date` block supports: +The `end_date` block supports: * `year` - (Optional) @@ -352,7 +352,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month. -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Optional) @@ -370,7 +370,7 @@ The following arguments are supported: (Optional) Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. -The `end_time` block supports: +The `end_time` block supports: * `hours` - (Optional) @@ -388,7 +388,7 @@ The following arguments are supported: (Optional) Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. -The `weekly_windows` block supports: +The `weekly_windows` block supports: * `days_of_week` - (Optional) @@ -398,15 +398,15 @@ The following arguments are supported: * `start_time` - (Optional) Start time (inclusive). Use 00:00 for the beginning of the day. If you specify startTime you must also specify endTime. If left empty, this will block for the entire day for the days specified in daysOfWeek. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_weekly_windows_weekly_windows_start_time). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_weekly_windows_start_time). * `end_time` - (Optional) End time (exclusive). Use 24:00 to indicate midnight. If you specify endTime you must also specify startTime. If left empty, this will block for the entire day for the days specified in daysOfWeek. - Structure is [documented below](#nested_rules_rules_rollout_restriction_time_windows_weekly_windows_weekly_windows_end_time). + Structure is [documented below](#nested_rules_rollout_restriction_time_windows_weekly_windows_end_time). -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Optional) @@ -424,7 +424,7 @@ The following arguments are supported: (Optional) Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. -The `end_time` block supports: +The `end_time` block supports: * `hours` - (Optional) diff --git a/website/docs/r/cloudfunctions2_function.html.markdown b/website/docs/r/cloudfunctions2_function.html.markdown index 4dad4881e9b..3660a7d4ca2 100644 --- a/website/docs/r/cloudfunctions2_function.html.markdown +++ b/website/docs/r/cloudfunctions2_function.html.markdown @@ -1359,10 +1359,10 @@ The following arguments are supported: * `versions` - (Optional) List of secret versions to mount for this secret. If empty, the latest version of the secret will be made available in a file named after the secret under the mount point.' - Structure is [documented below](#nested_service_config_secret_volumes_secret_volumes_versions). + Structure is [documented below](#nested_service_config_secret_volumes_versions). -The `versions` block supports: +The `versions` block supports: * `version` - (Required) diff --git a/website/docs/r/colab_runtime_template.html.markdown b/website/docs/r/colab_runtime_template.html.markdown index 97c0755bb51..9518a931471 100644 --- a/website/docs/r/colab_runtime_template.html.markdown +++ b/website/docs/r/colab_runtime_template.html.markdown @@ -142,6 +142,19 @@ resource "google_colab_runtime_template" "runtime-template" { encryption_spec { kms_key_name = "my-crypto-key" } + + software_config { + env { + name = "TEST" + value = 1 + } + + post_startup_script_config { + post_startup_script = "echo 'hello world'" + post_startup_script_url = "gs://colab-enterprise-pss-secure/secure_pss.sh" + post_startup_script_behavior = "RUN_ONCE" + } + } } ``` @@ -291,6 +304,11 @@ The following arguments are supported: Environment variables to be passed to the container. Structure is [documented below](#nested_software_config_env). +* `post_startup_script_config` - + (Optional) + Post startup script config. + Structure is [documented below](#nested_software_config_post_startup_script_config). + The `env` block supports: @@ -302,6 +320,21 @@ The following arguments are supported: (Optional) Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. +The `post_startup_script_config` block supports: + +* `post_startup_script` - + (Optional) + Post startup script to run after runtime is started. + +* `post_startup_script_url` - + (Optional) + Post startup script url to download. Example: https://bucket/script.sh. + +* `post_startup_script_behavior` - + (Optional) + Post startup script behavior that defines download and execution behavior. + Possible values are: `RUN_ONCE`, `RUN_EVERY_START`, `DOWNLOAD_AND_RUN_EVERY_START`. + ## Attributes Reference In addition to the arguments listed above, the following computed attributes are exported: diff --git a/website/docs/r/compute_backend_service.html.markdown b/website/docs/r/compute_backend_service.html.markdown index ba5d9248ce1..8f9ed95d25d 100644 --- a/website/docs/r/compute_backend_service.html.markdown +++ b/website/docs/r/compute_backend_service.html.markdown @@ -1183,10 +1183,10 @@ The following arguments are supported: * `custom_metrics` - (Optional) The set of custom metrics that are used for CUSTOM_METRICS BalancingMode. - Structure is [documented below](#nested_backend_backend_custom_metrics). + Structure is [documented below](#nested_backend_custom_metrics). -The `custom_metrics` block supports: +The `custom_metrics` block supports: * `name` - (Required) @@ -1465,16 +1465,16 @@ The following arguments are supported: * `policy` - (Optional) The configuration for a built-in load balancing policy. - Structure is [documented below](#nested_locality_lb_policies_locality_lb_policies_policy). + Structure is [documented below](#nested_locality_lb_policies_policy). * `custom_policy` - (Optional) The configuration for a custom policy implemented by the user and deployed with the client. - Structure is [documented below](#nested_locality_lb_policies_locality_lb_policies_custom_policy). + Structure is [documented below](#nested_locality_lb_policies_custom_policy). -The `policy` block supports: +The `policy` block supports: * `name` - (Required) @@ -1506,7 +1506,7 @@ The following arguments are supported: Maglev, refer to https://ai.google/research/pubs/pub44824 Possible values are: `ROUND_ROBIN`, `LEAST_REQUEST`, `RING_HASH`, `RANDOM`, `ORIGINAL_DESTINATION`, `MAGLEV`. -The `custom_policy` block supports: +The `custom_policy` block supports: * `name` - (Required) diff --git a/website/docs/r/compute_cross_site_network.html.markdown b/website/docs/r/compute_cross_site_network.html.markdown index 09b62ae87b6..4235d02b546 100644 --- a/website/docs/r/compute_cross_site_network.html.markdown +++ b/website/docs/r/compute_cross_site_network.html.markdown @@ -23,12 +23,10 @@ description: |- Represents a cross-site-network resource. A CrossSiteNetwork is used to establish L2 connectivity between groups of Interconnects. -~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. -See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. To get more information about CrossSiteNetwork, see: -* [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/crossSiteNetworks) +* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/crossSiteNetworks) * How-to Guides * [Create a Cross-Site Interconnect](https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cross-site/create-network) @@ -37,13 +35,11 @@ To get more information about CrossSiteNetwork, see: ```hcl data "google_project" "project" { - provider = google-beta } resource "google_compute_cross_site_network" "example-cross-site-network" { name = "test-cross-site-network" description = "Example cross site network" - provider = google-beta } ``` diff --git a/website/docs/r/compute_firewall_policy_with_rules.html.markdown b/website/docs/r/compute_firewall_policy_with_rules.html.markdown index cac8b70c3ef..f79fc23e7c2 100644 --- a/website/docs/r/compute_firewall_policy_with_rules.html.markdown +++ b/website/docs/r/compute_firewall_policy_with_rules.html.markdown @@ -221,7 +221,7 @@ The following arguments are supported: * `match` - (Required) A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. - Structure is [documented below](#nested_rule_rule_match). + Structure is [documented below](#nested_rule_match). * `target_secure_tag` - (Optional) @@ -236,7 +236,7 @@ The following arguments are supported: targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target secure tags allowed is 256. - Structure is [documented below](#nested_rule_rule_target_secure_tag). + Structure is [documented below](#nested_rule_target_secure_tag). * `action` - (Required) @@ -286,7 +286,7 @@ The following arguments are supported: enabled. -The `match` block supports: +The `match` block supports: * `src_ip_ranges` - (Optional) @@ -363,15 +363,15 @@ The following arguments are supported: For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. - Structure is [documented below](#nested_rule_rule_match_src_secure_tag). + Structure is [documented below](#nested_rule_match_src_secure_tag). * `layer4_config` - (Required) Pairs of IP protocols and ports that the rule should match. - Structure is [documented below](#nested_rule_rule_match_layer4_config). + Structure is [documented below](#nested_rule_match_layer4_config). -The `src_secure_tag` block supports: +The `src_secure_tag` block supports: * `name` - (Optional) @@ -384,7 +384,7 @@ The following arguments are supported: `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. -The `layer4_config` block supports: +The `layer4_config` block supports: * `ip_protocol` - (Required) @@ -403,7 +403,7 @@ The following arguments are supported: Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. -The `target_secure_tag` block supports: +The `target_secure_tag` block supports: * `name` - (Optional) @@ -465,7 +465,7 @@ In addition to the arguments listed above, the following computed attributes are * `match` - (Output) A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match). + Structure is [documented below](#nested_predefined_rules_match). * `target_secure_tag` - (Output) @@ -480,7 +480,7 @@ In addition to the arguments listed above, the following computed attributes are targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target secure tags allowed is 256. - Structure is [documented below](#nested_predefined_rules_predefined_rules_target_secure_tag). + Structure is [documented below](#nested_predefined_rules_target_secure_tag). * `action` - (Output) @@ -529,7 +529,7 @@ In addition to the arguments listed above, the following computed attributes are enabled. -The `match` block contains: +The `match` block contains: * `src_ip_ranges` - (Output) @@ -588,7 +588,7 @@ In addition to the arguments listed above, the following computed attributes are * `layer4_config` - (Output) Pairs of IP protocols and ports that the rule should match. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match_layer4_config). + Structure is [documented below](#nested_predefined_rules_match_layer4_config). * `src_secure_tag` - (Output) @@ -597,10 +597,10 @@ In addition to the arguments listed above, the following computed attributes are For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match_src_secure_tag). + Structure is [documented below](#nested_predefined_rules_match_src_secure_tag). -The `layer4_config` block contains: +The `layer4_config` block contains: * `ip_protocol` - (Output) @@ -619,7 +619,7 @@ In addition to the arguments listed above, the following computed attributes are Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. -The `src_secure_tag` block contains: +The `src_secure_tag` block contains: * `name` - (Output) @@ -632,7 +632,7 @@ In addition to the arguments listed above, the following computed attributes are `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. -The `target_secure_tag` block contains: +The `target_secure_tag` block contains: * `name` - (Output) diff --git a/website/docs/r/compute_future_reservation.html.markdown b/website/docs/r/compute_future_reservation.html.markdown index 906d0543b29..f46676bf108 100644 --- a/website/docs/r/compute_future_reservation.html.markdown +++ b/website/docs/r/compute_future_reservation.html.markdown @@ -364,10 +364,10 @@ The following arguments are supported: * `accelerator` - (Optional) Properties of accelerator resources in this reservation. - Structure is [documented below](#nested_aggregate_reservation_reserved_resources_reserved_resources_accelerator). + Structure is [documented below](#nested_aggregate_reservation_reserved_resources_accelerator). -The `accelerator` block supports: +The `accelerator` block supports: * `accelerator_count` - (Optional) diff --git a/website/docs/r/compute_global_forwarding_rule.html.markdown b/website/docs/r/compute_global_forwarding_rule.html.markdown index 38313796370..3b8902dae91 100644 --- a/website/docs/r/compute_global_forwarding_rule.html.markdown +++ b/website/docs/r/compute_global_forwarding_rule.html.markdown @@ -1424,10 +1424,10 @@ The following arguments are supported: The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. - Structure is [documented below](#nested_metadata_filters_metadata_filters_filter_labels). + Structure is [documented below](#nested_metadata_filters_filter_labels). -The `filter_labels` block supports: +The `filter_labels` block supports: * `name` - (Required) diff --git a/website/docs/r/compute_interconnect.html.markdown b/website/docs/r/compute_interconnect.html.markdown index d17ecf02d04..2fab2ec4062 100644 --- a/website/docs/r/compute_interconnect.html.markdown +++ b/website/docs/r/compute_interconnect.html.markdown @@ -346,7 +346,6 @@ In addition to the arguments listed above, the following computed attributes are ports and MACsec isn't supported and enabling MACsec fails). * `wire_groups` - - ([Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) A list of the URLs of all CrossSiteNetwork WireGroups configured to use this Interconnect. The Interconnect cannot be deleted if this list is non-empty. * `interconnect_groups` - diff --git a/website/docs/r/compute_interconnect_attachment.html.markdown b/website/docs/r/compute_interconnect_attachment.html.markdown index b996fc733b0..3b5636e567a 100644 --- a/website/docs/r/compute_interconnect_attachment.html.markdown +++ b/website/docs/r/compute_interconnect_attachment.html.markdown @@ -126,7 +126,6 @@ resource "google_compute_interconnect_attachment" "custom-ranges-interconnect-at candidate_customer_router_ip_address = "192.169.0.2/29" candidate_cloud_router_ipv6_address = "748d:2f23:6651:9455:828b:ca81:6fe0:fed1/125" candidate_customer_router_ipv6_address = "748d:2f23:6651:9455:828b:ca81:6fe0:fed2/125" - provider = google-beta } resource "google_compute_router" "foobar" { @@ -135,13 +134,11 @@ resource "google_compute_router" "foobar" { bgp { asn = 16550 } - provider = google-beta } resource "google_compute_network" "foobar" { name = "test-network" auto_create_subnetworks = false - provider = google-beta } ``` @@ -286,22 +283,22 @@ The following arguments are supported: Please refer to the field `effective_labels` for all of the labels present on the resource. * `candidate_cloud_router_ip_address` - - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + (Optional) Single IPv4 address + prefix length to be configured on the cloud router interface for this interconnect attachment. Example: 203.0.113.1/29 * `candidate_customer_router_ip_address` - - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + (Optional) Single IPv4 address + prefix length to be configured on the customer router interface for this interconnect attachment. Example: 203.0.113.2/29 * `candidate_cloud_router_ipv6_address` - - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + (Optional) Single IPv6 address + prefix length to be configured on the cloud router interface for this interconnect attachment. Example: 2001:db8::1/125 * `candidate_customer_router_ipv6_address` - - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + (Optional) Single IPv6 address + prefix length to be configured on the customer router interface for this interconnect attachment. Example: 2001:db8::2/125 diff --git a/website/docs/r/compute_interconnect_attachment_group.html.markdown b/website/docs/r/compute_interconnect_attachment_group.html.markdown index 5164fcc0731..1ce40f2ffc9 100644 --- a/website/docs/r/compute_interconnect_attachment_group.html.markdown +++ b/website/docs/r/compute_interconnect_attachment_group.html.markdown @@ -145,10 +145,10 @@ In addition to the arguments listed above, the following computed attributes are * `metros` - (Output) The metros of Attachments in this group in this region. - Structure is [documented below](#nested_logical_structure_regions_regions_metros). + Structure is [documented below](#nested_logical_structure_regions_metros). -The `metros` block contains: +The `metros` block contains: * `metro` - (Output) @@ -160,10 +160,10 @@ In addition to the arguments listed above, the following computed attributes are (Output) The facilities used for this group's Attachments' Interconnects. - Structure is [documented below](#nested_logical_structure_regions_regions_metros_metros_facilities). + Structure is [documented below](#nested_logical_structure_regions_metros_facilities). -The `facilities` block contains: +The `facilities` block contains: * `facility` - (Output) @@ -173,10 +173,10 @@ In addition to the arguments listed above, the following computed attributes are (Output) The zones that Interconnects in this facility are present in. - Structure is [documented below](#nested_logical_structure_regions_regions_metros_metros_facilities_facilities_zones). + Structure is [documented below](#nested_logical_structure_regions_metros_facilities_zones). -The `zones` block contains: +The `zones` block contains: * `zone` - (Output) diff --git a/website/docs/r/compute_interconnect_group.html.markdown b/website/docs/r/compute_interconnect_group.html.markdown index de58b355760..c0726b7b36b 100644 --- a/website/docs/r/compute_interconnect_group.html.markdown +++ b/website/docs/r/compute_interconnect_group.html.markdown @@ -145,10 +145,10 @@ In addition to the arguments listed above, the following computed attributes are (Output) The facilities Interconnects in this metro are present in. - Structure is [documented below](#nested_physical_structure_metros_metros_facilities). + Structure is [documented below](#nested_physical_structure_metros_facilities). -The `facilities` block contains: +The `facilities` block contains: * `facility` - (Output) @@ -160,10 +160,10 @@ In addition to the arguments listed above, the following computed attributes are (Output) The zones that Interconnects in this facility are present in. - Structure is [documented below](#nested_physical_structure_metros_metros_facilities_facilities_zones). + Structure is [documented below](#nested_physical_structure_metros_facilities_zones). -The `zones` block contains: +The `zones` block contains: * `zone` - (Output) diff --git a/website/docs/r/compute_network_firewall_policy_with_rules.html.markdown b/website/docs/r/compute_network_firewall_policy_with_rules.html.markdown index 943efabbf6e..96f7e91996e 100644 --- a/website/docs/r/compute_network_firewall_policy_with_rules.html.markdown +++ b/website/docs/r/compute_network_firewall_policy_with_rules.html.markdown @@ -205,7 +205,7 @@ The following arguments are supported: * `match` - (Required) A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. - Structure is [documented below](#nested_rule_rule_match). + Structure is [documented below](#nested_rule_match). * `target_secure_tag` - (Optional) @@ -220,7 +220,7 @@ The following arguments are supported: targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. - Structure is [documented below](#nested_rule_rule_target_secure_tag). + Structure is [documented below](#nested_rule_target_secure_tag). * `action` - (Required) @@ -263,7 +263,7 @@ The following arguments are supported: enabled. -The `match` block supports: +The `match` block supports: * `src_ip_ranges` - (Optional) @@ -336,7 +336,7 @@ The following arguments are supported: * `layer4_config` - (Required) Pairs of IP protocols and ports that the rule should match. - Structure is [documented below](#nested_rule_rule_match_layer4_config). + Structure is [documented below](#nested_rule_match_layer4_config). * `src_secure_tag` - (Optional) @@ -345,10 +345,10 @@ The following arguments are supported: For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. - Structure is [documented below](#nested_rule_rule_match_src_secure_tag). + Structure is [documented below](#nested_rule_match_src_secure_tag). -The `layer4_config` block supports: +The `layer4_config` block supports: * `ip_protocol` - (Required) @@ -367,7 +367,7 @@ The following arguments are supported: Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. -The `src_secure_tag` block supports: +The `src_secure_tag` block supports: * `name` - (Optional) @@ -380,7 +380,7 @@ The following arguments are supported: `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. -The `target_secure_tag` block supports: +The `target_secure_tag` block supports: * `name` - (Optional) @@ -442,7 +442,7 @@ In addition to the arguments listed above, the following computed attributes are * `match` - (Output) A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match). + Structure is [documented below](#nested_predefined_rules_match). * `target_secure_tag` - (Output) @@ -457,7 +457,7 @@ In addition to the arguments listed above, the following computed attributes are targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. - Structure is [documented below](#nested_predefined_rules_predefined_rules_target_secure_tag). + Structure is [documented below](#nested_predefined_rules_target_secure_tag). * `action` - (Output) @@ -499,7 +499,7 @@ In addition to the arguments listed above, the following computed attributes are enabled. -The `match` block contains: +The `match` block contains: * `src_ip_ranges` - (Output) @@ -558,7 +558,7 @@ In addition to the arguments listed above, the following computed attributes are * `layer4_config` - (Output) Pairs of IP protocols and ports that the rule should match. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match_layer4_config). + Structure is [documented below](#nested_predefined_rules_match_layer4_config). * `src_secure_tag` - (Output) @@ -567,10 +567,10 @@ In addition to the arguments listed above, the following computed attributes are For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match_src_secure_tag). + Structure is [documented below](#nested_predefined_rules_match_src_secure_tag). -The `layer4_config` block contains: +The `layer4_config` block contains: * `ip_protocol` - (Output) @@ -589,7 +589,7 @@ In addition to the arguments listed above, the following computed attributes are Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. -The `src_secure_tag` block contains: +The `src_secure_tag` block contains: * `name` - (Output) @@ -602,7 +602,7 @@ In addition to the arguments listed above, the following computed attributes are `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. -The `target_secure_tag` block contains: +The `target_secure_tag` block contains: * `name` - (Output) diff --git a/website/docs/r/compute_organization_security_policy_association.html.markdown b/website/docs/r/compute_organization_security_policy_association.html.markdown index e861416b1df..6471a25f85a 100644 --- a/website/docs/r/compute_organization_security_policy_association.html.markdown +++ b/website/docs/r/compute_organization_security_policy_association.html.markdown @@ -23,12 +23,10 @@ description: |- An association for the OrganizationSecurityPolicy. -~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. -See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. To get more information about OrganizationSecurityPolicyAssociation, see: -* [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/organizationSecurityPolicies/addAssociation) +* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/organizationSecurityPolicies/addAssociation) * How-to Guides * [Associating a policy with the organization or folder](https://cloud.google.com/vpc/docs/using-firewall-policies#associate) @@ -37,21 +35,18 @@ To get more information about OrganizationSecurityPolicyAssociation, see: ```hcl resource "google_folder" "security_policy_target" { - provider = google-beta display_name = "tf-test-secpol-%{random_suffix}" parent = "organizations/123456789" deletion_protection = false } resource "google_compute_organization_security_policy" "policy" { - provider = google-beta - display_name = "tf-test%{random_suffix}" + short_name = "tf-test%{random_suffix}" parent = google_folder.security_policy_target.name - type = "FIREWALL" + type = "CLOUD_ARMOR" } resource "google_compute_organization_security_policy_association" "policy" { - provider = google-beta name = "tf-test%{random_suffix}" attachment_id = google_compute_organization_security_policy.policy.parent policy_id = google_compute_organization_security_policy.policy.id diff --git a/website/docs/r/compute_per_instance_config.html.markdown b/website/docs/r/compute_per_instance_config.html.markdown index 4413ef0c112..b5acf44062b 100644 --- a/website/docs/r/compute_per_instance_config.html.markdown +++ b/website/docs/r/compute_per_instance_config.html.markdown @@ -216,10 +216,10 @@ State will be removed on the next instance recreation or update. * `ip_address` - (Optional) Ip address representation - Structure is [documented below](#nested_preserved_state_internal_ip_internal_ip_ip_address). + Structure is [documented below](#nested_preserved_state_internal_ip_ip_address). -The `ip_address` block supports: +The `ip_address` block supports: * `address` - (Optional) @@ -238,10 +238,10 @@ State will be removed on the next instance recreation or update. * `ip_address` - (Optional) Ip address representation - Structure is [documented below](#nested_preserved_state_external_ip_external_ip_ip_address). + Structure is [documented below](#nested_preserved_state_external_ip_ip_address). -The `ip_address` block supports: +The `ip_address` block supports: * `address` - (Optional) diff --git a/website/docs/r/compute_region_backend_service.html.markdown b/website/docs/r/compute_region_backend_service.html.markdown index beb88d4670c..bb35374778f 100644 --- a/website/docs/r/compute_region_backend_service.html.markdown +++ b/website/docs/r/compute_region_backend_service.html.markdown @@ -1118,10 +1118,10 @@ The following arguments are supported: * `custom_metrics` - (Optional) The set of custom metrics that are used for CUSTOM_METRICS BalancingMode. - Structure is [documented below](#nested_backend_backend_custom_metrics). + Structure is [documented below](#nested_backend_custom_metrics). -The `custom_metrics` block supports: +The `custom_metrics` block supports: * `name` - (Required) diff --git a/website/docs/r/compute_region_commitment.html.markdown b/website/docs/r/compute_region_commitment.html.markdown index 3f1e7508388..b2afc54cddc 100644 --- a/website/docs/r/compute_region_commitment.html.markdown +++ b/website/docs/r/compute_region_commitment.html.markdown @@ -107,7 +107,7 @@ The following arguments are supported: (Optional) The type of commitment, which affects the discount rate and the eligible resources. The type could be one of the following value: `MEMORY_OPTIMIZED`, `ACCELERATOR_OPTIMIZED`, - `GENERAL_PURPOSE_N1`, `GENERAL_PURPOSE_N2`, `GENERAL_PURPOSE_N2D`, `GENERAL_PURPOSE_E2`, + `GENERAL_PURPOSE`, `GENERAL_PURPOSE_N2`, `GENERAL_PURPOSE_N2D`, `GENERAL_PURPOSE_E2`, `GENERAL_PURPOSE_T2D`, `GENERAL_PURPOSE_C3`, `COMPUTE_OPTIMIZED_C2`, `COMPUTE_OPTIMIZED_C2D` and `GRAPHICS_OPTIMIZED_G2` diff --git a/website/docs/r/compute_region_health_source.html.markdown b/website/docs/r/compute_region_health_source.html.markdown new file mode 100644 index 00000000000..d57d8768b12 --- /dev/null +++ b/website/docs/r/compute_region_health_source.html.markdown @@ -0,0 +1,205 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/compute/RegionHealthSource.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Compute Engine" +description: |- + A health source resource specifies the source resources and the health + aggregation policy applied to the source resources to determine the + aggregated health status. +--- + +# google_compute_region_health_source + +A health source resource specifies the source resources and the health +aggregation policy applied to the source resources to determine the +aggregated health status. + +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. + +To get more information about RegionHealthSource, see: + +* [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/regionHealthSources) +* How-to Guides + * [Health checks overview](https://cloud.google.com/load-balancing/docs/health-check-concepts) + +## Example Usage - Compute Region Health Source Basic + + +```hcl +resource "google_compute_region_health_aggregation_policy" "hap" { + provider = google-beta + name = "test-health-source-hap" + description = "health aggregation policy for health source" + region = "us-central1" +} + +resource "google_compute_health_check" "default" { + provider = google-beta + name = "test-health-source-hc" + http_health_check { + port = 80 + } +} + +resource "google_compute_region_backend_service" "default" { + provider = google-beta + name = "test-health-source-bs" + region = "us-central1" + health_checks = [google_compute_health_check.default.id] + load_balancing_scheme = "INTERNAL" +} + +resource "google_compute_region_health_source" "example_test_health_source" { + provider = google-beta + name = "test-health-source" + description = "Example health source basic" + region = "us-central1" + source_type = "BACKEND_SERVICE" + sources = [google_compute_region_backend_service.default.id] + health_aggregation_policy = google_compute_region_health_aggregation_policy.hap.id +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `source_type` - + (Required) + Specifies the type of the `HealthSource`. The only allowed value + is `BACKEND_SERVICE`. Must be specified when the + `HealthSource` is created, and cannot be mutated. + Possible values are: `BACKEND_SERVICE`. + +* `region` - + (Required) + URL of the region where the health source resides. + +* `name` - + (Required) + Name of the resource. Provided by the client when the resource is created. + The name must be 1-63 characters long, and comply with RFC1035. + Specifically, the name must be 1-63 characters long and match the regular + expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first + character must be a lowercase letter, and all following characters must + be a dash, lowercase letter, or digit, except the last character, which + cannot be a dash. + + +* `description` - + (Optional) + An optional description of this resource. Provide this property when you + create the resource. + +* `sources` - + (Optional) + URLs to the source resources. Must be size 1. Must be a + `BackendService` if the `sourceType` is `BACKEND_SERVICE`. The + `BackendService` must have load balancing scheme + `INTERNAL` or `INTERNAL_MANAGED` and must be regional + and in the same region as the `HealthSource` (cross-region + deployment for `INTERNAL_MANAGED` is not supported). The + `BackendService` may use only IGs, MIGs, or NEGs of type + `GCE_VM_IP` or `GCE_VM_IP_PORT`. The + `BackendService` may not use `haPolicy`. Can be + mutated. + +* `health_aggregation_policy` - + (Optional) + URL to the `HealthAggregationPolicy` resource. Must be set. Must + be regional and in the same region as the `HealthSource`. Can be + mutated. + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/regions/{{region}}/healthSources/{{name}}` + +* `id` - + The unique identifier for the resource. This identifier is defined by the server. + +* `creation_timestamp` - + Creation timestamp in RFC3339 text format. + +* `self_link_with_id` - + Server-defined URL with id for the resource. + +* `fingerprint` - + Fingerprint of this resource. A hash of the contents stored in this object. + This field is used in optimistic locking. + + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +RegionHealthSource can be imported using any of these accepted formats: + +* `projects/{{project}}/regions/{{region}}/healthSources/{{name}}` +* `{{project}}/{{region}}/{{name}}` +* `{{region}}/{{name}}` +* `{{name}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import RegionHealthSource using identity values. For example: + +```tf +import { + identity = { + region = "<-required value->" + name = "<-required value->" + project = "<-optional value->" + } + to = google_compute_region_health_source.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import RegionHealthSource using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/regions/{{region}}/healthSources/{{name}}" + to = google_compute_region_health_source.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), RegionHealthSource can be imported using one of the formats above. For example: + +``` +$ terraform import google_compute_region_health_source.default projects/{{project}}/regions/{{region}}/healthSources/{{name}} +$ terraform import google_compute_region_health_source.default {{project}}/{{region}}/{{name}} +$ terraform import google_compute_region_health_source.default {{region}}/{{name}} +$ terraform import google_compute_region_health_source.default {{name}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). diff --git a/website/docs/r/compute_region_network_endpoint.html.markdown b/website/docs/r/compute_region_network_endpoint.html.markdown index 53b390cb475..12c8514df7f 100644 --- a/website/docs/r/compute_region_network_endpoint.html.markdown +++ b/website/docs/r/compute_region_network_endpoint.html.markdown @@ -186,11 +186,11 @@ The following arguments are supported: This can only be specified when network_endpoint_type of the NEG is INTERNET_FQDN_PORT. * `client_destination_port` - - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + (Optional) Client destination port for the `GCE_VM_IP_PORTMAP` NEG. * `instance` - - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + (Optional) The name for a specific VM instance that the IP address belongs to. This is required for network endpoints of type GCE_VM_IP_PORTMAP. diff --git a/website/docs/r/compute_region_network_firewall_policy_with_rules.html.markdown b/website/docs/r/compute_region_network_firewall_policy_with_rules.html.markdown index e43f57c99db..430fa9cf748 100644 --- a/website/docs/r/compute_region_network_firewall_policy_with_rules.html.markdown +++ b/website/docs/r/compute_region_network_firewall_policy_with_rules.html.markdown @@ -207,7 +207,7 @@ The following arguments are supported: * `match` - (Required) A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. - Structure is [documented below](#nested_rule_rule_match). + Structure is [documented below](#nested_rule_match). * `target_secure_tag` - (Optional) @@ -222,7 +222,7 @@ The following arguments are supported: targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. - Structure is [documented below](#nested_rule_rule_target_secure_tag). + Structure is [documented below](#nested_rule_target_secure_tag). * `action` - (Required) @@ -265,7 +265,7 @@ The following arguments are supported: enabled. -The `match` block supports: +The `match` block supports: * `src_ip_ranges` - (Optional) @@ -338,7 +338,7 @@ The following arguments are supported: * `layer4_config` - (Required) Pairs of IP protocols and ports that the rule should match. - Structure is [documented below](#nested_rule_rule_match_layer4_config). + Structure is [documented below](#nested_rule_match_layer4_config). * `src_secure_tag` - (Optional) @@ -347,10 +347,10 @@ The following arguments are supported: For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. - Structure is [documented below](#nested_rule_rule_match_src_secure_tag). + Structure is [documented below](#nested_rule_match_src_secure_tag). -The `layer4_config` block supports: +The `layer4_config` block supports: * `ip_protocol` - (Required) @@ -369,7 +369,7 @@ The following arguments are supported: Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. -The `src_secure_tag` block supports: +The `src_secure_tag` block supports: * `name` - (Optional) @@ -382,7 +382,7 @@ The following arguments are supported: `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. -The `target_secure_tag` block supports: +The `target_secure_tag` block supports: * `name` - (Optional) @@ -444,7 +444,7 @@ In addition to the arguments listed above, the following computed attributes are * `match` - (Output) A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match). + Structure is [documented below](#nested_predefined_rules_match). * `target_secure_tag` - (Output) @@ -459,7 +459,7 @@ In addition to the arguments listed above, the following computed attributes are targetSecureTag are specified, the firewall rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. - Structure is [documented below](#nested_predefined_rules_predefined_rules_target_secure_tag). + Structure is [documented below](#nested_predefined_rules_target_secure_tag). * `action` - (Output) @@ -501,7 +501,7 @@ In addition to the arguments listed above, the following computed attributes are enabled. -The `match` block contains: +The `match` block contains: * `src_ip_ranges` - (Output) @@ -560,7 +560,7 @@ In addition to the arguments listed above, the following computed attributes are * `layer4_config` - (Output) Pairs of IP protocols and ports that the rule should match. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match_layer4_config). + Structure is [documented below](#nested_predefined_rules_match_layer4_config). * `src_secure_tag` - (Output) @@ -569,10 +569,10 @@ In addition to the arguments listed above, the following computed attributes are For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. - Structure is [documented below](#nested_predefined_rules_predefined_rules_match_src_secure_tag). + Structure is [documented below](#nested_predefined_rules_match_src_secure_tag). -The `layer4_config` block contains: +The `layer4_config` block contains: * `ip_protocol` - (Output) @@ -591,7 +591,7 @@ In addition to the arguments listed above, the following computed attributes are Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. -The `src_secure_tag` block contains: +The `src_secure_tag` block contains: * `name` - (Output) @@ -604,7 +604,7 @@ In addition to the arguments listed above, the following computed attributes are `INEFFECTIVE`. A secure tag is `INEFFECTIVE` when it is deleted or its network is deleted. -The `target_secure_tag` block contains: +The `target_secure_tag` block contains: * `name` - (Output) diff --git a/website/docs/r/compute_region_per_instance_config.html.markdown b/website/docs/r/compute_region_per_instance_config.html.markdown index 8ed6d583567..b5988a79300 100644 --- a/website/docs/r/compute_region_per_instance_config.html.markdown +++ b/website/docs/r/compute_region_per_instance_config.html.markdown @@ -223,10 +223,10 @@ State will be removed on the next instance recreation or update. * `ip_address` - (Optional) Ip address representation - Structure is [documented below](#nested_preserved_state_internal_ip_internal_ip_ip_address). + Structure is [documented below](#nested_preserved_state_internal_ip_ip_address). -The `ip_address` block supports: +The `ip_address` block supports: * `address` - (Optional) @@ -245,10 +245,10 @@ State will be removed on the next instance recreation or update. * `ip_address` - (Optional) Ip address representation - Structure is [documented below](#nested_preserved_state_external_ip_external_ip_ip_address). + Structure is [documented below](#nested_preserved_state_external_ip_ip_address). -The `ip_address` block supports: +The `ip_address` block supports: * `address` - (Optional) diff --git a/website/docs/r/compute_region_resize_request.html.markdown b/website/docs/r/compute_region_resize_request.html.markdown index 4a91c2502f3..ef727502715 100644 --- a/website/docs/r/compute_region_resize_request.html.markdown +++ b/website/docs/r/compute_region_resize_request.html.markdown @@ -226,33 +226,33 @@ In addition to the arguments listed above, the following computed attributes are * `error_details` - (Output) An array of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED. - Structure is [documented below](#nested_status_error_errors_errors_error_details). + Structure is [documented below](#nested_status_error_errors_error_details). -The `error_details` block contains: +The `error_details` block contains: * `error_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_error_info). + Structure is [documented below](#nested_status_error_errors_error_details_error_info). * `quota_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_quota_info). + Structure is [documented below](#nested_status_error_errors_error_details_quota_info). * `help` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_help). + Structure is [documented below](#nested_status_error_errors_error_details_help). * `localized_message` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_localized_message). + Structure is [documented below](#nested_status_error_errors_error_details_localized_message). -The `error_info` block contains: +The `error_info` block contains: * `reason` - (Output) @@ -266,7 +266,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Additional structured details about this error. -The `quota_info` block contains: +The `quota_info` block contains: * `metric_name` - (Output) @@ -292,15 +292,15 @@ In addition to the arguments listed above, the following computed attributes are (Output) Rollout status of the future quota limit. -The `help` block contains: +The `help` block contains: * `links` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_help_links). + Structure is [documented below](#nested_status_error_errors_error_details_help_links). -The `links` block contains: +The `links` block contains: * `description` - (Output) @@ -310,7 +310,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The URL of the link. -The `localized_message` block contains: +The `localized_message` block contains: * `locale` - (Output) @@ -353,33 +353,33 @@ In addition to the arguments listed above, the following computed attributes are * `error_details` - (Output) An array of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details). -The `error_details` block contains: +The `error_details` block contains: * `error_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_error_info). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_error_info). * `quota_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_quota_info). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_quota_info). * `help` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_help). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_help). * `localized_message` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_localized_message). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_localized_message). -The `error_info` block contains: +The `error_info` block contains: * `reason` - (Output) @@ -393,7 +393,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Additional structured details about this error. -The `quota_info` block contains: +The `quota_info` block contains: * `metric_name` - (Output) @@ -419,15 +419,15 @@ In addition to the arguments listed above, the following computed attributes are (Output) Rollout status of the future quota limit. -The `help` block contains: +The `help` block contains: * `links` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_help_links). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_help_links). -The `links` block contains: +The `links` block contains: * `description` - (Output) @@ -437,7 +437,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The URL of the link. -The `localized_message` block contains: +The `localized_message` block contains: * `locale` - (Output) diff --git a/website/docs/r/compute_region_security_policy.html.markdown b/website/docs/r/compute_region_security_policy.html.markdown index 88e10982a1a..a1995b870ad 100644 --- a/website/docs/r/compute_region_security_policy.html.markdown +++ b/website/docs/r/compute_region_security_policy.html.markdown @@ -276,13 +276,13 @@ The following arguments are supported: (Optional) A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. - Structure is [documented below](#nested_rules_rules_match). + Structure is [documented below](#nested_rules_match). * `preconfigured_waf_config` - (Optional) Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. - Structure is [documented below](#nested_rules_rules_preconfigured_waf_config). + Structure is [documented below](#nested_rules_preconfigured_waf_config). * `action` - (Required) @@ -296,7 +296,7 @@ The following arguments are supported: * `rate_limit_options` - (Optional) Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. - Structure is [documented below](#nested_rules_rules_rate_limit_options). + Structure is [documented below](#nested_rules_rate_limit_options). * `preview` - (Optional) @@ -312,10 +312,10 @@ The following arguments are supported: Example: networkMatch: srcIpRanges: - "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive - Structure is [documented below](#nested_rules_rules_network_match). + Structure is [documented below](#nested_rules_network_match). -The `match` block supports: +The `match` block supports: * `versioned_expr` - (Optional) @@ -326,36 +326,36 @@ The following arguments are supported: * `expr` - (Optional) User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. See [Sample expressions](https://cloud.google.com/armor/docs/configure-security-policies#sample-expressions) for examples. - Structure is [documented below](#nested_rules_rules_match_expr). + Structure is [documented below](#nested_rules_match_expr). * `config` - (Optional) The configuration options available when specifying versionedExpr. This field must be specified if versionedExpr is specified and cannot be specified if versionedExpr is not specified. - Structure is [documented below](#nested_rules_rules_match_config). + Structure is [documented below](#nested_rules_match_config). -The `expr` block supports: +The `expr` block supports: * `expression` - (Required) Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported. -The `config` block supports: +The `config` block supports: * `src_ip_ranges` - (Optional) CIDR IP address range. Maximum number of srcIpRanges allowed is 10. -The `preconfigured_waf_config` block supports: +The `preconfigured_waf_config` block supports: * `exclusion` - (Optional) An exclusion to apply during preconfigured WAF evaluation. - Structure is [documented below](#nested_rules_rules_preconfigured_waf_config_exclusion). + Structure is [documented below](#nested_rules_preconfigured_waf_config_exclusion). -The `exclusion` block supports: +The `exclusion` block supports: * `target_rule_set` - (Required) @@ -369,27 +369,27 @@ The following arguments are supported: * `request_header` - (Optional) Request header whose value will be excluded from inspection during preconfigured WAF evaluation. - Structure is [documented below](#nested_rules_rules_preconfigured_waf_config_exclusion_exclusion_request_header). + Structure is [documented below](#nested_rules_preconfigured_waf_config_exclusion_request_header). * `request_cookie` - (Optional) Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. - Structure is [documented below](#nested_rules_rules_preconfigured_waf_config_exclusion_exclusion_request_cookie). + Structure is [documented below](#nested_rules_preconfigured_waf_config_exclusion_request_cookie). * `request_uri` - (Optional) Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. - Structure is [documented below](#nested_rules_rules_preconfigured_waf_config_exclusion_exclusion_request_uri). + Structure is [documented below](#nested_rules_preconfigured_waf_config_exclusion_request_uri). * `request_query_param` - (Optional) Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. - Structure is [documented below](#nested_rules_rules_preconfigured_waf_config_exclusion_exclusion_request_query_param). + Structure is [documented below](#nested_rules_preconfigured_waf_config_exclusion_request_query_param). -The `request_header` block supports: +The `request_header` block supports: * `operator` - (Required) @@ -407,7 +407,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_cookie` block supports: +The `request_cookie` block supports: * `operator` - (Required) @@ -425,7 +425,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_uri` block supports: +The `request_uri` block supports: * `operator` - (Required) @@ -443,7 +443,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_query_param` block supports: +The `request_query_param` block supports: * `operator` - (Required) @@ -461,12 +461,12 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `rate_limit_options` block supports: +The `rate_limit_options` block supports: * `rate_limit_threshold` - (Optional) Threshold at which to begin ratelimiting. - Structure is [documented below](#nested_rules_rules_rate_limit_options_rate_limit_threshold). + Structure is [documented below](#nested_rules_rate_limit_options_rate_limit_threshold). * `conform_action` - (Optional) @@ -505,13 +505,13 @@ The following arguments are supported: If specified, any combination of values of enforceOnKeyType/enforceOnKeyName is treated as the key on which ratelimit threshold/action is enforced. You can specify up to 3 enforceOnKeyConfigs. If enforceOnKeyConfigs is specified, enforceOnKey must not be specified. - Structure is [documented below](#nested_rules_rules_rate_limit_options_enforce_on_key_configs). + Structure is [documented below](#nested_rules_rate_limit_options_enforce_on_key_configs). * `ban_threshold` - (Optional) Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'banDurationSec' when the number of requests that exceed the 'rateLimitThreshold' also exceed this 'banThreshold'. - Structure is [documented below](#nested_rules_rules_rate_limit_options_ban_threshold). + Structure is [documented below](#nested_rules_rate_limit_options_ban_threshold). * `ban_duration_sec` - (Optional) @@ -519,7 +519,7 @@ The following arguments are supported: If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold. -The `rate_limit_threshold` block supports: +The `rate_limit_threshold` block supports: * `count` - (Optional) @@ -529,7 +529,7 @@ The following arguments are supported: (Optional) Interval over which the threshold is computed. -The `enforce_on_key_configs` block supports: +The `enforce_on_key_configs` block supports: * `enforce_on_key_type` - (Optional) @@ -553,7 +553,7 @@ The following arguments are supported: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value. -The `ban_threshold` block supports: +The `ban_threshold` block supports: * `count` - (Optional) @@ -563,12 +563,12 @@ The following arguments are supported: (Optional) Interval over which the threshold is computed. -The `network_match` block supports: +The `network_match` block supports: * `user_defined_fields` - (Optional) User-defined fields. Each element names a defined field and lists the matching values for that field. - Structure is [documented below](#nested_rules_rules_network_match_user_defined_fields). + Structure is [documented below](#nested_rules_network_match_user_defined_fields). * `src_ip_ranges` - (Optional) @@ -599,7 +599,7 @@ The following arguments are supported: BGP Autonomous System Number associated with the source IP address. -The `user_defined_fields` block supports: +The `user_defined_fields` block supports: * `name` - (Optional) diff --git a/website/docs/r/compute_region_security_policy_rule.html.markdown b/website/docs/r/compute_region_security_policy_rule.html.markdown index c0856a27b6d..318482f2b56 100644 --- a/website/docs/r/compute_region_security_policy_rule.html.markdown +++ b/website/docs/r/compute_region_security_policy_rule.html.markdown @@ -391,27 +391,27 @@ The following arguments are supported: * `request_header` - (Optional) Request header whose value will be excluded from inspection during preconfigured WAF evaluation. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_header). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_header). * `request_cookie` - (Optional) Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_cookie). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_cookie). * `request_uri` - (Optional) Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_uri). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_uri). * `request_query_param` - (Optional) Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_query_param). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_query_param). -The `request_header` block supports: +The `request_header` block supports: * `operator` - (Required) @@ -429,7 +429,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_cookie` block supports: +The `request_cookie` block supports: * `operator` - (Required) @@ -447,7 +447,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_uri` block supports: +The `request_uri` block supports: * `operator` - (Required) @@ -465,7 +465,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_query_param` block supports: +The `request_query_param` block supports: * `operator` - (Required) diff --git a/website/docs/r/compute_region_url_map.html.markdown b/website/docs/r/compute_region_url_map.html.markdown index fef36a891f2..7b24e22dbf4 100644 --- a/website/docs/r/compute_region_url_map.html.markdown +++ b/website/docs/r/compute_region_url_map.html.markdown @@ -1591,7 +1591,7 @@ The following arguments are supported: headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. - Structure is [documented below](#nested_path_matcher_path_matcher_header_action). + Structure is [documented below](#nested_path_matcher_header_action). * `default_service` - (Optional) @@ -1615,7 +1615,7 @@ The following arguments are supported: action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules). + Structure is [documented below](#nested_path_matcher_route_rules). * `path_rule` - (Optional) @@ -1625,14 +1625,14 @@ The following arguments are supported: basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule). + Structure is [documented below](#nested_path_matcher_path_rule). * `default_url_redirect` - (Optional) When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. - Structure is [documented below](#nested_path_matcher_path_matcher_default_url_redirect). + Structure is [documented below](#nested_path_matcher_default_url_redirect). * `default_route_action` - (Optional) @@ -1641,10 +1641,10 @@ The following arguments are supported: to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action). + Structure is [documented below](#nested_path_matcher_default_route_action). -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_remove` - (Optional) @@ -1653,7 +1653,7 @@ The following arguments are supported: * `request_headers_to_add` - (Optional) Headers to add to a matching request before forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_header_action_request_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -1662,10 +1662,10 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response before sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_header_action_response_headers_to_add). -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Optional) @@ -1680,7 +1680,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Optional) @@ -1695,7 +1695,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. -The `route_rules` block supports: +The `route_rules` block supports: * `priority` - (Required) @@ -1729,12 +1729,12 @@ The following arguments are supported: the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_header_action). + Structure is [documented below](#nested_path_matcher_route_rules_header_action). * `match_rules` - (Optional) The rules for determining a match. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules). * `route_action` - (Optional) @@ -1744,23 +1744,23 @@ The following arguments are supported: weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action). + Structure is [documented below](#nested_path_matcher_route_rules_route_action). * `url_redirect` - (Optional) When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_url_redirect). + Structure is [documented below](#nested_path_matcher_route_rules_url_redirect). -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_header_action_request_headers_to_add). * `request_headers_to_remove` - (Optional) @@ -1770,7 +1770,7 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_header_action_response_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -1778,7 +1778,7 @@ The following arguments are supported: prior to sending the response back to the client. -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Required) @@ -1794,7 +1794,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Required) @@ -1810,7 +1810,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `match_rules` block supports: +The `match_rules` block supports: * `full_path_match` - (Optional) @@ -1824,7 +1824,7 @@ The following arguments are supported: (Optional) Specifies a list of header match criteria, all of which must match corresponding headers in the request. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_header_matches). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_header_matches). * `ignore_case` - (Optional) @@ -1844,7 +1844,7 @@ The following arguments are supported: here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_metadata_filters). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_metadata_filters). * `prefix_match` - (Optional) @@ -1857,7 +1857,7 @@ The following arguments are supported: (Optional) Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_query_parameter_matches). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_query_parameter_matches). * `regex_match` - (Optional) @@ -1879,7 +1879,7 @@ The following arguments are supported: captures in total. -The `header_matches` block supports: +The `header_matches` block supports: * `exact_match` - (Optional) @@ -1921,7 +1921,7 @@ The following arguments are supported: * -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_header_matches_header_matches_range_match). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_header_matches_range_match). * `regex_match` - (Optional) @@ -1940,7 +1940,7 @@ The following arguments are supported: must be set. -The `range_match` block supports: +The `range_match` block supports: * `range_end` - (Required) @@ -1950,14 +1950,14 @@ The following arguments are supported: (Required) The start of the range (inclusive). -The `metadata_filters` block supports: +The `metadata_filters` block supports: * `filter_labels` - (Required) The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_metadata_filters_metadata_filters_filter_labels). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_metadata_filters_filter_labels). * `filter_match_criteria` - (Required) @@ -1970,7 +1970,7 @@ The following arguments are supported: Possible values are: `MATCH_ALL`, `MATCH_ANY`. -The `filter_labels` block supports: +The `filter_labels` block supports: * `name` - (Required) @@ -1982,7 +1982,7 @@ The following arguments are supported: The value of the label must match the specified value. value can have a maximum length of 1024 characters. -The `query_parameter_matches` block supports: +The `query_parameter_matches` block supports: * `exact_match` - (Optional) @@ -2008,13 +2008,13 @@ The following arguments are supported: please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. -The `route_action` block supports: +The `route_action` block supports: * `cors_policy` - (Optional) The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_cors_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_cors_policy). * `fault_injection_policy` - (Optional) @@ -2025,7 +2025,7 @@ The following arguments are supported: backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy). * `request_mirror_policy` - (Optional) @@ -2033,12 +2033,12 @@ The following arguments are supported: shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_request_mirror_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_request_mirror_policy). * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_retry_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_retry_policy). * `timeout` - (Optional) @@ -2046,13 +2046,13 @@ The following arguments are supported: the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_timeout). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_timeout). * `url_rewrite` - (Optional) The spec to modify the URL of the request, prior to forwarding the request to the matched service - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_url_rewrite). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_url_rewrite). * `weighted_backend_services` - (Optional) @@ -2064,10 +2064,10 @@ The following arguments are supported: the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services). -The `cors_policy` block supports: +The `cors_policy` block supports: * `allow_credentials` - (Optional) @@ -2108,22 +2108,22 @@ The following arguments are supported: Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `abort` - (Optional) The specification for how client requests are aborted as part of fault injection. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy_abort). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy_abort). * `delay` - (Optional) The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy_delay). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy_delay). -The `abort` block supports: +The `abort` block supports: * `http_status` - (Optional) @@ -2136,12 +2136,12 @@ The following arguments are supported: aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Optional) Specifies the value of the fixed delay interval. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy_delay_fixed_delay). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy_delay_fixed_delay). * `percentage` - (Optional) @@ -2150,7 +2150,7 @@ The following arguments are supported: 100.0 inclusive. -The `fixed_delay` block supports: +The `fixed_delay` block supports: * `nanos` - (Optional) @@ -2163,7 +2163,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `request_mirror_policy` block supports: +The `request_mirror_policy` block supports: * `backend_service` - (Required) @@ -2174,7 +2174,7 @@ The following arguments are supported: The percentage of requests to be mirrored to backendService. The value must be between 0.0 and 100.0 inclusive. -The `retry_policy` block supports: +The `retry_policy` block supports: * `num_retries` - (Required) @@ -2183,7 +2183,7 @@ The following arguments are supported: * `per_try_timeout` - (Optional) Specifies a non-zero timeout per retry attempt. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_retry_policy_per_try_timeout). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_retry_policy_per_try_timeout). * `retry_conditions` - (Optional) @@ -2210,7 +2210,7 @@ The following arguments are supported: the response header is set to unavailable -The `per_try_timeout` block supports: +The `per_try_timeout` block supports: * `nanos` - (Optional) @@ -2223,7 +2223,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `timeout` block supports: +The `timeout` block supports: * `nanos` - (Optional) @@ -2236,7 +2236,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `host_rewrite` - (Optional) @@ -2264,7 +2264,7 @@ The following arguments are supported: Only one of pathPrefixRewrite and pathTemplateRewrite may be specified. -The `weighted_backend_services` block supports: +The `weighted_backend_services` block supports: * `backend_service` - (Required) @@ -2277,7 +2277,7 @@ The following arguments are supported: Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services_header_action). * `weight` - (Required) @@ -2289,13 +2289,13 @@ The following arguments are supported: The value must be between 0 and 1000 -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services_header_action_request_headers_to_add). * `request_headers_to_remove` - (Optional) @@ -2305,7 +2305,7 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services_header_action_response_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -2313,7 +2313,7 @@ The following arguments are supported: prior to sending the response back to the client. -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Required) @@ -2329,7 +2329,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Required) @@ -2345,7 +2345,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `url_redirect` block supports: +The `url_redirect` block supports: * `host_redirect` - (Optional) @@ -2395,7 +2395,7 @@ The following arguments are supported: removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default value is false. -The `path_rule` block supports: +The `path_rule` block supports: * `service` - (Optional) @@ -2422,23 +2422,23 @@ The following arguments are supported: weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action). + Structure is [documented below](#nested_path_matcher_path_rule_route_action). * `url_redirect` - (Optional) When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_url_redirect). + Structure is [documented below](#nested_path_matcher_path_rule_url_redirect). -The `route_action` block supports: +The `route_action` block supports: * `cors_policy` - (Optional) The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_cors_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_cors_policy). * `fault_injection_policy` - (Optional) @@ -2449,7 +2449,7 @@ The following arguments are supported: backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy). * `request_mirror_policy` - (Optional) @@ -2457,12 +2457,12 @@ The following arguments are supported: shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_request_mirror_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_request_mirror_policy). * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_retry_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_retry_policy). * `timeout` - (Optional) @@ -2470,13 +2470,13 @@ The following arguments are supported: the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_timeout). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_timeout). * `url_rewrite` - (Optional) The spec to modify the URL of the request, prior to forwarding the request to the matched service - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_url_rewrite). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_url_rewrite). * `weighted_backend_services` - (Optional) @@ -2488,10 +2488,10 @@ The following arguments are supported: the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services). -The `cors_policy` block supports: +The `cors_policy` block supports: * `allow_credentials` - (Optional) @@ -2531,22 +2531,22 @@ The following arguments are supported: Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `abort` - (Optional) The specification for how client requests are aborted as part of fault injection. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy_abort). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy_abort). * `delay` - (Optional) The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy_delay). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy_delay). -The `abort` block supports: +The `abort` block supports: * `http_status` - (Required) @@ -2559,12 +2559,12 @@ The following arguments are supported: aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Required) Specifies the value of the fixed delay interval. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy_delay_fixed_delay). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy_delay_fixed_delay). * `percentage` - (Required) @@ -2573,7 +2573,7 @@ The following arguments are supported: 100.0 inclusive. -The `fixed_delay` block supports: +The `fixed_delay` block supports: * `nanos` - (Optional) @@ -2586,7 +2586,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `request_mirror_policy` block supports: +The `request_mirror_policy` block supports: * `backend_service` - (Required) @@ -2597,7 +2597,7 @@ The following arguments are supported: The percentage of requests to be mirrored to backendService. The value must be between 0.0 and 100.0 inclusive. -The `retry_policy` block supports: +The `retry_policy` block supports: * `num_retries` - (Optional) @@ -2606,7 +2606,7 @@ The following arguments are supported: * `per_try_timeout` - (Optional) Specifies a non-zero timeout per retry attempt. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_retry_policy_per_try_timeout). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_retry_policy_per_try_timeout). * `retry_conditions` - (Optional) @@ -2633,7 +2633,7 @@ The following arguments are supported: the gRPC status code in the response header is set to unavailable -The `per_try_timeout` block supports: +The `per_try_timeout` block supports: * `nanos` - (Optional) @@ -2646,7 +2646,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `timeout` block supports: +The `timeout` block supports: * `nanos` - (Optional) @@ -2659,7 +2659,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `host_rewrite` - (Optional) @@ -2673,7 +2673,7 @@ The following arguments are supported: portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. -The `weighted_backend_services` block supports: +The `weighted_backend_services` block supports: * `backend_service` - (Required) @@ -2686,7 +2686,7 @@ The following arguments are supported: Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services_header_action). * `weight` - (Required) @@ -2698,13 +2698,13 @@ The following arguments are supported: The value must be between 0 and 1000 -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services_header_action_request_headers_to_add). * `request_headers_to_remove` - (Optional) @@ -2714,7 +2714,7 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services_header_action_response_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -2722,7 +2722,7 @@ The following arguments are supported: prior to sending the response back to the client. -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Required) @@ -2738,7 +2738,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Required) @@ -2754,7 +2754,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `url_redirect` block supports: +The `url_redirect` block supports: * `host_redirect` - (Optional) @@ -2805,7 +2805,7 @@ The following arguments are supported: original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false. -The `default_url_redirect` block supports: +The `default_url_redirect` block supports: * `host_redirect` - (Optional) @@ -2853,7 +2853,7 @@ The following arguments are supported: retained. This field is required to ensure an empty block is not set. The normal default value is false. -The `default_route_action` block supports: +The `default_route_action` block supports: * `weighted_backend_services` - (Optional) @@ -2864,19 +2864,19 @@ The following arguments are supported: Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services). * `url_rewrite` - (Optional) The spec to modify the URL of the request, prior to forwarding the request to the matched service. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_url_rewrite). + Structure is [documented below](#nested_path_matcher_default_route_action_url_rewrite). * `timeout` - (Optional) Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_timeout). + Structure is [documented below](#nested_path_matcher_default_route_action_timeout). * `max_stream_duration` - (Optional) @@ -2885,25 +2885,25 @@ The following arguments are supported: has been fully processed (known as end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been processed, including all retries. A stream that does not complete in this duration is closed. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_max_stream_duration). + Structure is [documented below](#nested_path_matcher_default_route_action_max_stream_duration). * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_retry_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_retry_policy). * `request_mirror_policy` - (Optional) Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_request_mirror_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_request_mirror_policy). * `cors_policy` - (Optional) The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_cors_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_cors_policy). * `fault_injection_policy` - (Optional) @@ -2912,10 +2912,10 @@ The following arguments are supported: percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy). -The `weighted_backend_services` block supports: +The `weighted_backend_services` block supports: * `backend_service` - (Optional) @@ -2938,10 +2938,10 @@ The following arguments are supported: the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services_header_action). -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_remove` - (Optional) @@ -2951,7 +2951,7 @@ The following arguments are supported: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services_header_action_request_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -2961,10 +2961,10 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services_header_action_response_headers_to_add). -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Optional) @@ -2979,7 +2979,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Optional) @@ -2994,7 +2994,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `path_prefix_rewrite` - (Optional) @@ -3021,7 +3021,7 @@ The following arguments are supported: At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of pathPrefixRewrite or pathTemplateRewrite may be specified. -The `timeout` block supports: +The `timeout` block supports: * `seconds` - (Optional) @@ -3033,7 +3033,7 @@ The following arguments are supported: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. -The `max_stream_duration` block supports: +The `max_stream_duration` block supports: * `nanos` - (Optional) @@ -3045,7 +3045,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years -The `retry_policy` block supports: +The `retry_policy` block supports: * `retry_conditions` - (Optional) @@ -3074,10 +3074,10 @@ The following arguments are supported: Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_retry_policy_per_try_timeout). + Structure is [documented below](#nested_path_matcher_default_route_action_retry_policy_per_try_timeout). -The `per_try_timeout` block supports: +The `per_try_timeout` block supports: * `seconds` - (Optional) @@ -3089,7 +3089,7 @@ The following arguments are supported: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. -The `request_mirror_policy` block supports: +The `request_mirror_policy` block supports: * `backend_service` - (Required) @@ -3100,7 +3100,7 @@ The following arguments are supported: The percentage of requests to be mirrored to backendService. The value must be between 0.0 and 100.0 inclusive. -The `cors_policy` block supports: +The `cors_policy` block supports: * `allow_origins` - (Optional) @@ -3139,25 +3139,25 @@ The following arguments are supported: (Optional) If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `delay` - (Optional) The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy_delay). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy_delay). * `abort` - (Optional) The specification for how client requests are aborted as part of fault injection. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy_abort). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy_abort). -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Optional) Specifies the value of the fixed delay interval. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy_delay_fixed_delay). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy_delay_fixed_delay). * `percentage` - (Optional) @@ -3165,7 +3165,7 @@ The following arguments are supported: The value must be between 0.0 and 100.0 inclusive. -The `fixed_delay` block supports: +The `fixed_delay` block supports: * `seconds` - (Optional) @@ -3177,7 +3177,7 @@ The following arguments are supported: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. -The `abort` block supports: +The `abort` block supports: * `http_status` - (Optional) @@ -3323,10 +3323,10 @@ The following arguments are supported: headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. headerAction is not supported for load balancers that have their loadBalancingScheme set to EXTERNAL. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. - Structure is [documented below](#nested_default_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_default_route_action_weighted_backend_services_header_action). -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_remove` - (Optional) @@ -3335,7 +3335,7 @@ The following arguments are supported: * `request_headers_to_add` - (Optional) Headers to add to a matching request before forwarding the request to the backendService. - Structure is [documented below](#nested_default_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_default_route_action_weighted_backend_services_header_action_request_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -3344,10 +3344,10 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response before sending the response back to the client. - Structure is [documented below](#nested_default_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_default_route_action_weighted_backend_services_header_action_response_headers_to_add). -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Optional) @@ -3362,7 +3362,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Optional) diff --git a/website/docs/r/compute_resize_request.html.markdown b/website/docs/r/compute_resize_request.html.markdown index 6e7cc94e857..f025c71fd5c 100644 --- a/website/docs/r/compute_resize_request.html.markdown +++ b/website/docs/r/compute_resize_request.html.markdown @@ -216,33 +216,33 @@ In addition to the arguments listed above, the following computed attributes are * `error_details` - (Output) An array of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED. - Structure is [documented below](#nested_status_error_errors_errors_error_details). + Structure is [documented below](#nested_status_error_errors_error_details). -The `error_details` block contains: +The `error_details` block contains: * `error_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_error_info). + Structure is [documented below](#nested_status_error_errors_error_details_error_info). * `quota_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_quota_info). + Structure is [documented below](#nested_status_error_errors_error_details_quota_info). * `help` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_help). + Structure is [documented below](#nested_status_error_errors_error_details_help). * `localized_message` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_localized_message). + Structure is [documented below](#nested_status_error_errors_error_details_localized_message). -The `error_info` block contains: +The `error_info` block contains: * `reason` - (Output) @@ -256,7 +256,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Additional structured details about this error. -The `quota_info` block contains: +The `quota_info` block contains: * `metric_name` - (Output) @@ -282,15 +282,15 @@ In addition to the arguments listed above, the following computed attributes are (Output) Rollout status of the future quota limit. -The `help` block contains: +The `help` block contains: * `links` - (Output) A nested object resource. - Structure is [documented below](#nested_status_error_errors_errors_error_details_error_details_help_links). + Structure is [documented below](#nested_status_error_errors_error_details_help_links). -The `links` block contains: +The `links` block contains: * `description` - (Output) @@ -300,7 +300,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The URL of the link. -The `localized_message` block contains: +The `localized_message` block contains: * `locale` - (Output) @@ -343,33 +343,33 @@ In addition to the arguments listed above, the following computed attributes are * `error_details` - (Output) An array of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details). -The `error_details` block contains: +The `error_details` block contains: * `error_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_error_info). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_error_info). * `quota_info` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_quota_info). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_quota_info). * `help` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_help). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_help). * `localized_message` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_localized_message). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_localized_message). -The `error_info` block contains: +The `error_info` block contains: * `reason` - (Output) @@ -383,7 +383,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) Additional structured details about this error. -The `quota_info` block contains: +The `quota_info` block contains: * `metric_name` - (Output) @@ -409,15 +409,15 @@ In addition to the arguments listed above, the following computed attributes are (Output) Rollout status of the future quota limit. -The `help` block contains: +The `help` block contains: * `links` - (Output) A nested object resource. - Structure is [documented below](#nested_status_last_attempt_error_errors_errors_error_details_error_details_help_links). + Structure is [documented below](#nested_status_last_attempt_error_errors_error_details_help_links). -The `links` block contains: +The `links` block contains: * `description` - (Output) @@ -427,7 +427,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The URL of the link. -The `localized_message` block contains: +The `localized_message` block contains: * `locale` - (Output) diff --git a/website/docs/r/compute_route.html.markdown b/website/docs/r/compute_route.html.markdown index 2592e55ff0f..d4863f92fe2 100644 --- a/website/docs/r/compute_route.html.markdown +++ b/website/docs/r/compute_route.html.markdown @@ -398,10 +398,10 @@ In addition to the arguments listed above, the following computed attributes are (Output) Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Structure is [documented below](#nested_warnings_warnings_data). + Structure is [documented below](#nested_warnings_data). -The `data` block contains: +The `data` block contains: * `key` - (Output) diff --git a/website/docs/r/compute_router_nat.html.markdown b/website/docs/r/compute_router_nat.html.markdown index 562cf2c4d7c..d9a99693e08 100644 --- a/website/docs/r/compute_router_nat.html.markdown +++ b/website/docs/r/compute_router_nat.html.markdown @@ -471,10 +471,10 @@ The following arguments are supported: * `action` - (Optional) The action to be enforced for traffic that matches this rule. - Structure is [documented below](#nested_rules_rules_action). + Structure is [documented below](#nested_rules_action). -The `action` block supports: +The `action` block supports: * `source_nat_active_ips` - (Optional) diff --git a/website/docs/r/compute_router_route_policy.html.markdown b/website/docs/r/compute_router_route_policy.html.markdown index e15ecf678b6..23f6d81e9bc 100644 --- a/website/docs/r/compute_router_route_policy.html.markdown +++ b/website/docs/r/compute_router_route_policy.html.markdown @@ -159,15 +159,15 @@ The following arguments are supported: * `match` - (Required) CEL expression evaluated against a route to determine if this term applies (see Policy Language). - Structure is [documented below](#nested_terms_terms_match). + Structure is [documented below](#nested_terms_match). * `actions` - (Optional) 'CEL expressions to evaluate to modify a route when this term matches.'\ - Structure is [documented below](#nested_terms_terms_actions). + Structure is [documented below](#nested_terms_actions). -The `match` block supports: +The `match` block supports: * `expression` - (Required) @@ -185,7 +185,7 @@ The following arguments are supported: (Optional) String indicating the location of the expression for error reporting, e.g. a file name and a position in the file -The `actions` block supports: +The `actions` block supports: * `expression` - (Required) diff --git a/website/docs/r/compute_security_policy_rule.html.markdown b/website/docs/r/compute_security_policy_rule.html.markdown index f3bb2aec38d..f4281d6b8d7 100644 --- a/website/docs/r/compute_security_policy_rule.html.markdown +++ b/website/docs/r/compute_security_policy_rule.html.markdown @@ -278,24 +278,24 @@ The following arguments are supported: * `request_header` - (Optional) Request header whose value will be excluded from inspection during preconfigured WAF evaluation. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_header). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_header). * `request_cookie` - (Optional) Request cookie whose value will be excluded from inspection during preconfigured WAF evaluation. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_cookie). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_cookie). * `request_uri` - (Optional) Request URI from the request line to be excluded from inspection during preconfigured WAF evaluation. When specifying this field, the query or fragment part should be excluded. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_uri). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_uri). * `request_query_param` - (Optional) Request query parameter whose value will be excluded from inspection during preconfigured WAF evaluation. Note that the parameter can be in the query string or in the POST body. - Structure is [documented below](#nested_preconfigured_waf_config_exclusion_exclusion_request_query_param). + Structure is [documented below](#nested_preconfigured_waf_config_exclusion_request_query_param). * `target_rule_set` - (Required) @@ -307,7 +307,7 @@ The following arguments are supported: If omitted, it refers to all the rule IDs under the WAF rule set. -The `request_header` block supports: +The `request_header` block supports: * `operator` - (Required) @@ -324,7 +324,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_cookie` block supports: +The `request_cookie` block supports: * `operator` - (Required) @@ -341,7 +341,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_uri` block supports: +The `request_uri` block supports: * `operator` - (Required) @@ -358,7 +358,7 @@ The following arguments are supported: A request field matching the specified value will be excluded from inspection during preconfigured WAF evaluation. The field value must be given if the field operator is not EQUALS_ANY, and cannot be given if the field operator is EQUALS_ANY. -The `request_query_param` block supports: +The `request_query_param` block supports: * `operator` - (Required) diff --git a/website/docs/r/compute_snapshot.html.markdown b/website/docs/r/compute_snapshot.html.markdown index 7005482d884..1ed8ca7af38 100644 --- a/website/docs/r/compute_snapshot.html.markdown +++ b/website/docs/r/compute_snapshot.html.markdown @@ -77,6 +77,42 @@ resource "google_compute_disk" "persistent" { zone = "us-central1-a" } ``` + +## Example Usage - Snapshot Basic2 + + +```hcl +resource "google_compute_snapshot" "snapshot" { + provider = google-beta + name = "my-snapshot" + source_disk = google_compute_disk.persistent.id + zone = "us-central1-a" + labels = { + my_label = "value" + } + storage_locations = ["us-central1"] + guest_flush = true +} + +data "google_compute_image" "debian" { + provider = google-beta + family = "debian-11" + project = "debian-cloud" +} + +resource "google_compute_disk" "persistent" { + provider = google-beta + name = "debian-disk" + image = data.google_compute_image.debian.self_link + size = 10 + type = "pd-ssd" + zone = "us-central1-a" +} +```
Open in Cloud Shell @@ -154,6 +190,10 @@ The following arguments are supported: **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource. +* `guest_flush` - + (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) + Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. + * `snapshot_type` - (Optional) Indicates the type of the snapshot. diff --git a/website/docs/r/compute_url_map.html.markdown b/website/docs/r/compute_url_map.html.markdown index cd4f07ca950..f0fd970abdb 100644 --- a/website/docs/r/compute_url_map.html.markdown +++ b/website/docs/r/compute_url_map.html.markdown @@ -1675,14 +1675,14 @@ The following arguments are supported: If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client. defaultCustomErrorResponsePolicy is supported only for global external Application Load Balancers. - Structure is [documented below](#nested_path_matcher_path_matcher_default_custom_error_response_policy). + Structure is [documented below](#nested_path_matcher_default_custom_error_response_policy). * `header_action` - (Optional) Specifies changes to request and response headers that need to take effect for the selected backendService. HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap - Structure is [documented below](#nested_path_matcher_path_matcher_header_action). + Structure is [documented below](#nested_path_matcher_header_action). * `name` - (Required) @@ -1696,7 +1696,7 @@ The following arguments are supported: basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule). + Structure is [documented below](#nested_path_matcher_path_rule). * `route_rules` - (Optional) @@ -1706,14 +1706,14 @@ The following arguments are supported: action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules). + Structure is [documented below](#nested_path_matcher_route_rules). * `default_url_redirect` - (Optional) When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. - Structure is [documented below](#nested_path_matcher_path_matcher_default_url_redirect). + Structure is [documented below](#nested_path_matcher_default_url_redirect). * `default_route_action` - (Optional) @@ -1722,10 +1722,10 @@ The following arguments are supported: to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action). + Structure is [documented below](#nested_path_matcher_default_route_action). -The `default_custom_error_response_policy` block supports: +The `default_custom_error_response_policy` block supports: * `error_response_rule` - (Optional) @@ -1733,7 +1733,7 @@ The following arguments are supported: In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect. - Structure is [documented below](#nested_path_matcher_path_matcher_default_custom_error_response_policy_error_response_rule). + Structure is [documented below](#nested_path_matcher_default_custom_error_response_policy_error_response_rule). * `error_service` - (Optional) @@ -1745,7 +1745,7 @@ The following arguments are supported: If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). -The `error_response_rule` block supports: +The `error_response_rule` block supports: * `match_response_codes` - (Optional) @@ -1767,13 +1767,13 @@ The following arguments are supported: The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client. -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_header_action_request_headers_to_add). * `request_headers_to_remove` - (Optional) @@ -1783,7 +1783,7 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_header_action_response_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -1791,7 +1791,7 @@ The following arguments are supported: prior to sending the response back to the client. -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Required) @@ -1807,7 +1807,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Required) @@ -1823,7 +1823,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `path_rule` block supports: +The `path_rule` block supports: * `service` - (Optional) @@ -1845,7 +1845,7 @@ The following arguments are supported: A PathRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in PathRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. customErrorResponsePolicy is supported only for global external Application Load Balancers. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_custom_error_response_policy). + Structure is [documented below](#nested_path_matcher_path_rule_custom_error_response_policy). * `route_action` - (Optional) @@ -1855,17 +1855,17 @@ The following arguments are supported: weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action). + Structure is [documented below](#nested_path_matcher_path_rule_route_action). * `url_redirect` - (Optional) When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_url_redirect). + Structure is [documented below](#nested_path_matcher_path_rule_url_redirect). -The `custom_error_response_policy` block supports: +The `custom_error_response_policy` block supports: * `error_response_rule` - (Optional) @@ -1873,7 +1873,7 @@ The following arguments are supported: In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_custom_error_response_policy_error_response_rule). + Structure is [documented below](#nested_path_matcher_path_rule_custom_error_response_policy_error_response_rule). * `error_service` - (Optional) @@ -1885,7 +1885,7 @@ The following arguments are supported: If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). -The `error_response_rule` block supports: +The `error_response_rule` block supports: * `match_response_codes` - (Optional) @@ -1907,13 +1907,13 @@ The following arguments are supported: The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client. -The `route_action` block supports: +The `route_action` block supports: * `cors_policy` - (Optional) The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_cors_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_cors_policy). * `fault_injection_policy` - (Optional) @@ -1924,7 +1924,7 @@ The following arguments are supported: backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy). * `request_mirror_policy` - (Optional) @@ -1932,12 +1932,12 @@ The following arguments are supported: shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_request_mirror_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_request_mirror_policy). * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_retry_policy). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_retry_policy). * `timeout` - (Optional) @@ -1945,7 +1945,7 @@ The following arguments are supported: the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_timeout). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_timeout). * `max_stream_duration` - (Optional) @@ -1954,13 +1954,13 @@ The following arguments are supported: has been fully processed (known as end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been processed, including all retries. A stream that does not complete in this duration is closed. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_max_stream_duration). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_max_stream_duration). * `url_rewrite` - (Optional) The spec to modify the URL of the request, prior to forwarding the request to the matched service - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_url_rewrite). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_url_rewrite). * `weighted_backend_services` - (Optional) @@ -1972,10 +1972,10 @@ The following arguments are supported: the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services). -The `cors_policy` block supports: +The `cors_policy` block supports: * `allow_credentials` - (Optional) @@ -2015,22 +2015,22 @@ The following arguments are supported: Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `abort` - (Optional) The specification for how client requests are aborted as part of fault injection. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy_abort). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy_abort). * `delay` - (Optional) The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy_delay). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy_delay). -The `abort` block supports: +The `abort` block supports: * `http_status` - (Required) @@ -2043,12 +2043,12 @@ The following arguments are supported: aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Required) Specifies the value of the fixed delay interval. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_fault_injection_policy_delay_fixed_delay). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_fault_injection_policy_delay_fixed_delay). * `percentage` - (Required) @@ -2057,7 +2057,7 @@ The following arguments are supported: 100.0 inclusive. -The `fixed_delay` block supports: +The `fixed_delay` block supports: * `nanos` - (Optional) @@ -2070,7 +2070,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `request_mirror_policy` block supports: +The `request_mirror_policy` block supports: * `backend_service` - (Required) @@ -2081,7 +2081,7 @@ The following arguments are supported: The percentage of requests to be mirrored to backendService. The value must be between 0.0 and 100.0 inclusive. -The `retry_policy` block supports: +The `retry_policy` block supports: * `num_retries` - (Optional) @@ -2090,7 +2090,7 @@ The following arguments are supported: * `per_try_timeout` - (Optional) Specifies a non-zero timeout per retry attempt. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_retry_policy_per_try_timeout). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_retry_policy_per_try_timeout). * `retry_conditions` - (Optional) @@ -2117,7 +2117,7 @@ The following arguments are supported: the gRPC status code in the response header is set to unavailable -The `per_try_timeout` block supports: +The `per_try_timeout` block supports: * `nanos` - (Optional) @@ -2130,7 +2130,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `timeout` block supports: +The `timeout` block supports: * `nanos` - (Optional) @@ -2143,7 +2143,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `max_stream_duration` block supports: +The `max_stream_duration` block supports: * `nanos` - (Optional) @@ -2156,7 +2156,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `host_rewrite` - (Optional) @@ -2170,7 +2170,7 @@ The following arguments are supported: portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. -The `weighted_backend_services` block supports: +The `weighted_backend_services` block supports: * `backend_service` - (Required) @@ -2183,7 +2183,7 @@ The following arguments are supported: Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services_header_action). * `weight` - (Required) @@ -2195,13 +2195,13 @@ The following arguments are supported: The value must be between 0 and 1000 -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services_header_action_request_headers_to_add). * `request_headers_to_remove` - (Optional) @@ -2211,7 +2211,7 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_path_rule_path_rule_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_path_rule_route_action_weighted_backend_services_header_action_response_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -2219,7 +2219,7 @@ The following arguments are supported: prior to sending the response back to the client. -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Required) @@ -2235,7 +2235,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Required) @@ -2251,7 +2251,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `url_redirect` block supports: +The `url_redirect` block supports: * `host_redirect` - (Optional) @@ -2302,7 +2302,7 @@ The following arguments are supported: portion of the original URL is retained. This field is required to ensure an empty block is not set. The normal default value is false. -The `route_rules` block supports: +The `route_rules` block supports: * `priority` - (Required) @@ -2336,12 +2336,12 @@ The following arguments are supported: the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_header_action). + Structure is [documented below](#nested_path_matcher_route_rules_header_action). * `match_rules` - (Optional) The rules for determining a match. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules). * `route_action` - (Optional) @@ -2351,19 +2351,19 @@ The following arguments are supported: weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action). + Structure is [documented below](#nested_path_matcher_route_rules_route_action). * `url_redirect` - (Optional) When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_url_redirect). + Structure is [documented below](#nested_path_matcher_route_rules_url_redirect). * `custom_error_response_policy` - (Optional) customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendService or BackendBucket responds with an error. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_custom_error_response_policy). + Structure is [documented below](#nested_path_matcher_route_rules_custom_error_response_policy). * `http_filter_configs` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) @@ -2371,7 +2371,7 @@ The following arguments are supported: httpFilterConfigs only applies for load balancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_http_filter_configs). + Structure is [documented below](#nested_path_matcher_route_rules_http_filter_configs). * `http_filter_metadata` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) @@ -2379,16 +2379,16 @@ The following arguments are supported: httpFilterMetadata only applies for load balancers with loadBalancingScheme set to INTERNAL_SELF_MANAGED. See ForwardingRule for more details. Not supported when the URL map is bound to a target gRPC proxy that has validateForProxyless field set to true. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_http_filter_metadata). + Structure is [documented below](#nested_path_matcher_route_rules_http_filter_metadata). -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_header_action_request_headers_to_add). * `request_headers_to_remove` - (Optional) @@ -2398,7 +2398,7 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_header_action_response_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -2406,7 +2406,7 @@ The following arguments are supported: prior to sending the response back to the client. -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Required) @@ -2422,7 +2422,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Required) @@ -2438,7 +2438,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `match_rules` block supports: +The `match_rules` block supports: * `full_path_match` - (Optional) @@ -2452,7 +2452,7 @@ The following arguments are supported: (Optional) Specifies a list of header match criteria, all of which must match corresponding headers in the request. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_header_matches). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_header_matches). * `ignore_case` - (Optional) @@ -2472,7 +2472,7 @@ The following arguments are supported: here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_metadata_filters). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_metadata_filters). * `prefix_match` - (Optional) @@ -2485,7 +2485,7 @@ The following arguments are supported: (Optional) Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_query_parameter_matches). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_query_parameter_matches). * `regex_match` - (Optional) @@ -2507,7 +2507,7 @@ The following arguments are supported: captures in total. -The `header_matches` block supports: +The `header_matches` block supports: * `exact_match` - (Optional) @@ -2546,7 +2546,7 @@ The following arguments are supported: not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_header_matches_header_matches_range_match). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_header_matches_range_match). * `regex_match` - (Optional) @@ -2565,7 +2565,7 @@ The following arguments are supported: must be set. -The `range_match` block supports: +The `range_match` block supports: * `range_end` - (Required) @@ -2575,14 +2575,14 @@ The following arguments are supported: (Required) The start of the range (inclusive). -The `metadata_filters` block supports: +The `metadata_filters` block supports: * `filter_labels` - (Required) The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_match_rules_match_rules_metadata_filters_metadata_filters_filter_labels). + Structure is [documented below](#nested_path_matcher_route_rules_match_rules_metadata_filters_filter_labels). * `filter_match_criteria` - (Required) @@ -2595,7 +2595,7 @@ The following arguments are supported: Possible values are: `MATCH_ALL`, `MATCH_ANY`. -The `filter_labels` block supports: +The `filter_labels` block supports: * `name` - (Required) @@ -2607,7 +2607,7 @@ The following arguments are supported: The value of the label must match the specified value. value can have a maximum length of 1024 characters. -The `query_parameter_matches` block supports: +The `query_parameter_matches` block supports: * `exact_match` - (Optional) @@ -2633,13 +2633,13 @@ The following arguments are supported: please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. -The `route_action` block supports: +The `route_action` block supports: * `cors_policy` - (Optional) The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_cors_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_cors_policy). * `fault_injection_policy` - (Optional) @@ -2650,7 +2650,7 @@ The following arguments are supported: backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy). * `request_mirror_policy` - (Optional) @@ -2658,12 +2658,12 @@ The following arguments are supported: shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_request_mirror_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_request_mirror_policy). * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_retry_policy). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_retry_policy). * `timeout` - (Optional) @@ -2671,7 +2671,7 @@ The following arguments are supported: the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_timeout). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_timeout). * `max_stream_duration` - (Optional) @@ -2680,13 +2680,13 @@ The following arguments are supported: has been fully processed (known as end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been processed, including all retries. A stream that does not complete in this duration is closed. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_max_stream_duration). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_max_stream_duration). * `url_rewrite` - (Optional) The spec to modify the URL of the request, prior to forwarding the request to the matched service - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_url_rewrite). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_url_rewrite). * `weighted_backend_services` - (Optional) @@ -2698,10 +2698,10 @@ The following arguments are supported: the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services). -The `cors_policy` block supports: +The `cors_policy` block supports: * `allow_credentials` - (Optional) @@ -2742,22 +2742,22 @@ The following arguments are supported: Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `abort` - (Optional) The specification for how client requests are aborted as part of fault injection. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy_abort). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy_abort). * `delay` - (Optional) The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy_delay). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy_delay). -The `abort` block supports: +The `abort` block supports: * `http_status` - (Optional) @@ -2770,12 +2770,12 @@ The following arguments are supported: aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Optional) Specifies the value of the fixed delay interval. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_fault_injection_policy_delay_fixed_delay). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_fault_injection_policy_delay_fixed_delay). * `percentage` - (Optional) @@ -2784,7 +2784,7 @@ The following arguments are supported: 100.0 inclusive. -The `fixed_delay` block supports: +The `fixed_delay` block supports: * `nanos` - (Optional) @@ -2797,7 +2797,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `request_mirror_policy` block supports: +The `request_mirror_policy` block supports: * `backend_service` - (Required) @@ -2808,7 +2808,7 @@ The following arguments are supported: The percentage of requests to be mirrored to backendService. The value must be between 0.0 and 100.0 inclusive. -The `retry_policy` block supports: +The `retry_policy` block supports: * `num_retries` - (Required) @@ -2819,7 +2819,7 @@ The following arguments are supported: Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_retry_policy_per_try_timeout). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_retry_policy_per_try_timeout). * `retry_conditions` - (Optional) @@ -2846,7 +2846,7 @@ The following arguments are supported: the response header is set to unavailable -The `per_try_timeout` block supports: +The `per_try_timeout` block supports: * `nanos` - (Optional) @@ -2859,7 +2859,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `timeout` block supports: +The `timeout` block supports: * `nanos` - (Optional) @@ -2872,7 +2872,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `max_stream_duration` block supports: +The `max_stream_duration` block supports: * `nanos` - (Optional) @@ -2885,7 +2885,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `host_rewrite` - (Optional) @@ -2913,7 +2913,7 @@ The following arguments are supported: Only one of pathPrefixRewrite and pathTemplateRewrite may be specified. -The `weighted_backend_services` block supports: +The `weighted_backend_services` block supports: * `backend_service` - (Required) @@ -2926,7 +2926,7 @@ The following arguments are supported: Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services_header_action). * `weight` - (Required) @@ -2938,13 +2938,13 @@ The following arguments are supported: The value must be between 0 and 1000 -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services_header_action_request_headers_to_add). * `request_headers_to_remove` - (Optional) @@ -2954,7 +2954,7 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_route_rules_route_action_weighted_backend_services_header_action_response_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -2962,7 +2962,7 @@ The following arguments are supported: prior to sending the response back to the client. -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Required) @@ -2978,7 +2978,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Required) @@ -2994,7 +2994,7 @@ The following arguments are supported: header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `url_redirect` block supports: +The `url_redirect` block supports: * `host_redirect` - (Optional) @@ -3034,7 +3034,7 @@ The following arguments are supported: prior to redirecting the request. If set to false, the query portion of the original URL is retained. Defaults to false. -The `custom_error_response_policy` block supports: +The `custom_error_response_policy` block supports: * `error_response_rule` - (Optional) @@ -3042,7 +3042,7 @@ The following arguments are supported: In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect. - Structure is [documented below](#nested_path_matcher_path_matcher_route_rules_route_rules_custom_error_response_policy_error_response_rule). + Structure is [documented below](#nested_path_matcher_route_rules_custom_error_response_policy_error_response_rule). * `error_service` - (Optional) @@ -3054,7 +3054,7 @@ The following arguments are supported: If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). -The `error_response_rule` block supports: +The `error_response_rule` block supports: * `match_response_codes` - (Optional) @@ -3076,7 +3076,7 @@ The following arguments are supported: The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client. -The `http_filter_configs` block supports: +The `http_filter_configs` block supports: * `filter_name` - (Optional) @@ -3093,7 +3093,7 @@ The following arguments are supported: The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl -The `http_filter_metadata` block supports: +The `http_filter_metadata` block supports: * `filter_name` - (Optional) @@ -3110,7 +3110,7 @@ The following arguments are supported: The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl -The `default_url_redirect` block supports: +The `default_url_redirect` block supports: * `host_redirect` - (Optional) @@ -3158,7 +3158,7 @@ The following arguments are supported: retained. This field is required to ensure an empty block is not set. The normal default value is false. -The `default_route_action` block supports: +The `default_route_action` block supports: * `weighted_backend_services` - (Optional) @@ -3169,19 +3169,19 @@ The following arguments are supported: Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services). * `url_rewrite` - (Optional) The spec to modify the URL of the request, prior to forwarding the request to the matched service. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_url_rewrite). + Structure is [documented below](#nested_path_matcher_default_route_action_url_rewrite). * `timeout` - (Optional) Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_timeout). + Structure is [documented below](#nested_path_matcher_default_route_action_timeout). * `max_stream_duration` - (Optional) @@ -3190,25 +3190,25 @@ The following arguments are supported: has been fully processed (known as end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been processed, including all retries. A stream that does not complete in this duration is closed. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_max_stream_duration). + Structure is [documented below](#nested_path_matcher_default_route_action_max_stream_duration). * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_retry_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_retry_policy). * `request_mirror_policy` - (Optional) Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_request_mirror_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_request_mirror_policy). * `cors_policy` - (Optional) The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_cors_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_cors_policy). * `fault_injection_policy` - (Optional) @@ -3217,10 +3217,10 @@ The following arguments are supported: percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy). -The `weighted_backend_services` block supports: +The `weighted_backend_services` block supports: * `backend_service` - (Optional) @@ -3243,10 +3243,10 @@ The following arguments are supported: the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services_header_action). -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_remove` - (Optional) @@ -3256,7 +3256,7 @@ The following arguments are supported: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services_header_action_request_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -3266,10 +3266,10 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_path_matcher_default_route_action_weighted_backend_services_header_action_response_headers_to_add). -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Optional) @@ -3284,7 +3284,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Optional) @@ -3299,7 +3299,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `path_prefix_rewrite` - (Optional) @@ -3313,7 +3313,7 @@ The following arguments are supported: with contents of hostRewrite. The value must be between 1 and 255 characters. -The `timeout` block supports: +The `timeout` block supports: * `seconds` - (Optional) @@ -3325,7 +3325,7 @@ The following arguments are supported: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. -The `max_stream_duration` block supports: +The `max_stream_duration` block supports: * `nanos` - (Optional) @@ -3337,7 +3337,7 @@ The following arguments are supported: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years -The `retry_policy` block supports: +The `retry_policy` block supports: * `retry_conditions` - (Optional) @@ -3366,10 +3366,10 @@ The following arguments are supported: Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_retry_policy_per_try_timeout). + Structure is [documented below](#nested_path_matcher_default_route_action_retry_policy_per_try_timeout). -The `per_try_timeout` block supports: +The `per_try_timeout` block supports: * `seconds` - (Optional) @@ -3381,7 +3381,7 @@ The following arguments are supported: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. -The `request_mirror_policy` block supports: +The `request_mirror_policy` block supports: * `backend_service` - (Required) @@ -3392,7 +3392,7 @@ The following arguments are supported: The percentage of requests to be mirrored to backendService. The value must be between 0.0 and 100.0 inclusive. -The `cors_policy` block supports: +The `cors_policy` block supports: * `allow_origins` - (Optional) @@ -3431,25 +3431,25 @@ The following arguments are supported: (Optional) If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `delay` - (Optional) The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy_delay). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy_delay). * `abort` - (Optional) The specification for how client requests are aborted as part of fault injection. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy_abort). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy_abort). -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Optional) Specifies the value of the fixed delay interval. - Structure is [documented below](#nested_path_matcher_path_matcher_default_route_action_fault_injection_policy_delay_fixed_delay). + Structure is [documented below](#nested_path_matcher_default_route_action_fault_injection_policy_delay_fixed_delay). * `percentage` - (Optional) @@ -3457,7 +3457,7 @@ The following arguments are supported: The value must be between 0.0 and 100.0 inclusive. -The `fixed_delay` block supports: +The `fixed_delay` block supports: * `seconds` - (Optional) @@ -3469,7 +3469,7 @@ The following arguments are supported: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. -The `abort` block supports: +The `abort` block supports: * `http_status` - (Optional) @@ -3540,7 +3540,7 @@ The following arguments are supported: * `headers` - (Optional) HTTP headers for this request. - Structure is [documented below](#nested_test_test_headers). + Structure is [documented below](#nested_test_headers). * `service` - (Optional) @@ -3559,7 +3559,7 @@ The following arguments are supported: expectedRedirectResponseCode cannot be set when service is set. -The `headers` block supports: +The `headers` block supports: * `name` - (Required) @@ -3702,10 +3702,10 @@ The following arguments are supported: the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. - Structure is [documented below](#nested_default_route_action_weighted_backend_services_weighted_backend_services_header_action). + Structure is [documented below](#nested_default_route_action_weighted_backend_services_header_action). -The `header_action` block supports: +The `header_action` block supports: * `request_headers_to_remove` - (Optional) @@ -3715,7 +3715,7 @@ The following arguments are supported: * `request_headers_to_add` - (Optional) Headers to add to a matching request prior to forwarding the request to the backendService. - Structure is [documented below](#nested_default_route_action_weighted_backend_services_weighted_backend_services_header_action_request_headers_to_add). + Structure is [documented below](#nested_default_route_action_weighted_backend_services_header_action_request_headers_to_add). * `response_headers_to_remove` - (Optional) @@ -3725,10 +3725,10 @@ The following arguments are supported: * `response_headers_to_add` - (Optional) Headers to add the response prior to sending the response back to the client. - Structure is [documented below](#nested_default_route_action_weighted_backend_services_weighted_backend_services_header_action_response_headers_to_add). + Structure is [documented below](#nested_default_route_action_weighted_backend_services_header_action_response_headers_to_add). -The `request_headers_to_add` block supports: +The `request_headers_to_add` block supports: * `header_name` - (Optional) @@ -3743,7 +3743,7 @@ The following arguments are supported: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. -The `response_headers_to_add` block supports: +The `response_headers_to_add` block supports: * `header_name` - (Optional) diff --git a/website/docs/r/compute_wire_group.html.markdown b/website/docs/r/compute_wire_group.html.markdown index d633bb433ee..bcfddc7d26f 100644 --- a/website/docs/r/compute_wire_group.html.markdown +++ b/website/docs/r/compute_wire_group.html.markdown @@ -23,12 +23,10 @@ description: |- The WireGroup resource represents a group of redundant wires between interconnects in two different metros. Each WireGroup belongs to a CrossSiteNetwork. A wire group defines endpoints and the wires which exist between them. -~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. -See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. To get more information about WireGroup, see: -* [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/wireGroups) +* [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/wireGroups) * How-to Guides * [Create a WireGroup](https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cross-site/modify-network#add-wire-group) @@ -37,20 +35,47 @@ To get more information about WireGroup, see: ```hcl data "google_project" "project" { -provider = google-beta } resource "google_compute_cross_site_network" "example-cross-site-network" { name = "test-cross-site-network" description = "Example cross site network" - provider = google-beta } resource "google_compute_wire_group" "example-test-wire-group" { name = "test-wire-group" description = "Example Wire Group" cross_site_network = "test-cross-site-network" - provider = google-beta + depends_on = [ + google_compute_cross_site_network.example-cross-site-network + ] + wire_properties { + bandwidth_unmetered = 10 + fault_response = "NONE" + bandwidth_allocation = "ALLOCATE_PER_WIRE" + } + admin_enabled = true +} +``` +## Example Usage - Compute Wire Group Basic Beta + + +```hcl +data "google_project" "project" { +provider = "google-beta" +} + +resource "google_compute_cross_site_network" "example-cross-site-network" { + provider = "google-beta" + name = "test-cross-site-network-beta" + description = "Example cross site network" +} + +resource "google_compute_wire_group" "example-test-wire-group-beta" { + provider = "google-beta" + name = "test-wire-group-beta" + description = "Example Wire Group Beta" + cross_site_network = "test-cross-site-network-beta" depends_on = [ google_compute_cross_site_network.example-cross-site-network ] @@ -98,7 +123,7 @@ The following arguments are supported: Indicates whether the wire group is administratively enabled. * `wire_group_properties` - - (Optional) + (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) Properties specific to the wire group. Structure is [documented below](#nested_wire_group_properties). @@ -118,10 +143,10 @@ The following arguments are supported: * `interconnects` - (Optional) - Structure is [documented below](#nested_endpoints_endpoints_interconnects). + Structure is [documented below](#nested_endpoints_interconnects). -The `interconnects` block supports: +The `interconnects` block supports: * `interconnect_name` - (Required) The identifier for this object. Format specified above. @@ -186,18 +211,18 @@ In addition to the arguments listed above, the following computed attributes are * `endpoints` - (Output) 'Wire endpoints are specific Interconnect connections.' - Structure is [documented below](#nested_wires_wires_endpoints). + Structure is [documented below](#nested_wires_endpoints). * `wire_properties` - (Output) A nested object resource. - Structure is [documented below](#nested_wires_wires_wire_properties). + Structure is [documented below](#nested_wires_wire_properties). * `admin_enabled` - (Output) -The `endpoints` block contains: +The `endpoints` block contains: * `interconnect` - (Output) @@ -205,7 +230,7 @@ In addition to the arguments listed above, the following computed attributes are * `vlan_tag` - (Output) -The `wire_properties` block contains: +The `wire_properties` block contains: * `bandwidth_unmetered` - (Output) diff --git a/website/docs/r/container_cluster.html.markdown b/website/docs/r/container_cluster.html.markdown index dc7ff1a7252..d2fa1b4b600 100644 --- a/website/docs/r/container_cluster.html.markdown +++ b/website/docs/r/container_cluster.html.markdown @@ -1166,7 +1166,7 @@ sole_tenant_config { * `data_cache_count` (Optional) - Number of raw-block local NVMe SSD disks to be attached to the node utilized for GKE Data Cache. If zero, then GKE Data Cache will not be enabled in the nodes. -The `fast_socket` block supports: +The `fast_socket` block supports: * `enabled` (Required) - Whether or not the NCCL Fast Socket is enabled @@ -1242,7 +1242,7 @@ Structure is [documented below](#nested_node_kubelet_config). * `network_tags` (Optional) - The network tag config for the cluster's automatically provisioned node pools. Structure is [documented below](#nested_network_tags). -* `linux_node_config` (Optional) - Linux system configuration for the cluster's automatically provisioned node pools. Only `cgroup_mode` field is supported in `node_pool_auto_config`. Structure is [documented below](#nested_linux_node_config). +* `linux_node_config` (Optional) - Linux system configuration for the cluster's automatically provisioned node pools. Only `cgroup_mode` and `node_kernel_module_loading` fields are supported in `node_pool_auto_config`. Structure is [documented below](#nested_linux_node_config). The `node_kubelet_config` block supports: @@ -1325,7 +1325,7 @@ notification_config { The `rotation_config` block supports: * `enabled` (Optional) - Enable the roation in Secret Manager add-on for this cluster. -* `rotation_interval` (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html)) - The interval between two consecutive rotations. Default rotation interval is 2 minutes. +* `rotation_interval` (Optional) - The interval between two consecutive rotations. Default rotation interval is 2 minutes. The `secret_sync_config` block supports: @@ -1622,6 +1622,8 @@ linux_node_config { * `hugepages_config` - (Optional) Amounts for 2M and 1G hugepages. Structure is [documented below](#nested_hugepages_config). +* `node_kernel_module_loading` - (Optional) Settings for kernel module loading. Structure is [documented below](#nested_node_kernel_module_loading_config). + The `hugepages_config` block supports: * `hugepage_size_2m` - (Optional) Amount of 2M hugepages. @@ -1644,6 +1646,14 @@ linux_node_config { * `TRANSPARENT_HUGEPAGE_DEFRAG_NEVER`: An application will never enter direct reclaim or compaction. * `TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED`: Default value. GKE will not modify the kernel configuration. +The `node_kernel_module_loading` block supports: + +* `policy` - (Optional) Possible kernel module loading policies. + Accepted values are: + * `POLICY_UNSPECIFIED`: Default if unset. GKE selects the image based on node type. For CPU and TPU nodes, the image will not allow loading external kernel modules. For GPU nodes, the image will allow loading any module, whether it is signed or not. + * `ENFORCE_SIGNED_MODULES`: Enforced signature verification: Node pools will use a Container-Optimized OS image configured to allow loading of *Google-signed* external kernel modules. Loadpin is enabled but configured to exclude modules, and kernel module signature checking is enforced. + * `DO_NOT_ENFORCE_SIGNED_MODULES`: Mirrors existing DEFAULT behavior: For CPU and TPU nodes, the image will not allow loading external kernel modules. For GPU nodes, the image will allow loading any module, whether it is signed or not. + The `containerd_config` block supports: * `private_registry_access_config` (Optional) - Configuration for private container registries. There are two fields in this config: @@ -1668,6 +1678,41 @@ linux_node_config { * `enabled` (Required) - Whether writable cgroups are enabled. +* `registry_hosts` (Optional) - Defines containerd registry host configuration. Each `registry_hosts` entry represents a `hosts.toml` file. See [customize containerd configuration in GKE nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/customize-containerd-configuration#registryHosts) for more detail. Example: + ```hcl +registry_hosts { + server = "REGISTRY_SERVER_FQDN" + hosts { + host = "MIRROR_FQDN" + capabilities = [ + "HOST_CAPABILITY_PULL", + "HOST_CAPABILITY_RESOLVE", + "HOST_CAPABILITY_PUSH", + ] + override_path = false + dial_timeout = "30s" + header { + key = "HEADER_KEY" + value = [ + "HEADER_VALUE_1", + "HEADER_VALUE_2", + ] + } + ca { + gcp_secret_manager_secret_uri = "projects/PROJECT_ID_OR_NUMBER/secrets/CA_SECRET/versions/VERSION" + } + client { + cert { + gcp_secret_manager_secret_uri = "projects/PROJECT_ID_OR_NUMBER/secrets/CLIENT_CERT_SECRET/versions/VERSION" + } + key { + gcp_secret_manager_secret_uri = "projects/PROJECT_ID_OR_NUMBER/secrets/CLIENT_KEY_SECRET/versions/VERSION" + } + } + } +} + ``` + The `vertical_pod_autoscaling` block supports: * `enabled` (Required) - Enables vertical pod autoscaling diff --git a/website/docs/r/data_catalog_tag_template.html.markdown b/website/docs/r/data_catalog_tag_template.html.markdown index f81f43bd141..a59d0369089 100644 --- a/website/docs/r/data_catalog_tag_template.html.markdown +++ b/website/docs/r/data_catalog_tag_template.html.markdown @@ -136,7 +136,7 @@ The following arguments are supported: * `type` - (Required) The type of value this tag field can contain. - Structure is [documented below](#nested_fields_field_type). + Structure is [documented below](#nested_fields_type). * `is_required` - (Optional) @@ -149,7 +149,7 @@ The following arguments are supported: Multiple fields can have the same order, and field orders within a tag do not have to be sequential. -The `type` block supports: +The `type` block supports: * `primitive_type` - (Optional) @@ -161,10 +161,10 @@ The following arguments are supported: (Optional) Represents an enum type. Exactly one of `primitive_type` or `enum_type` must be set - Structure is [documented below](#nested_fields_field_type_enum_type). + Structure is [documented below](#nested_fields_type_enum_type). -The `enum_type` block supports: +The `enum_type` block supports: * `allowed_values` - (Required) @@ -173,10 +173,10 @@ The following arguments are supported: enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. - Structure is [documented below](#nested_fields_field_type_enum_type_allowed_values). + Structure is [documented below](#nested_fields_type_enum_type_allowed_values). -The `allowed_values` block supports: +The `allowed_values` block supports: * `display_name` - (Required) diff --git a/website/docs/r/data_fusion_instance_iam.html.markdown b/website/docs/r/data_fusion_instance_iam.html.markdown index 8220cca3196..be232ae95ea 100644 --- a/website/docs/r/data_fusion_instance_iam.html.markdown +++ b/website/docs/r/data_fusion_instance_iam.html.markdown @@ -128,9 +128,9 @@ exported: For all import syntaxes, the "resource in question" can take any of the following forms: -* projects/{{project}}/locations/{{location}}/instances/{{name}} -* {{project}}/{{location}}/{{name}} -* {{location}}/{{name}} +* projects/{{project}}/locations/{{region}}/instances/{{name}} +* {{project}}/{{region}}/{{name}} +* {{region}}/{{name}} * {{name}} Any variables not passed in the import command will be taken from the provider configuration. @@ -139,17 +139,17 @@ Cloud Data Fusion instance IAM resources can be imported using the resource iden IAM member imports use space-delimited identifiers: the resource in question, the role, and the member identity, e.g. ``` -$ terraform import google_data_fusion_instance_iam_member.editor "projects/{{project}}/locations/{{location}}/instances/{{instance}} roles/viewer user:jane@example.com" +$ terraform import google_data_fusion_instance_iam_member.editor "projects/{{project}}/locations/{{region}}/instances/{{instance}} roles/viewer user:jane@example.com" ``` IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g. ``` -$ terraform import google_data_fusion_instance_iam_binding.editor "projects/{{project}}/locations/{{location}}/instances/{{instance}} roles/viewer" +$ terraform import google_data_fusion_instance_iam_binding.editor "projects/{{project}}/locations/{{region}}/instances/{{instance}} roles/viewer" ``` IAM policy imports use the identifier of the resource in question, e.g. ``` -$ terraform import google_data_fusion_instance_iam_policy.editor projects/{{project}}/locations/{{location}}/instances/{{instance}} +$ terraform import google_data_fusion_instance_iam_policy.editor projects/{{project}}/locations/{{region}}/instances/{{instance}} ``` -> **Custom Roles** If you're importing a IAM resource with a custom role, make sure to use the diff --git a/website/docs/r/data_loss_prevention_deidentify_template.html.markdown b/website/docs/r/data_loss_prevention_deidentify_template.html.markdown index f637a6ab050..d1ef3af30b9 100644 --- a/website/docs/r/data_loss_prevention_deidentify_template.html.markdown +++ b/website/docs/r/data_loss_prevention_deidentify_template.html.markdown @@ -31,7 +31,7 @@ To get more information about DeidentifyTemplate, see: * [Official Documentation](https://cloud.google.com/dlp/docs/concepts-templates) ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `deidentify_config.record_transformations.field_transformations.field_transformations.info_type_transformations.transformations.transformations.primitive_transformation.crypto_replace_ffx_fpe_config.crypto_key.unwrapped.key`, `deidentify_config.record_transformations.field_transformations.field_transformations.info_type_transformations.transformations.transformations.primitive_transformation.crypto_hash_config.crypto_key.unwrapped.key`, `deidentify_config.record_transformations.field_transformations.field_transformations.info_type_transformations.transformations.transformations.primitive_transformation.date_shift_config.crypto_key.unwrapped.key`, `deidentify_config.record_transformations.field_transformations.field_transformations.info_type_transformations.transformations.transformations.primitive_transformation.crypto_deterministic_config.crypto_key.unwrapped.key`. +values will be stored in the raw state as plain text: `deidentify_config.record_transformations.field_transformations.info_type_transformations.transformations.primitive_transformation.crypto_replace_ffx_fpe_config.crypto_key.unwrapped.key`, `deidentify_config.record_transformations.field_transformations.info_type_transformations.transformations.primitive_transformation.crypto_hash_config.crypto_key.unwrapped.key`, `deidentify_config.record_transformations.field_transformations.info_type_transformations.transformations.primitive_transformation.date_shift_config.crypto_key.unwrapped.key`, `deidentify_config.record_transformations.field_transformations.info_type_transformations.transformations.primitive_transformation.crypto_deterministic_config.crypto_key.unwrapped.key`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data). ## Example Usage - Dlp Deidentify Template Basic @@ -238,12 +238,12 @@ The following arguments are supported: * `redaction_color` - (Optional) The color to use when redacting content from an image. If not specified, the default is black. - Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_transforms_redaction_color). + Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_redaction_color). * `selected_info_types` - (Optional) Apply transformation to the selected infoTypes. - Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_transforms_selected_info_types). + Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_selected_info_types). * `all_info_types` - (Optional) @@ -254,7 +254,7 @@ The following arguments are supported: Apply transformation to all text that doesn't match an infoType. -The `redaction_color` block supports: +The `redaction_color` block supports: * `red` - (Optional) @@ -268,16 +268,16 @@ The following arguments are supported: (Optional) The amount of green in the color as a value in the interval [0, 1]. -The `selected_info_types` block supports: +The `selected_info_types` block supports: * `info_types` - (Required) InfoTypes to apply the transformation to. Leaving this empty will apply the transformation to apply to all findings that correspond to infoTypes that were requested in InspectConfig. - Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_transforms_selected_info_types_info_types). + Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_selected_info_types_info_types). -The `info_types` block supports: +The `info_types` block supports: * `name` - (Required) @@ -290,10 +290,10 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_transforms_selected_info_types_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_image_transformations_transforms_selected_info_types_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) @@ -314,16 +314,16 @@ The following arguments are supported: (Optional) InfoTypes to apply the transformation to. Leaving this empty will apply the transformation to apply to all findings that correspond to infoTypes that were requested in InspectConfig. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_info_types). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_info_types). * `primitive_transformation` - (Required) Primitive transformation to apply to the infoType. The `primitive_transformation` block must only contain one argument, corresponding to the type of transformation. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation). -The `info_types` block supports: +The `info_types` block supports: * `name` - (Required) @@ -336,22 +336,22 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `primitive_transformation` block supports: +The `primitive_transformation` block supports: * `replace_config` - (Optional) Replace each input value with a given value. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_replace_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_replace_config). * `replace_with_info_type_config` - (Optional) @@ -361,28 +361,28 @@ The following arguments are supported: (Optional) Partially mask a string by replacing a given number of characters with a fixed character. Masking can start from the beginning or end of the string. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_character_mask_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_character_mask_config). * `crypto_deterministic_config` - (Optional) Pseudonymization method that generates deterministic encryption for the given input. Outputs a base64 encoded representation of the encrypted output. Uses AES-SIV based on the RFC [https://tools.ietf.org/html/rfc5297](https://tools.ietf.org/html/rfc5297). - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config). * `crypto_replace_ffx_fpe_config` - (Optional) Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the `content.reidentify` API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See [https://cloud.google.com/dlp/docs/pseudonymization](https://cloud.google.com/dlp/docs/pseudonymization) to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config). * `replace_dictionary_config` - (Optional) Replace with a value randomly drawn (with replacement) from a dictionary. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_replace_dictionary_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_replace_dictionary_config). * `date_shift_config` - (Optional) Shifts dates by random number of days, with option to be consistent for the same context. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_date_shift_config). * `fixed_size_bucketing_config` - (Optional) @@ -391,7 +391,7 @@ The following arguments are supported: This can be used on data of type: double, long. If the bound Value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_fixed_size_bucketing_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_fixed_size_bucketing_config). * `bucketing_config` - (Optional) @@ -399,12 +399,12 @@ The following arguments are supported: This can be used on data of type: number, long, string, timestamp. If the provided value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config). * `time_part_config` - (Optional) For use with Date, Timestamp, and TimeOfDay, extract or preserve a portion of the value. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_time_part_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_time_part_config). * `redact_config` - (Optional) @@ -416,19 +416,19 @@ The following arguments are supported: Outputs a base64 encoded representation of the hashed output (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string and integer values can be hashed. See https://cloud.google.com/dlp/docs/pseudonymization to learn more. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_hash_config). -The `replace_config` block supports: +The `replace_config` block supports: * `new_value` - (Required) Replace each input value with a given value. The `new_value` block must only contain one argument. For example when replacing the contents of a string-type field, only `string_value` should be set. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_replace_config_new_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_replace_config_new_value). -The `new_value` block supports: +The `new_value` block supports: * `integer_value` - (Optional) @@ -454,12 +454,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_replace_config_new_value_time_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_replace_config_new_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_replace_config_new_value_date_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_replace_config_new_value_date_value). * `day_of_week_value` - (Optional) @@ -467,7 +467,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -485,7 +485,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -500,7 +500,7 @@ The following arguments are supported: Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -The `character_mask_config` block supports: +The `character_mask_config` block supports: * `masking_character` - (Optional) @@ -520,10 +520,10 @@ The following arguments are supported: * `characters_to_ignore` - (Optional) Characters to skip when doing de-identification of a value. These will be left alone and skipped. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_character_mask_config_characters_to_ignore). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_character_mask_config_characters_to_ignore). -The `characters_to_ignore` block supports: +The `characters_to_ignore` block supports: * `characters_to_skip` - (Optional) @@ -534,12 +534,12 @@ The following arguments are supported: Common characters to not transform when masking. Useful to avoid removing punctuation. Possible values are: `NUMERIC`, `ALPHA_UPPER_CASE`, `ALPHA_LOWER_CASE`, `PUNCTUATION`, `WHITESPACE`. -The `crypto_deterministic_config` block supports: +The `crypto_deterministic_config` block supports: * `crypto_key` - (Optional) The key used by the encryption function. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key). * `surrogate_info_type` - (Optional) @@ -551,7 +551,7 @@ The following arguments are supported: * reverse a surrogate that does not correspond to an actual identifier * be unable to parse the surrogate and result in an error Therefore, choose your custom info type name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type). * `context` - (Optional) @@ -561,20 +561,20 @@ The following arguments are supported: 2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an `InfoTypeTransformation` is applied to both structured and non-structured `ContentItem`s. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_context). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_context). -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -582,23 +582,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -609,7 +609,7 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `surrogate_info_type` block supports: +The `surrogate_info_type` block supports: * `name` - (Optional) @@ -622,28 +622,28 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `context` block supports: +The `context` block supports: * `name` - (Optional) Name describing the field. -The `crypto_replace_ffx_fpe_config` block supports: +The `crypto_replace_ffx_fpe_config` block supports: * `crypto_key` - (Optional) The key used by the encryption algorithm. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key). * `context` - (Optional) @@ -656,7 +656,7 @@ The following arguments are supported: The tweak is constructed as a sequence of bytes in big endian byte order such that: * a 64 bit integer is encoded followed by a single byte of value 1 * a string is encoded in UTF-8 format followed by a single byte of value 2 - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_context). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_context). * `surrogate_info_type` - (Optional) @@ -664,7 +664,7 @@ The following arguments are supported: For example, if the name of custom infoType is 'MY\_TOKEN\_INFO\_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY\_TOKEN\_INFO\_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type). * `common_alphabet` - (Optional) @@ -681,17 +681,17 @@ The following arguments are supported: The native way to select the alphabet. Must be in the range \[2, 95\]. -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -699,23 +699,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -726,13 +726,13 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `context` block supports: +The `context` block supports: * `name` - (Optional) Name describing the field. -The `surrogate_info_type` block supports: +The `surrogate_info_type` block supports: * `name` - (Optional) @@ -745,42 +745,42 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `replace_dictionary_config` block supports: +The `replace_dictionary_config` block supports: * `word_list` - (Required) A list of words to select from for random replacement. The [limits](https://cloud.google.com/dlp/limits) page contains details about the size limits of dictionaries. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_replace_dictionary_config_word_list). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_replace_dictionary_config_word_list). -The `word_list` block supports: +The `word_list` block supports: * `words` - (Required) Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. -The `date_shift_config` block supports: +The `date_shift_config` block supports: * `context` - (Optional) Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_context). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_date_shift_config_context). * `crypto_key` - (Optional) The key used by the encryption function. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key). * `upper_bound_days` - (Required) @@ -792,23 +792,23 @@ The following arguments are supported: Range of shift in days. Negative means shift to earlier in time. -The `context` block supports: +The `context` block supports: * `name` - (Required) Name describing the field. -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -816,23 +816,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -843,21 +843,21 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `fixed_size_bucketing_config` block supports: +The `fixed_size_bucketing_config` block supports: * `lower_bound` - (Required) Lower bound value of buckets. All values less than lower_bound are grouped together into a single bucket; for example if lower_bound = 10, then all values less than 10 are replaced with the value "-10". The `lower_bound` block must only contain one argument. See the `fixed_size_bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound). * `upper_bound` - (Required) Upper bound value of buckets. All values greater than upper_bound are grouped together into a single bucket; for example if upper_bound = 89, then all values greater than 89 are replaced with the value "89+". The `upper_bound` block must only contain one argument. See the `fixed_size_bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound). * `bucket_size` - (Required) @@ -866,7 +866,7 @@ The following arguments are supported: Precision up to 2 decimals works. -The `lower_bound` block supports: +The `lower_bound` block supports: * `integer_value` - (Optional) @@ -876,7 +876,7 @@ The following arguments are supported: (Optional) A float value. -The `upper_bound` block supports: +The `upper_bound` block supports: * `integer_value` - (Optional) @@ -886,37 +886,37 @@ The following arguments are supported: (Optional) A float value. -The `bucketing_config` block supports: +The `bucketing_config` block supports: * `buckets` - (Optional) Set of buckets. Ranges must be non-overlapping. Bucket is represented as a range, along with replacement values. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets). -The `buckets` block supports: +The `buckets` block supports: * `min` - (Optional) Lower bound of the range, inclusive. Type should be the same as max if used. The `min` block must only contain one argument. See the `bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_min). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_min). * `max` - (Optional) Upper bound of the range, exclusive; type must match min. The `max` block must only contain one argument. See the `bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_max). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_max). * `replacement_value` - (Required) Replacement value for this bucket. The `replacement_value` block must only contain one argument. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_replacement_value). -The `min` block supports: +The `min` block supports: * `integer_value` - (Optional) @@ -937,12 +937,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_min_time_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_min_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_min_date_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_min_date_value). * `day_of_week_value` - (Optional) @@ -950,7 +950,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -968,7 +968,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -982,7 +982,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `max` block supports: +The `max` block supports: * `integer_value` - (Optional) @@ -1003,12 +1003,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_max_time_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_max_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_max_date_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_max_date_value). * `day_of_week_value` - (Optional) @@ -1016,7 +1016,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1034,7 +1034,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1048,7 +1048,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `replacement_value` block supports: +The `replacement_value` block supports: * `integer_value` - (Optional) @@ -1069,12 +1069,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value_time_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_replacement_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value_date_value). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_replacement_value_date_value). * `day_of_week_value` - (Optional) @@ -1082,7 +1082,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1100,7 +1100,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1114,32 +1114,32 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `time_part_config` block supports: +The `time_part_config` block supports: * `part_to_extract` - (Optional) The part of the time to keep. Possible values are: `YEAR`, `MONTH`, `DAY_OF_MONTH`, `DAY_OF_WEEK`, `WEEK_OF_YEAR`, `HOUR_OF_DAY`. -The `crypto_hash_config` block supports: +The `crypto_hash_config` block supports: * `crypto_key` - (Optional) The key used by the encryption function. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key). -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -1147,23 +1147,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -1193,7 +1193,7 @@ The following arguments are supported: (Required) Input field(s) to apply the transformation to. When you have columns that reference their position within a list, omit the index from the FieldId. FieldId name matching ignores the index. For example, instead of "contact.nums[0].type", use "contact.nums.type". - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_fields). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_fields). * `condition` - (Optional) @@ -1201,37 +1201,37 @@ The following arguments are supported: Example Use Cases: - Apply a different bucket transformation to an age column if the zip code column for the same record is within a specific range. - Redact a field if the date of birth field is greater than 85. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition). * `primitive_transformation` - (Optional) Apply the transformation to the entire field. The `primitive_transformation` block must only contain one argument, corresponding to the type of transformation. Only one of `primitive_transformation` or `info_type_transformations` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation). * `info_type_transformations` - (Optional) Treat the contents of the field as free text, and selectively transform content that matches an InfoType. Only one of `primitive_transformation` or `info_type_transformations` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations). -The `fields` block supports: +The `fields` block supports: * `name` - (Optional) Name describing the field. -The `condition` block supports: +The `condition` block supports: * `expressions` - (Optional) An expression. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition_expressions). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition_expressions). -The `expressions` block supports: +The `expressions` block supports: * `logical_operator` - (Optional) @@ -1242,23 +1242,23 @@ The following arguments are supported: * `conditions` - (Optional) Conditions to apply to the expression. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition_expressions_conditions). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition_expressions_conditions). -The `conditions` block supports: +The `conditions` block supports: * `conditions` - (Optional) A collection of conditions. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition_expressions_conditions_conditions). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition_expressions_conditions_conditions). -The `conditions` block supports: +The `conditions` block supports: * `field` - (Required) Field within the record this condition is evaluated against. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition_expressions_conditions_conditions_conditions_field). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition_expressions_conditions_conditions_field). * `operator` - (Required) @@ -1270,16 +1270,16 @@ The following arguments are supported: Value to compare against. The `value` block must only contain one argument. For example when a condition is evaluated against a string-type field, only `string_value` should be set. This argument is mandatory, except for conditions using the `EXISTS` operator. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition_expressions_conditions_conditions_conditions_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition_expressions_conditions_conditions_value). -The `field` block supports: +The `field` block supports: * `name` - (Optional) Name describing the field. -The `value` block supports: +The `value` block supports: * `integer_value` - (Optional) @@ -1304,12 +1304,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition_expressions_conditions_conditions_conditions_value_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition_expressions_conditions_conditions_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_condition_expressions_conditions_conditions_conditions_value_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_condition_expressions_conditions_conditions_value_date_value). * `day_of_week_value` - (Optional) @@ -1317,7 +1317,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1335,7 +1335,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1349,12 +1349,12 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `primitive_transformation` block supports: +The `primitive_transformation` block supports: * `replace_config` - (Optional) Replace with a specified value. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_replace_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_replace_config). * `redact_config` - (Optional) @@ -1363,13 +1363,13 @@ The following arguments are supported: * `character_mask_config` - (Optional) Partially mask a string by replacing a given number of characters with a fixed character. Masking can start from the beginning or end of the string. This can be used on data of any type (numbers, longs, and so on) and when de-identifying structured data we'll attempt to preserve the original data's type. (This allows you to take a long like 123 and modify it to a string like **3). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_character_mask_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_character_mask_config). * `crypto_replace_ffx_fpe_config` - (Optional) Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the `content.reidentify` API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See [https://cloud.google.com/dlp/docs/pseudonymization](https://cloud.google.com/dlp/docs/pseudonymization) to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config). * `fixed_size_bucketing_config` - (Optional) @@ -1378,7 +1378,7 @@ The following arguments are supported: This can be used on data of type: double, long. If the bound Value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config). * `bucketing_config` - (Optional) @@ -1386,12 +1386,12 @@ The following arguments are supported: This can be used on data of type: number, long, string, timestamp. If the provided value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config). * `time_part_config` - (Optional) For use with Date, Timestamp, and TimeOfDay, extract or preserve a portion of the value. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_time_part_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_time_part_config). * `crypto_hash_config` - (Optional) @@ -1399,34 +1399,34 @@ The following arguments are supported: Outputs a base64 encoded representation of the hashed output (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string and integer values can be hashed. See https://cloud.google.com/dlp/docs/pseudonymization to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_hash_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_hash_config). * `date_shift_config` - (Optional) Shifts dates by random number of days, with option to be consistent for the same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_date_shift_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_date_shift_config). * `crypto_deterministic_config` - (Optional) Pseudonymization method that generates deterministic encryption for the given input. Outputs a base64 encoded representation of the encrypted output. Uses AES-SIV based on the RFC [https://tools.ietf.org/html/rfc5297](https://tools.ietf.org/html/rfc5297). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config). * `replace_dictionary_config` - (Optional) Replace with a value randomly drawn (with replacement) from a dictionary. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_replace_dictionary_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_replace_dictionary_config). -The `replace_config` block supports: +The `replace_config` block supports: * `new_value` - (Required) Replace each input value with a given value. The `new_value` block must only contain one argument. For example when replacing the contents of a string-type field, only `string_value` should be set. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_replace_config_new_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_replace_config_new_value). -The `new_value` block supports: +The `new_value` block supports: * `integer_value` - (Optional) @@ -1451,12 +1451,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_replace_config_new_value_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_replace_config_new_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_replace_config_new_value_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_replace_config_new_value_date_value). * `day_of_week_value` - (Optional) @@ -1464,7 +1464,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1482,7 +1482,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1496,7 +1496,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `character_mask_config` block supports: +The `character_mask_config` block supports: * `masking_character` - (Optional) @@ -1523,10 +1523,10 @@ The following arguments are supported: * `characters_to_ignore` - (Optional) Characters to skip when doing de-identification of a value. These will be left alone and skipped. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_character_mask_config_characters_to_ignore). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_character_mask_config_characters_to_ignore). -The `characters_to_ignore` block supports: +The `characters_to_ignore` block supports: * `characters_to_skip` - (Optional) @@ -1537,12 +1537,12 @@ The following arguments are supported: Common characters to not transform when masking. Useful to avoid removing punctuation. Possible values are: `NUMERIC`, `ALPHA_UPPER_CASE`, `ALPHA_LOWER_CASE`, `PUNCTUATION`, `WHITESPACE`. -The `crypto_replace_ffx_fpe_config` block supports: +The `crypto_replace_ffx_fpe_config` block supports: * `crypto_key` - (Optional) The key used by the encryption algorithm. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key). * `context` - (Optional) @@ -1555,7 +1555,7 @@ The following arguments are supported: The tweak is constructed as a sequence of bytes in big endian byte order such that: * a 64 bit integer is encoded followed by a single byte of value 1 * a string is encoded in UTF-8 format followed by a single byte of value 2 - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_context). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_context). * `surrogate_info_type` - (Optional) @@ -1563,7 +1563,7 @@ The following arguments are supported: For example, if the name of custom infoType is 'MY\_TOKEN\_INFO\_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY\_TOKEN\_INFO\_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type). * `common_alphabet` - (Optional) @@ -1580,17 +1580,17 @@ The following arguments are supported: The native way to select the alphabet. Must be in the range \[2, 95\]. -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -1598,23 +1598,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -1625,13 +1625,13 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `context` block supports: +The `context` block supports: * `name` - (Optional) Name describing the field. -The `surrogate_info_type` block supports: +The `surrogate_info_type` block supports: * `name` - (Optional) @@ -1644,31 +1644,31 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `fixed_size_bucketing_config` block supports: +The `fixed_size_bucketing_config` block supports: * `lower_bound` - (Required) Lower bound value of buckets. All values less than lower_bound are grouped together into a single bucket; for example if lower_bound = 10, then all values less than 10 are replaced with the value "-10". The `lower_bound` block must only contain one argument. See the `fixed_size_bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound). * `upper_bound` - (Required) Upper bound value of buckets. All values greater than upper_bound are grouped together into a single bucket; for example if upper_bound = 89, then all values greater than 89 are replaced with the value "89+". The `upper_bound` block must only contain one argument. See the `fixed_size_bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound). * `bucket_size` - (Required) @@ -1677,7 +1677,7 @@ The following arguments are supported: Precision up to 2 decimals works. -The `lower_bound` block supports: +The `lower_bound` block supports: * `integer_value` - (Optional) @@ -1702,12 +1702,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound_date_value). * `day_of_week_value` - (Optional) @@ -1715,7 +1715,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1733,7 +1733,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1747,7 +1747,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `upper_bound` block supports: +The `upper_bound` block supports: * `integer_value` - (Optional) @@ -1772,12 +1772,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound_date_value). * `day_of_week_value` - (Optional) @@ -1785,7 +1785,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1803,7 +1803,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1817,37 +1817,37 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `bucketing_config` block supports: +The `bucketing_config` block supports: * `buckets` - (Optional) Set of buckets. Ranges must be non-overlapping. Bucket is represented as a range, along with replacement values. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets). -The `buckets` block supports: +The `buckets` block supports: * `min` - (Optional) Lower bound of the range, inclusive. Type should be the same as max if used. The `min` block must only contain one argument. See the `bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_min). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_min). * `max` - (Optional) Upper bound of the range, exclusive; type must match min. The `max` block must only contain one argument. See the `bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_max). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_max). * `replacement_value` - (Required) Replacement value for this bucket. The `replacement_value` block must only contain one argument. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_replacement_value). -The `min` block supports: +The `min` block supports: * `integer_value` - (Optional) @@ -1872,12 +1872,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_min_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_min_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_min_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_min_date_value). * `day_of_week_value` - (Optional) @@ -1885,7 +1885,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1903,7 +1903,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1917,7 +1917,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `max` block supports: +The `max` block supports: * `integer_value` - (Optional) @@ -1942,12 +1942,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_max_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_max_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_max_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_max_date_value). * `day_of_week_value` - (Optional) @@ -1955,7 +1955,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -1973,7 +1973,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -1987,7 +1987,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `replacement_value` block supports: +The `replacement_value` block supports: * `integer_value` - (Optional) @@ -2012,12 +2012,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_replacement_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_bucketing_config_buckets_replacement_value_date_value). * `day_of_week_value` - (Optional) @@ -2025,7 +2025,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -2043,7 +2043,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -2057,32 +2057,32 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `time_part_config` block supports: +The `time_part_config` block supports: * `part_to_extract` - (Optional) The part of the time to keep. Possible values are: `YEAR`, `MONTH`, `DAY_OF_MONTH`, `DAY_OF_WEEK`, `WEEK_OF_YEAR`, `HOUR_OF_DAY`. -The `crypto_hash_config` block supports: +The `crypto_hash_config` block supports: * `crypto_key` - (Optional) The key used by the encryption function. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key). -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -2090,23 +2090,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_hash_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -2117,7 +2117,7 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `date_shift_config` block supports: +The `date_shift_config` block supports: * `upper_bound_days` - (Required) @@ -2132,31 +2132,31 @@ The following arguments are supported: (Optional) Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_date_shift_config_context). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_date_shift_config_context). * `crypto_key` - (Optional) Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and cryptoKey. If set, must also set context. Can only be applied to table items. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key). -The `context` block supports: +The `context` block supports: * `name` - (Optional) Name describing the field. -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -2164,23 +2164,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_date_shift_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -2191,12 +2191,12 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `crypto_deterministic_config` block supports: +The `crypto_deterministic_config` block supports: * `crypto_key` - (Optional) The key used by the encryption function. For deterministic encryption using AES-SIV, the provided key is internally expanded to 64 bytes prior to use. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key). * `surrogate_info_type` - (Optional) @@ -2208,7 +2208,7 @@ The following arguments are supported: * reverse a surrogate that does not correspond to an actual identifier * be unable to parse the surrogate and result in an error Therefore, choose your custom info type name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type). * `context` - (Optional) @@ -2218,20 +2218,20 @@ The following arguments are supported: 2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an InfoTypeTransformation is applied to both structured and unstructured ContentItems. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_context). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_context). -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -2239,23 +2239,23 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) A 128/192/256 bit key. A base64-encoded string. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -2266,7 +2266,7 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `surrogate_info_type` block supports: +The `surrogate_info_type` block supports: * `name` - (Optional) @@ -2279,60 +2279,60 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `context` block supports: +The `context` block supports: * `name` - (Optional) Name describing the field. -The `replace_dictionary_config` block supports: +The `replace_dictionary_config` block supports: * `word_list` - (Optional) A list of words to select from for random replacement. The [limits](https://cloud.google.com/dlp/limits) page contains details about the size limits of dictionaries. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_primitive_transformation_replace_dictionary_config_word_list). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_primitive_transformation_replace_dictionary_config_word_list). -The `word_list` block supports: +The `word_list` block supports: * `words` - (Required) Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. -The `info_type_transformations` block supports: +The `info_type_transformations` block supports: * `transformations` - (Required) Transformation for each infoType. Cannot specify more than one for a given infoType. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations). -The `transformations` block supports: +The `transformations` block supports: * `info_types` - (Optional) InfoTypes to apply the transformation to. Leaving this empty will apply the transformation to apply to all findings that correspond to infoTypes that were requested in InspectConfig. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_info_types). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_info_types). * `primitive_transformation` - (Required) Apply the transformation to the entire field. The `primitive_transformation` block must only contain one argument, corresponding to the type of transformation. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation). -The `info_types` block supports: +The `info_types` block supports: * `name` - (Required) @@ -2345,22 +2345,22 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `primitive_transformation` block supports: +The `primitive_transformation` block supports: * `replace_config` - (Optional) Replace each input value with a given value. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_replace_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_replace_config). * `redact_config` - (Optional) @@ -2369,13 +2369,13 @@ The following arguments are supported: * `character_mask_config` - (Optional) Partially mask a string by replacing a given number of characters with a fixed character. Masking can start from the beginning or end of the string. This can be used on data of any type (numbers, longs, and so on) and when de-identifying structured data we'll attempt to preserve the original data's type. (This allows you to take a long like 123 and modify it to a string like **3). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_character_mask_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_character_mask_config). * `crypto_replace_ffx_fpe_config` - (Optional) Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the `content.reidentify` API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See [https://cloud.google.com/dlp/docs/pseudonymization](https://cloud.google.com/dlp/docs/pseudonymization) to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config). * `fixed_size_bucketing_config` - (Optional) @@ -2384,7 +2384,7 @@ The following arguments are supported: This can be used on data of type: double, long. If the bound Value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_fixed_size_bucketing_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_fixed_size_bucketing_config). * `bucketing_config` - (Optional) @@ -2392,7 +2392,7 @@ The following arguments are supported: This can be used on data of type: number, long, string, timestamp. If the provided value type differs from the type of data being transformed, we will first attempt converting the type of the data to be transformed to match the type of the bound before comparing. See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config). * `replace_with_info_type_config` - (Optional) @@ -2401,7 +2401,7 @@ The following arguments are supported: * `time_part_config` - (Optional) For use with Date, Timestamp, and TimeOfDay, extract or preserve a portion of the value. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_time_part_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_time_part_config). * `crypto_hash_config` - (Optional) @@ -2409,34 +2409,34 @@ The following arguments are supported: Outputs a base64 encoded representation of the hashed output (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string and integer values can be hashed. See https://cloud.google.com/dlp/docs/pseudonymization to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_hash_config). * `date_shift_config` - (Optional) Shifts dates by random number of days, with option to be consistent for the same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting to learn more. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_date_shift_config). * `crypto_deterministic_config` - (Optional) Pseudonymization method that generates deterministic encryption for the given input. Outputs a base64 encoded representation of the encrypted output. Uses AES-SIV based on the RFC [https://tools.ietf.org/html/rfc5297](https://tools.ietf.org/html/rfc5297). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config). * `replace_dictionary_config` - (Optional) Replace with a value randomly drawn (with replacement) from a dictionary. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_replace_dictionary_config). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_replace_dictionary_config). -The `replace_config` block supports: +The `replace_config` block supports: * `new_value` - (Required) Replace each input value with a given value. The `new_value` block must only contain one argument. For example when replacing the contents of a string-type field, only `string_value` should be set. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_replace_config_new_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_replace_config_new_value). -The `new_value` block supports: +The `new_value` block supports: * `integer_value` - (Optional) @@ -2462,12 +2462,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_replace_config_new_value_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_replace_config_new_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_replace_config_new_value_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_replace_config_new_value_date_value). * `day_of_week_value` - (Optional) @@ -2475,7 +2475,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -2493,7 +2493,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -2507,7 +2507,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `character_mask_config` block supports: +The `character_mask_config` block supports: * `masking_character` - (Optional) @@ -2534,10 +2534,10 @@ The following arguments are supported: * `characters_to_ignore` - (Optional) Characters to skip when doing de-identification of a value. These will be left alone and skipped. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_character_mask_config_characters_to_ignore). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_character_mask_config_characters_to_ignore). -The `characters_to_ignore` block supports: +The `characters_to_ignore` block supports: * `characters_to_skip` - (Optional) @@ -2548,12 +2548,12 @@ The following arguments are supported: Common characters to not transform when masking. Useful to avoid removing punctuation. Only one of this or `characters_to_skip` must be specified. Possible values are: `NUMERIC`, `ALPHA_UPPER_CASE`, `ALPHA_LOWER_CASE`, `PUNCTUATION`, `WHITESPACE`. -The `crypto_replace_ffx_fpe_config` block supports: +The `crypto_replace_ffx_fpe_config` block supports: * `crypto_key` - (Required) The key used by the encryption algorithm. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key). * `context` - (Optional) @@ -2566,7 +2566,7 @@ The following arguments are supported: The tweak is constructed as a sequence of bytes in big endian byte order such that: * a 64 bit integer is encoded followed by a single byte of value 1 * a string is encoded in UTF-8 format followed by a single byte of value 2 - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_context). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_context). * `surrogate_info_type` - (Optional) @@ -2574,7 +2574,7 @@ The following arguments are supported: For example, if the name of custom infoType is 'MY\_TOKEN\_INFO\_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY\_TOKEN\_INFO\_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type). * `common_alphabet` - (Optional) @@ -2591,17 +2591,17 @@ The following arguments are supported: The native way to select the alphabet. Must be in the range \[2, 95\]. Only one of this, `custom_alphabet` or `common_alphabet` must be specified. -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Only one of this, `unwrapped` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Only one of this, `transient` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -2609,16 +2609,16 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Only one of this, `transient` or `unwrapped` must be specified. Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) @@ -2626,7 +2626,7 @@ The following arguments are supported: A base64-encoded string. **Note**: This property is sensitive and will not be displayed in the plan. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -2637,13 +2637,13 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `context` block supports: +The `context` block supports: * `name` - (Required) Name describing the field. -The `surrogate_info_type` block supports: +The `surrogate_info_type` block supports: * `name` - (Required) @@ -2656,31 +2656,31 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_replace_ffx_fpe_config_surrogate_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `fixed_size_bucketing_config` block supports: +The `fixed_size_bucketing_config` block supports: * `lower_bound` - (Required) Lower bound value of buckets. All values less than lower_bound are grouped together into a single bucket; for example if lower_bound = 10, then all values less than 10 are replaced with the value "-10". The `lower_bound` block must only contain one argument. See the `fixed_size_bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_lower_bound). * `upper_bound` - (Required) Upper bound value of buckets. All values greater than upper_bound are grouped together into a single bucket; for example if upper_bound = 89, then all values greater than 89 are replaced with the value "89+". The `upper_bound` block must only contain one argument. See the `fixed_size_bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_fixed_size_bucketing_config_upper_bound). * `bucket_size` - (Required) @@ -2689,7 +2689,7 @@ The following arguments are supported: Precision up to 2 decimals works. -The `lower_bound` block supports: +The `lower_bound` block supports: * `integer_value` - (Optional) @@ -2699,7 +2699,7 @@ The following arguments are supported: (Optional) A float value. -The `upper_bound` block supports: +The `upper_bound` block supports: * `integer_value` - (Optional) @@ -2709,37 +2709,37 @@ The following arguments are supported: (Optional) A float value. -The `bucketing_config` block supports: +The `bucketing_config` block supports: * `buckets` - (Required) Set of buckets. Ranges must be non-overlapping. Bucket is represented as a range, along with replacement values. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets). -The `buckets` block supports: +The `buckets` block supports: * `min` - (Optional) Lower bound of the range, inclusive. Type should be the same as max if used. The `min` block must only contain one argument. See the `bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_min). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_min). * `max` - (Optional) Upper bound of the range, exclusive; type must match min. The `max` block must only contain one argument. See the `bucketing_config` block description for more information about choosing a data type. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_max). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_max). * `replacement_value` - (Required) Replacement value for this bucket. The `replacement_value` block must only contain one argument. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_replacement_value). -The `min` block supports: +The `min` block supports: * `integer_value` - (Optional) @@ -2760,12 +2760,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_min_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_min_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_min_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_min_date_value). * `day_of_week_value` - (Optional) @@ -2773,7 +2773,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -2791,7 +2791,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -2805,7 +2805,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `max` block supports: +The `max` block supports: * `integer_value` - (Optional) @@ -2826,12 +2826,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_max_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_max_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_max_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_max_date_value). * `day_of_week_value` - (Optional) @@ -2839,7 +2839,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -2857,7 +2857,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -2871,7 +2871,7 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `replacement_value` block supports: +The `replacement_value` block supports: * `integer_value` - (Optional) @@ -2892,12 +2892,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_replacement_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_bucketing_config_buckets_buckets_replacement_value_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_bucketing_config_buckets_replacement_value_date_value). * `day_of_week_value` - (Optional) @@ -2905,7 +2905,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -2923,7 +2923,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) @@ -2937,32 +2937,32 @@ The following arguments are supported: (Optional) Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. -The `time_part_config` block supports: +The `time_part_config` block supports: * `part_to_extract` - (Required) The part of the time to keep. Possible values are: `YEAR`, `MONTH`, `DAY_OF_MONTH`, `DAY_OF_WEEK`, `WEEK_OF_YEAR`, `HOUR_OF_DAY`. -The `crypto_hash_config` block supports: +The `crypto_hash_config` block supports: * `crypto_key` - (Required) The key used by the encryption function. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key). -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Only one of this, `unwrapped` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Only one of this, `transient` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -2970,16 +2970,16 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Only one of this, `transient` or `unwrapped` must be specified. Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_hash_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) @@ -2987,7 +2987,7 @@ The following arguments are supported: A base64-encoded string. **Note**: This property is sensitive and will not be displayed in the plan. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -2998,7 +2998,7 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `date_shift_config` block supports: +The `date_shift_config` block supports: * `upper_bound_days` - (Required) @@ -3013,31 +3013,31 @@ The following arguments are supported: (Optional) Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_context). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_date_shift_config_context). * `crypto_key` - (Optional) Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and cryptoKey. If set, must also set context. Can only be applied to table items. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key). -The `context` block supports: +The `context` block supports: * `name` - (Required) Name describing the field. -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Only one of this, `unwrapped` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Only one of this, `transient` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -3045,16 +3045,16 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Only one of this, `transient` or `unwrapped` must be specified. Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_date_shift_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) @@ -3062,7 +3062,7 @@ The following arguments are supported: A base64-encoded string. **Note**: This property is sensitive and will not be displayed in the plan. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -3073,12 +3073,12 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `crypto_deterministic_config` block supports: +The `crypto_deterministic_config` block supports: * `crypto_key` - (Required) The key used by the encryption function. For deterministic encryption using AES-SIV, the provided key is internally expanded to 64 bytes prior to use. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key). * `surrogate_info_type` - (Required) @@ -3090,7 +3090,7 @@ The following arguments are supported: * reverse a surrogate that does not correspond to an actual identifier * be unable to parse the surrogate and result in an error Therefore, choose your custom info type name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY\_TOKEN\_TYPE. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type). * `context` - (Optional) @@ -3100,20 +3100,20 @@ The following arguments are supported: 2. the field is not present when transforming a given value, plaintext would be used as is for encryption. Note that case (1) is expected when an InfoTypeTransformation is applied to both structured and unstructured ContentItems. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_context). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_context). -The `crypto_key` block supports: +The `crypto_key` block supports: * `transient` - (Optional) Transient crypto key. Use this to have a random data crypto key generated. It will be discarded after the request finishes. Only one of this, `unwrapped` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_transient). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_transient). * `unwrapped` - (Optional) Unwrapped crypto key. Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Only one of this, `transient` or `kms_wrapped` must be specified. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_unwrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_unwrapped). * `kms_wrapped` - (Optional) @@ -3121,16 +3121,16 @@ The following arguments are supported: Include to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt For more information, see [Creating a wrapped key](https://cloud.google.com/dlp/docs/create-wrapped-key). Only one of this, `transient` or `unwrapped` must be specified. Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing). - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_kms_wrapped). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_crypto_key_kms_wrapped). -The `transient` block supports: +The `transient` block supports: * `name` - (Required) Name of the key. This is an arbitrary string used to differentiate different keys. A unique key is generated per name: two separate `TransientCryptoKey` protos share the same generated key if their names are the same. When the data crypto key is generated, this name is not used in any way (repeating the api call will result in a different key being generated). -The `unwrapped` block supports: +The `unwrapped` block supports: * `key` - (Required) @@ -3138,7 +3138,7 @@ The following arguments are supported: A base64-encoded string. **Note**: This property is sensitive and will not be displayed in the plan. -The `kms_wrapped` block supports: +The `kms_wrapped` block supports: * `wrapped_key` - (Required) @@ -3149,7 +3149,7 @@ The following arguments are supported: (Required) The resource name of the KMS CryptoKey to use for unwrapping. -The `surrogate_info_type` block supports: +The `surrogate_info_type` block supports: * `name` - (Required) @@ -3162,31 +3162,31 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type_sensitivity_score). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_crypto_deterministic_config_surrogate_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `context` block supports: +The `context` block supports: * `name` - (Required) Name describing the field. -The `replace_dictionary_config` block supports: +The `replace_dictionary_config` block supports: * `word_list` - (Required) A list of words to select from for random replacement. The [limits](https://cloud.google.com/dlp/limits) page contains details about the size limits of dictionaries. - Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_field_transformations_info_type_transformations_transformations_transformations_primitive_transformation_replace_dictionary_config_word_list). + Structure is [documented below](#nested_deidentify_config_record_transformations_field_transformations_info_type_transformations_transformations_primitive_transformation_replace_dictionary_config_word_list). -The `word_list` block supports: +The `word_list` block supports: * `words` - (Required) @@ -3197,18 +3197,18 @@ The following arguments are supported: * `condition` - (Optional) A condition that when it evaluates to true will result in the record being evaluated to be suppressed from the transformed content. - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition). -The `condition` block supports: +The `condition` block supports: * `expressions` - (Optional) An expression, consisting of an operator and conditions. - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition_expressions). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition_expressions). -The `expressions` block supports: +The `expressions` block supports: * `logical_operator` - (Optional) @@ -3219,23 +3219,23 @@ The following arguments are supported: * `conditions` - (Optional) Conditions to apply to the expression. - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition_expressions_conditions). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition_expressions_conditions). -The `conditions` block supports: +The `conditions` block supports: * `conditions` - (Optional) A collection of conditions. - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition_expressions_conditions_conditions). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition_expressions_conditions_conditions). -The `conditions` block supports: +The `conditions` block supports: * `field` - (Required) Field within the record this condition is evaluated against. - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition_expressions_conditions_conditions_conditions_field). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition_expressions_conditions_conditions_field). * `operator` - (Required) @@ -3245,16 +3245,16 @@ The following arguments are supported: * `value` - (Optional) Value to compare against. [Mandatory, except for EXISTS tests.] - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition_expressions_conditions_conditions_conditions_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition_expressions_conditions_conditions_value). -The `field` block supports: +The `field` block supports: * `name` - (Optional) Name describing the field. -The `value` block supports: +The `value` block supports: * `integer_value` - (Optional) @@ -3279,12 +3279,12 @@ The following arguments are supported: * `time_value` - (Optional) Represents a time of day. - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition_expressions_conditions_conditions_conditions_value_time_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition_expressions_conditions_conditions_value_time_value). * `date_value` - (Optional) Represents a whole or partial calendar date. - Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_record_suppressions_condition_expressions_conditions_conditions_conditions_value_date_value). + Structure is [documented below](#nested_deidentify_config_record_transformations_record_suppressions_condition_expressions_conditions_conditions_value_date_value). * `day_of_week_value` - (Optional) @@ -3292,7 +3292,7 @@ The following arguments are supported: Possible values are: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`. -The `time_value` block supports: +The `time_value` block supports: * `hours` - (Optional) @@ -3310,7 +3310,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `date_value` block supports: +The `date_value` block supports: * `year` - (Optional) diff --git a/website/docs/r/data_loss_prevention_discovery_config.html.markdown b/website/docs/r/data_loss_prevention_discovery_config.html.markdown index 7e89cb7a6a7..edae69f9a83 100644 --- a/website/docs/r/data_loss_prevention_discovery_config.html.markdown +++ b/website/docs/r/data_loss_prevention_discovery_config.html.markdown @@ -608,32 +608,32 @@ The following arguments are supported: * `export_data` - (Optional) Export data profiles into a provided location - Structure is [documented below](#nested_actions_actions_export_data). + Structure is [documented below](#nested_actions_export_data). * `pub_sub_notification` - (Optional) Publish a message into the Pub/Sub topic. - Structure is [documented below](#nested_actions_actions_pub_sub_notification). + Structure is [documented below](#nested_actions_pub_sub_notification). * `tag_resources` - (Optional) Tag the profiled resources with the specified tag values. - Structure is [documented below](#nested_actions_actions_tag_resources). + Structure is [documented below](#nested_actions_tag_resources). * `publish_to_dataplex_catalog` - (Optional) Publish a portion of each profile to Dataplex Universal Catalog with the aspect type Sensitive Data Protection Profile. -The `export_data` block supports: +The `export_data` block supports: * `profile_table` - (Optional) Store all table and column profiles in an existing table or a new table in an existing dataset. Each re-generation will result in a new row in BigQuery - Structure is [documented below](#nested_actions_actions_export_data_profile_table). + Structure is [documented below](#nested_actions_export_data_profile_table). -The `profile_table` block supports: +The `profile_table` block supports: * `project_id` - (Optional) @@ -647,7 +647,7 @@ The following arguments are supported: (Optional) Name of the table -The `pub_sub_notification` block supports: +The `pub_sub_notification` block supports: * `topic` - (Optional) @@ -661,7 +661,7 @@ The following arguments are supported: * `pubsub_condition` - (Optional) Conditions for triggering pubsub - Structure is [documented below](#nested_actions_actions_pub_sub_notification_pubsub_condition). + Structure is [documented below](#nested_actions_pub_sub_notification_pubsub_condition). * `detail_of_message` - (Optional) @@ -669,15 +669,15 @@ The following arguments are supported: Possible values are: `TABLE_PROFILE`, `RESOURCE_NAME`. -The `pubsub_condition` block supports: +The `pubsub_condition` block supports: * `expressions` - (Optional) An expression - Structure is [documented below](#nested_actions_actions_pub_sub_notification_pubsub_condition_expressions). + Structure is [documented below](#nested_actions_pub_sub_notification_pubsub_condition_expressions). -The `expressions` block supports: +The `expressions` block supports: * `logical_operator` - (Optional) @@ -687,10 +687,10 @@ The following arguments are supported: * `conditions` - (Optional) Conditions to apply to the expression - Structure is [documented below](#nested_actions_actions_pub_sub_notification_pubsub_condition_expressions_conditions). + Structure is [documented below](#nested_actions_pub_sub_notification_pubsub_condition_expressions_conditions). -The `conditions` block supports: +The `conditions` block supports: * `minimum_risk_score` - (Optional) @@ -702,12 +702,12 @@ The following arguments are supported: The minimum sensitivity level that triggers the condition. Possible values are: `HIGH`, `MEDIUM_OR_HIGH`. -The `tag_resources` block supports: +The `tag_resources` block supports: * `tag_conditions` - (Optional) The tags to associate with different conditions. - Structure is [documented below](#nested_actions_actions_tag_resources_tag_conditions). + Structure is [documented below](#nested_actions_tag_resources_tag_conditions). * `profile_generations_to_tag` - (Optional) @@ -719,26 +719,26 @@ The following arguments are supported: Whether applying a tag to a resource should lower the risk of the profile for that resource. For example, in conjunction with an [IAM deny policy](https://cloud.google.com/iam/docs/deny-overview), you can deny all principals a permission if a tag value is present, mitigating the risk of the resource. This also lowers the data risk of resources at the lower levels of the resource hierarchy. For example, reducing the data risk of a table data profile also reduces the data risk of the constituent column data profiles. -The `tag_conditions` block supports: +The `tag_conditions` block supports: * `tag` - (Optional) The tag value to attach to resources. - Structure is [documented below](#nested_actions_actions_tag_resources_tag_conditions_tag_conditions_tag). + Structure is [documented below](#nested_actions_tag_resources_tag_conditions_tag). * `sensitivity_score` - (Optional) Conditions attaching the tag to a resource on its profile having this sensitivity score. - Structure is [documented below](#nested_actions_actions_tag_resources_tag_conditions_tag_conditions_sensitivity_score). + Structure is [documented below](#nested_actions_tag_resources_tag_conditions_sensitivity_score). -The `tag` block supports: +The `tag` block supports: * `namespaced_value` - (Optional) The namespaced name for the tag value to attach to resources. Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for example, "123456/environment/prod". -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) @@ -750,12 +750,12 @@ The following arguments are supported: * `big_query_target` - (Optional) BigQuery target for Discovery. The first target to match a table will be the one applied. - Structure is [documented below](#nested_targets_targets_big_query_target). + Structure is [documented below](#nested_targets_big_query_target). * `cloud_sql_target` - (Optional) Cloud SQL target for Discovery. The first target to match a table will be the one applied. - Structure is [documented below](#nested_targets_targets_cloud_sql_target). + Structure is [documented below](#nested_targets_cloud_sql_target). * `secrets_target` - (Optional) @@ -764,42 +764,42 @@ The following arguments are supported: * `cloud_storage_target` - (Optional) Cloud Storage target for Discovery. The first target to match a bucket will be the one applied. - Structure is [documented below](#nested_targets_targets_cloud_storage_target). + Structure is [documented below](#nested_targets_cloud_storage_target). * `other_cloud_target` - (Optional) Other clouds target for discovery. The first target to match a resource will be the one applied. - Structure is [documented below](#nested_targets_targets_other_cloud_target). + Structure is [documented below](#nested_targets_other_cloud_target). -The `big_query_target` block supports: +The `big_query_target` block supports: * `filter` - (Optional) Required. The tables the discovery cadence applies to. The first target with a matching filter will be the one to apply to a table - Structure is [documented below](#nested_targets_targets_big_query_target_filter). + Structure is [documented below](#nested_targets_big_query_target_filter). * `conditions` - (Optional) In addition to matching the filter, these conditions must be true before a profile is generated - Structure is [documented below](#nested_targets_targets_big_query_target_conditions). + Structure is [documented below](#nested_targets_big_query_target_conditions). * `cadence` - (Optional) How often and when to update profiles. New tables that match both the fiter and conditions are scanned as quickly as possible depending on system capacity. - Structure is [documented below](#nested_targets_targets_big_query_target_cadence). + Structure is [documented below](#nested_targets_big_query_target_cadence). * `disabled` - (Optional) Tables that match this filter will not have profiles created. -The `filter` block supports: +The `filter` block supports: * `tables` - (Optional) A specific set of tables for this filter to apply to. A table collection must be specified in only one filter per config. - Structure is [documented below](#nested_targets_targets_big_query_target_filter_tables). + Structure is [documented below](#nested_targets_big_query_target_filter_tables). * `other_tables` - (Optional) @@ -808,26 +808,26 @@ The following arguments are supported: * `table_reference` - (Optional) The table to scan. Discovery configurations including this can only include one DiscoveryTarget (the DiscoveryTarget with this TableReference). - Structure is [documented below](#nested_targets_targets_big_query_target_filter_table_reference). + Structure is [documented below](#nested_targets_big_query_target_filter_table_reference). -The `tables` block supports: +The `tables` block supports: * `include_regexes` - (Optional) A collection of regular expressions to match a BQ table against. - Structure is [documented below](#nested_targets_targets_big_query_target_filter_tables_include_regexes). + Structure is [documented below](#nested_targets_big_query_target_filter_tables_include_regexes). -The `include_regexes` block supports: +The `include_regexes` block supports: * `patterns` - (Optional) A single BigQuery regular expression pattern to match against one or more tables, datasets, or projects that contain BigQuery tables. - Structure is [documented below](#nested_targets_targets_big_query_target_filter_tables_include_regexes_patterns). + Structure is [documented below](#nested_targets_big_query_target_filter_tables_include_regexes_patterns). -The `patterns` block supports: +The `patterns` block supports: * `project_id_regex` - (Optional) @@ -841,7 +841,7 @@ The following arguments are supported: (Optional) if unset, this property matches all tables -The `table_reference` block supports: +The `table_reference` block supports: * `dataset_id` - (Required) @@ -851,7 +851,7 @@ The following arguments are supported: (Required) Name of the table. -The `conditions` block supports: +The `conditions` block supports: * `created_after` - (Optional) @@ -860,12 +860,12 @@ The following arguments are supported: * `or_conditions` - (Optional) At least one of the conditions must be true for a table to be scanned. - Structure is [documented below](#nested_targets_targets_big_query_target_conditions_or_conditions). + Structure is [documented below](#nested_targets_big_query_target_conditions_or_conditions). * `types` - (Optional) Restrict discovery to specific table type - Structure is [documented below](#nested_targets_targets_big_query_target_conditions_types). + Structure is [documented below](#nested_targets_big_query_target_conditions_types). * `type_collection` - (Optional) @@ -873,7 +873,7 @@ The following arguments are supported: Possible values are: `BIG_QUERY_COLLECTION_ALL_TYPES`, `BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES`. -The `or_conditions` block supports: +The `or_conditions` block supports: * `min_age` - (Optional) @@ -883,32 +883,32 @@ The following arguments are supported: (Optional) Minimum number of rows that should be present before Cloud DLP profiles as a table. -The `types` block supports: +The `types` block supports: * `types` - (Optional) A set of BiqQuery table types Each value may be one of: `BIG_QUERY_TABLE_TYPE_TABLE`, `BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE`. -The `cadence` block supports: +The `cadence` block supports: * `schema_modified_cadence` - (Optional) Governs when to update data profiles when a schema is modified - Structure is [documented below](#nested_targets_targets_big_query_target_cadence_schema_modified_cadence). + Structure is [documented below](#nested_targets_big_query_target_cadence_schema_modified_cadence). * `table_modified_cadence` - (Optional) Governs when to update profile when a table is modified. - Structure is [documented below](#nested_targets_targets_big_query_target_cadence_table_modified_cadence). + Structure is [documented below](#nested_targets_big_query_target_cadence_table_modified_cadence). * `inspect_template_modified_cadence` - (Optional) Governs when to update data profiles when the inspection rules defined by the `InspectTemplate` change. If not set, changing the template will not cause a data profile to update. - Structure is [documented below](#nested_targets_targets_big_query_target_cadence_inspect_template_modified_cadence). + Structure is [documented below](#nested_targets_big_query_target_cadence_inspect_template_modified_cadence). -The `schema_modified_cadence` block supports: +The `schema_modified_cadence` block supports: * `types` - (Optional) @@ -920,7 +920,7 @@ The following arguments are supported: How frequently profiles may be updated when schemas are modified. Default to monthly Possible values are: `UPDATE_FREQUENCY_NEVER`, `UPDATE_FREQUENCY_DAILY`, `UPDATE_FREQUENCY_MONTHLY`. -The `table_modified_cadence` block supports: +The `table_modified_cadence` block supports: * `types` - (Optional) @@ -932,41 +932,41 @@ The following arguments are supported: How frequently data profiles can be updated when tables are modified. Defaults to never. Possible values are: `UPDATE_FREQUENCY_NEVER`, `UPDATE_FREQUENCY_DAILY`, `UPDATE_FREQUENCY_MONTHLY`. -The `inspect_template_modified_cadence` block supports: +The `inspect_template_modified_cadence` block supports: * `frequency` - (Optional) How frequently data profiles can be updated when the template is modified. Defaults to never. Possible values are: `UPDATE_FREQUENCY_NEVER`, `UPDATE_FREQUENCY_DAILY`, `UPDATE_FREQUENCY_MONTHLY`. -The `cloud_sql_target` block supports: +The `cloud_sql_target` block supports: * `filter` - (Required) Required. The tables the discovery cadence applies to. The first target with a matching filter will be the one to apply to a table. - Structure is [documented below](#nested_targets_targets_cloud_sql_target_filter). + Structure is [documented below](#nested_targets_cloud_sql_target_filter). * `conditions` - (Optional) In addition to matching the filter, these conditions must be true before a profile is generated. - Structure is [documented below](#nested_targets_targets_cloud_sql_target_conditions). + Structure is [documented below](#nested_targets_cloud_sql_target_conditions). * `generation_cadence` - (Optional) How often and when to update profiles. New tables that match both the filter and conditions are scanned as quickly as possible depending on system capacity. - Structure is [documented below](#nested_targets_targets_cloud_sql_target_generation_cadence). + Structure is [documented below](#nested_targets_cloud_sql_target_generation_cadence). * `disabled` - (Optional) Disable profiling for database resources that match this filter. -The `filter` block supports: +The `filter` block supports: * `collection` - (Optional) A specific set of database resources for this filter to apply to. - Structure is [documented below](#nested_targets_targets_cloud_sql_target_filter_collection). + Structure is [documented below](#nested_targets_cloud_sql_target_filter_collection). * `others` - (Optional) @@ -975,26 +975,26 @@ The following arguments are supported: * `database_resource_reference` - (Optional) The database resource to scan. Targets including this can only include one target (the target with this database resource reference). - Structure is [documented below](#nested_targets_targets_cloud_sql_target_filter_database_resource_reference). + Structure is [documented below](#nested_targets_cloud_sql_target_filter_database_resource_reference). -The `collection` block supports: +The `collection` block supports: * `include_regexes` - (Optional) A collection of regular expressions to match a database resource against. - Structure is [documented below](#nested_targets_targets_cloud_sql_target_filter_collection_include_regexes). + Structure is [documented below](#nested_targets_cloud_sql_target_filter_collection_include_regexes). -The `include_regexes` block supports: +The `include_regexes` block supports: * `patterns` - (Optional) A group of regular expression patterns to match against one or more database resources. Maximum of 100 entries. The sum of all regular expressions' length can't exceed 10 KiB. - Structure is [documented below](#nested_targets_targets_cloud_sql_target_filter_collection_include_regexes_patterns). + Structure is [documented below](#nested_targets_cloud_sql_target_filter_collection_include_regexes_patterns). -The `patterns` block supports: +The `patterns` block supports: * `project_id_regex` - (Optional) @@ -1012,7 +1012,7 @@ The following arguments are supported: (Optional) Regex to test the database resource's name against. An example of a database resource name is a table's name. Other database resource names like view names could be included in the future. If empty, all database resources match.' -The `database_resource_reference` block supports: +The `database_resource_reference` block supports: * `project_id` - (Required) @@ -1030,7 +1030,7 @@ The following arguments are supported: (Required) Required. Name of a database resource, for example, a table within the database. -The `conditions` block supports: +The `conditions` block supports: * `database_engines` - (Optional) @@ -1042,12 +1042,12 @@ The following arguments are supported: Data profiles will only be generated for the database resource types specified in this field. If not specified, defaults to [DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES]. Each value may be one of: `DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES`, `DATABASE_RESOURCE_TYPE_TABLE`. -The `generation_cadence` block supports: +The `generation_cadence` block supports: * `schema_modified_cadence` - (Optional) Governs when to update data profiles when a schema is modified - Structure is [documented below](#nested_targets_targets_cloud_sql_target_generation_cadence_schema_modified_cadence). + Structure is [documented below](#nested_targets_cloud_sql_target_generation_cadence_schema_modified_cadence). * `refresh_frequency` - (Optional) @@ -1057,10 +1057,10 @@ The following arguments are supported: * `inspect_template_modified_cadence` - (Optional) Governs when to update data profiles when the inspection rules defined by the `InspectTemplate` change. If not set, changing the template will not cause a data profile to update. - Structure is [documented below](#nested_targets_targets_cloud_sql_target_generation_cadence_inspect_template_modified_cadence). + Structure is [documented below](#nested_targets_cloud_sql_target_generation_cadence_inspect_template_modified_cadence). -The `schema_modified_cadence` block supports: +The `schema_modified_cadence` block supports: * `types` - (Optional) @@ -1072,77 +1072,77 @@ The following arguments are supported: Frequency to regenerate data profiles when the schema is modified. Defaults to monthly. Possible values are: `UPDATE_FREQUENCY_NEVER`, `UPDATE_FREQUENCY_DAILY`, `UPDATE_FREQUENCY_MONTHLY`. -The `inspect_template_modified_cadence` block supports: +The `inspect_template_modified_cadence` block supports: * `frequency` - (Required) How frequently data profiles can be updated when the template is modified. Defaults to never. Possible values are: `UPDATE_FREQUENCY_NEVER`, `UPDATE_FREQUENCY_DAILY`, `UPDATE_FREQUENCY_MONTHLY`. -The `cloud_storage_target` block supports: +The `cloud_storage_target` block supports: * `filter` - (Required) The buckets the generation_cadence applies to. The first target with a matching filter will be the one to apply to a bucket. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_filter). + Structure is [documented below](#nested_targets_cloud_storage_target_filter). * `conditions` - (Optional) In addition to matching the filter, these conditions must be true before a profile is generated. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_conditions). + Structure is [documented below](#nested_targets_cloud_storage_target_conditions). * `generation_cadence` - (Optional) How often and when to update profiles. New buckets that match both the filter and conditions are scanned as quickly as possible depending on system capacity. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_generation_cadence). + Structure is [documented below](#nested_targets_cloud_storage_target_generation_cadence). * `disabled` - (Optional) Disable profiling for buckets that match this filter. -The `filter` block supports: +The `filter` block supports: * `collection` - (Optional) A specific set of buckets for this filter to apply to. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_filter_collection). + Structure is [documented below](#nested_targets_cloud_storage_target_filter_collection). * `cloud_storage_resource_reference` - (Optional) The bucket to scan. Targets including this can only include one target (the target with this bucket). This enables profiling the contents of a single bucket, while the other options allow for easy profiling of many buckets within a project or an organization. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_filter_cloud_storage_resource_reference). + Structure is [documented below](#nested_targets_cloud_storage_target_filter_cloud_storage_resource_reference). * `others` - (Optional) Match discovery resources not covered by any other filter. -The `collection` block supports: +The `collection` block supports: * `include_regexes` - (Optional) A collection of regular expressions to match a file store against. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_filter_collection_include_regexes). + Structure is [documented below](#nested_targets_cloud_storage_target_filter_collection_include_regexes). -The `include_regexes` block supports: +The `include_regexes` block supports: * `patterns` - (Optional) The group of regular expression patterns to match against one or more file stores. Maximum of 100 entries. The sum of all lengths of regular expressions can't exceed 10 KiB. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_filter_collection_include_regexes_patterns). + Structure is [documented below](#nested_targets_cloud_storage_target_filter_collection_include_regexes_patterns). -The `patterns` block supports: +The `patterns` block supports: * `cloud_storage_regex` - (Optional) Regex for Cloud Storage. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_filter_collection_include_regexes_patterns_patterns_cloud_storage_regex). + Structure is [documented below](#nested_targets_cloud_storage_target_filter_collection_include_regexes_patterns_cloud_storage_regex). -The `cloud_storage_regex` block supports: +The `cloud_storage_regex` block supports: * `project_id_regex` - (Optional) @@ -1152,7 +1152,7 @@ The following arguments are supported: (Optional) Regex to test the bucket name against. If empty, all buckets match. Example: "marketing2021" or "(marketing)\d{4}" will both match the bucket gs://marketing2021 -The `cloud_storage_resource_reference` block supports: +The `cloud_storage_resource_reference` block supports: * `bucket_name` - (Optional) @@ -1162,7 +1162,7 @@ The following arguments are supported: (Optional) If within a project-level config, then this must match the config's project id. -The `conditions` block supports: +The `conditions` block supports: * `created_after` - (Optional) @@ -1175,10 +1175,10 @@ The following arguments are supported: * `cloud_storage_conditions` - (Optional) Cloud Storage conditions. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_conditions_cloud_storage_conditions). + Structure is [documented below](#nested_targets_cloud_storage_target_conditions_cloud_storage_conditions). -The `cloud_storage_conditions` block supports: +The `cloud_storage_conditions` block supports: * `included_object_attributes` - (Optional) @@ -1190,7 +1190,7 @@ The following arguments are supported: Only objects with the specified attributes will be scanned. Defaults to [ALL_SUPPORTED_BUCKETS] if unset. Each value may be one of: `ALL_SUPPORTED_BUCKETS`, `AUTOCLASS_DISABLED`, `AUTOCLASS_ENABLED`. -The `generation_cadence` block supports: +The `generation_cadence` block supports: * `refresh_frequency` - (Optional) @@ -1200,134 +1200,134 @@ The following arguments are supported: * `inspect_template_modified_cadence` - (Optional) Governs when to update data profiles when the inspection rules defined by the `InspectTemplate` change. If not set, changing the template will not cause a data profile to update. - Structure is [documented below](#nested_targets_targets_cloud_storage_target_generation_cadence_inspect_template_modified_cadence). + Structure is [documented below](#nested_targets_cloud_storage_target_generation_cadence_inspect_template_modified_cadence). -The `inspect_template_modified_cadence` block supports: +The `inspect_template_modified_cadence` block supports: * `frequency` - (Optional) How frequently data profiles can be updated when the template is modified. Defaults to never. Possible values are: `UPDATE_FREQUENCY_NEVER`, `UPDATE_FREQUENCY_DAILY`, `UPDATE_FREQUENCY_MONTHLY`. -The `other_cloud_target` block supports: +The `other_cloud_target` block supports: * `data_source_type` - (Optional) Required. The type of data profiles generated by this discovery target. Supported values are: aws/s3/bucket - Structure is [documented below](#nested_targets_targets_other_cloud_target_data_source_type). + Structure is [documented below](#nested_targets_other_cloud_target_data_source_type). * `filter` - (Required) Required. The resources that the discovery cadence applies to. The first target with a matching filter will be the one to apply to a resource. - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter). + Structure is [documented below](#nested_targets_other_cloud_target_filter). * `conditions` - (Optional) In addition to matching the filter, these conditions must be true before a profile is generated. - Structure is [documented below](#nested_targets_targets_other_cloud_target_conditions). + Structure is [documented below](#nested_targets_other_cloud_target_conditions). * `generation_cadence` - (Optional) How often and when to update profiles. New resources that match both the filter and conditions are scanned as quickly as possible depending on system capacity. - Structure is [documented below](#nested_targets_targets_other_cloud_target_generation_cadence). + Structure is [documented below](#nested_targets_other_cloud_target_generation_cadence). * `disabled` - (Optional) Disable profiling for resources that match this filter. -The `data_source_type` block supports: +The `data_source_type` block supports: * `data_source` - (Optional) -The `filter` block supports: +The `filter` block supports: * `collection` - (Optional) A collection of resources for this filter to apply to. - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_collection). + Structure is [documented below](#nested_targets_other_cloud_target_filter_collection). * `single_resource` - (Optional) The resource to scan. Configs using this filter can only have one target (the target with this single resource reference). - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_single_resource). + Structure is [documented below](#nested_targets_other_cloud_target_filter_single_resource). * `others` - (Optional) Match discovery resources not covered by any other filter. -The `collection` block supports: +The `collection` block supports: * `include_regexes` - (Optional) A collection of regular expressions to match a resource against. - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_collection_include_regexes). + Structure is [documented below](#nested_targets_other_cloud_target_filter_collection_include_regexes). -The `include_regexes` block supports: +The `include_regexes` block supports: * `patterns` - (Optional) The group of regular expression patterns to match against one or more resources. Maximum of 100 entries. The sum of all lengths of regular expressions can't exceed 10 KiB. - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_collection_include_regexes_patterns). + Structure is [documented below](#nested_targets_other_cloud_target_filter_collection_include_regexes_patterns). -The `patterns` block supports: +The `patterns` block supports: * `amazon_s3_bucket_regex` - (Optional) Regex for Cloud Storage. - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_collection_include_regexes_patterns_patterns_amazon_s3_bucket_regex). + Structure is [documented below](#nested_targets_other_cloud_target_filter_collection_include_regexes_patterns_amazon_s3_bucket_regex). -The `amazon_s3_bucket_regex` block supports: +The `amazon_s3_bucket_regex` block supports: * `aws_account_regex` - (Optional) The AWS account regex - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_collection_include_regexes_patterns_patterns_amazon_s3_bucket_regex_aws_account_regex). + Structure is [documented below](#nested_targets_other_cloud_target_filter_collection_include_regexes_patterns_amazon_s3_bucket_regex_aws_account_regex). * `bucket_name_regex` - (Optional) Regex to test the bucket name against. If empty, all buckets match. -The `aws_account_regex` block supports: +The `aws_account_regex` block supports: * `account_id_regex` - (Optional) Regex to test the AWS account ID against. If empty, all accounts match. Example: arn:aws:organizations::123:account/o-b2c3d4/345 -The `single_resource` block supports: +The `single_resource` block supports: * `amazon_s3_bucket` - (Optional) Amazon S3 bucket. - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_single_resource_amazon_s3_bucket). + Structure is [documented below](#nested_targets_other_cloud_target_filter_single_resource_amazon_s3_bucket). -The `amazon_s3_bucket` block supports: +The `amazon_s3_bucket` block supports: * `aws_account` - (Optional) The AWS account. - Structure is [documented below](#nested_targets_targets_other_cloud_target_filter_single_resource_amazon_s3_bucket_aws_account). + Structure is [documented below](#nested_targets_other_cloud_target_filter_single_resource_amazon_s3_bucket_aws_account). * `bucket_name` - (Optional) The bucket name. -The `aws_account` block supports: +The `aws_account` block supports: * `account_id` - (Optional) AWS account ID. -The `conditions` block supports: +The `conditions` block supports: * `min_age` - (Optional) @@ -1336,10 +1336,10 @@ The following arguments are supported: * `amazon_s3_bucket_conditions` - (Optional) Amazon S3 bucket conditions. - Structure is [documented below](#nested_targets_targets_other_cloud_target_conditions_amazon_s3_bucket_conditions). + Structure is [documented below](#nested_targets_other_cloud_target_conditions_amazon_s3_bucket_conditions). -The `amazon_s3_bucket_conditions` block supports: +The `amazon_s3_bucket_conditions` block supports: * `bucket_types` - (Optional) @@ -1351,7 +1351,7 @@ The following arguments are supported: Object classes that should be profiled. Optional. Defaults to ALL_SUPPORTED_CLASSES if unspecified. Each value may be one of: `ALL_SUPPORTED_CLASSES`, `STANDARD`, `STANDARD_INFREQUENT_ACCESS`, `GLACIER_INSTANT_RETRIEVAL`, `INTELLIGENT_TIERING`. -The `generation_cadence` block supports: +The `generation_cadence` block supports: * `refresh_frequency` - (Optional) @@ -1361,10 +1361,10 @@ The following arguments are supported: * `inspect_template_modified_cadence` - (Optional) Governs when to update data profiles when the inspection rules defined by the `InspectTemplate` change. If not set, changing the template will not cause a data profile to update. - Structure is [documented below](#nested_targets_targets_other_cloud_target_generation_cadence_inspect_template_modified_cadence). + Structure is [documented below](#nested_targets_other_cloud_target_generation_cadence_inspect_template_modified_cadence). -The `inspect_template_modified_cadence` block supports: +The `inspect_template_modified_cadence` block supports: * `frequency` - (Optional) @@ -1399,14 +1399,14 @@ In addition to the arguments listed above, the following computed attributes are * `details` - (Optional) Detailed error codes and messages. - Structure is [documented below](#nested_errors_errors_details). + Structure is [documented below](#nested_errors_details). * `timestamp` - (Optional) The times the error occurred. List includes the oldest timestamp and the last 9 timestamps. -The `details` block supports: +The `details` block supports: * `code` - (Optional) diff --git a/website/docs/r/data_loss_prevention_inspect_template.html.markdown b/website/docs/r/data_loss_prevention_inspect_template.html.markdown index 86efbf5607b..553bdcbed21 100644 --- a/website/docs/r/data_loss_prevention_inspect_template.html.markdown +++ b/website/docs/r/data_loss_prevention_inspect_template.html.markdown @@ -403,14 +403,14 @@ The following arguments are supported: Type of information the findings limit applies to. Only one limit per infoType should be provided. If InfoTypeLimit does not have an infoType, the DLP API applies the limit against all infoTypes that are found but not specified in another InfoTypeLimit. - Structure is [documented below](#nested_inspect_config_limits_max_findings_per_info_type_max_findings_per_info_type_info_type). + Structure is [documented below](#nested_inspect_config_limits_max_findings_per_info_type_info_type). * `max_findings` - (Required) Max findings limit for the given infoType. -The `info_type` block supports: +The `info_type` block supports: * `name` - (Required) @@ -424,10 +424,10 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_config_limits_max_findings_per_info_type_max_findings_per_info_type_info_type_sensitivity_score). + Structure is [documented below](#nested_inspect_config_limits_max_findings_per_info_type_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) @@ -448,10 +448,10 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_config_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_config_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) @@ -463,15 +463,15 @@ The following arguments are supported: * `info_types` - (Required) List of infoTypes this rule set is applied to. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_info_types). + Structure is [documented below](#nested_inspect_config_rule_set_info_types). * `rules` - (Required) Set of rules to be applied to infoTypes. The rules are applied in order. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules). + Structure is [documented below](#nested_inspect_config_rule_set_rules). -The `info_types` block supports: +The `info_types` block supports: * `name` - (Required) @@ -485,35 +485,35 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_config_rule_set_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `rules` block supports: +The `rules` block supports: * `hotword_rule` - (Optional) Hotword-based detection rule. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_hotword_rule). + Structure is [documented below](#nested_inspect_config_rule_set_rules_hotword_rule). * `exclusion_rule` - (Optional) The rule that specifies conditions when findings of infoTypes specified in InspectionRuleSet are removed from results. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule). -The `hotword_rule` block supports: +The `hotword_rule` block supports: * `hotword_regex` - (Required) Regular expression pattern defining what qualifies as a hotword. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_hotword_rule_hotword_regex). + Structure is [documented below](#nested_inspect_config_rule_set_rules_hotword_rule_hotword_regex). * `proximity` - (Required) @@ -522,15 +522,15 @@ The following arguments are supported: used to match substrings of the finding itself. For example, the certainty of a phone number regex `(\d{3}) \d{3}-\d{4}` could be adjusted upwards if the area code is known to be the local area code of a company office using the hotword regex `(xxx)`, where `xxx` is the area code in question. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_hotword_rule_proximity). + Structure is [documented below](#nested_inspect_config_rule_set_rules_hotword_rule_proximity). * `likelihood_adjustment` - (Required) Likelihood adjustment to apply to all matching findings. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_hotword_rule_likelihood_adjustment). + Structure is [documented below](#nested_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment). -The `hotword_regex` block supports: +The `hotword_regex` block supports: * `pattern` - (Required) @@ -542,7 +542,7 @@ The following arguments are supported: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `proximity` block supports: +The `proximity` block supports: * `window_before` - (Optional) @@ -552,7 +552,7 @@ The following arguments are supported: (Optional) Number of characters after the finding to consider. Either this or window_before must be specified -The `likelihood_adjustment` block supports: +The `likelihood_adjustment` block supports: * `fixed_likelihood` - (Optional) @@ -568,7 +568,7 @@ The following arguments are supported: adjustment of 1 followed by an adjustment of -1 when base likelihood is VERY_LIKELY will result in a final likelihood of LIKELY. Either this or fixed_likelihood can be set. -The `exclusion_rule` block supports: +The `exclusion_rule` block supports: * `matching_type` - (Required) @@ -578,52 +578,52 @@ The following arguments are supported: * `dictionary` - (Optional) Dictionary which defines the rule. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_dictionary). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_dictionary). * `regex` - (Optional) Regular expression which defines the rule. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_regex). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_regex). * `exclude_info_types` - (Optional) Set of infoTypes for which findings would affect this rule. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_info_types). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types). * `exclude_by_hotword` - (Optional) Drop if the hotword rule is contained in the proximate context. For tabular data, the context includes the column name. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_by_hotword). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_exclude_by_hotword). -The `dictionary` block supports: +The `dictionary` block supports: * `word_list` - (Optional) List of words or phrases to search for. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_dictionary_word_list). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list). * `cloud_storage_path` - (Optional) Newline-delimited file of words in Cloud Storage. Only a single file is accepted. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_dictionary_cloud_storage_path). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path). -The `word_list` block supports: +The `word_list` block supports: * `words` - (Required) Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. -The `cloud_storage_path` block supports: +The `cloud_storage_path` block supports: * `path` - (Required) A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` -The `regex` block supports: +The `regex` block supports: * `pattern` - (Required) @@ -634,15 +634,15 @@ The following arguments are supported: (Optional) The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `exclude_info_types` block supports: +The `exclude_info_types` block supports: * `info_types` - (Required) If a finding is matched by any of the infoType detectors listed here, the finding will be excluded from the scan results. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_info_types_info_types). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types). -The `info_types` block supports: +The `info_types` block supports: * `name` - (Required) @@ -656,22 +656,22 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_info_types_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `exclude_by_hotword` block supports: +The `exclude_by_hotword` block supports: * `hotword_regex` - (Required) Regular expression pattern defining what qualifies as a hotword. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_by_hotword_hotword_regex). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_exclude_by_hotword_hotword_regex). * `proximity` - (Required) @@ -680,10 +680,10 @@ The following arguments are supported: used to match substrings of the finding itself. For example, the certainty of a phone number regex `(\d{3}) \d{3}-\d{4}` could be adjusted upwards if the area code is known to be the local area code of a company office using the hotword regex `(xxx)`, where `xxx` is the area code in question. - Structure is [documented below](#nested_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_by_hotword_proximity). + Structure is [documented below](#nested_inspect_config_rule_set_rules_exclusion_rule_exclude_by_hotword_proximity). -The `hotword_regex` block supports: +The `hotword_regex` block supports: * `pattern` - (Required) @@ -695,7 +695,7 @@ The following arguments are supported: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `proximity` block supports: +The `proximity` block supports: * `window_before` - (Optional) @@ -713,7 +713,7 @@ The following arguments are supported: infoTypes and that infoType is specified in `info_types` field. Specifying the latter adds findings to the one detected by the system. If built-in info type is not specified in `info_types` list then the name is treated as a custom info type. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_info_type). + Structure is [documented below](#nested_inspect_config_custom_info_types_info_type). * `likelihood` - (Optional) @@ -730,17 +730,17 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_config_custom_info_types_sensitivity_score). * `regex` - (Optional) Regular expression which defines the rule. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_regex). + Structure is [documented below](#nested_inspect_config_custom_info_types_regex). * `dictionary` - (Optional) Dictionary which defines the rule. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_dictionary). + Structure is [documented below](#nested_inspect_config_custom_info_types_dictionary). * `surrogate_type` - (Optional) @@ -749,10 +749,10 @@ The following arguments are supported: * `stored_type` - (Optional) A reference to a StoredInfoType to use with scanning. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_stored_type). + Structure is [documented below](#nested_inspect_config_custom_info_types_stored_type). -The `info_type` block supports: +The `info_type` block supports: * `name` - (Required) @@ -766,24 +766,24 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_info_type_sensitivity_score). + Structure is [documented below](#nested_inspect_config_custom_info_types_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `regex` block supports: +The `regex` block supports: * `pattern` - (Required) @@ -794,33 +794,33 @@ The following arguments are supported: (Optional) The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `dictionary` block supports: +The `dictionary` block supports: * `word_list` - (Optional) List of words or phrases to search for. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_dictionary_word_list). + Structure is [documented below](#nested_inspect_config_custom_info_types_dictionary_word_list). * `cloud_storage_path` - (Optional) Newline-delimited file of words in Cloud Storage. Only a single file is accepted. - Structure is [documented below](#nested_inspect_config_custom_info_types_custom_info_types_dictionary_cloud_storage_path). + Structure is [documented below](#nested_inspect_config_custom_info_types_dictionary_cloud_storage_path). -The `word_list` block supports: +The `word_list` block supports: * `words` - (Required) Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. -The `cloud_storage_path` block supports: +The `cloud_storage_path` block supports: * `path` - (Required) A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` -The `stored_type` block supports: +The `stored_type` block supports: * `name` - (Required) diff --git a/website/docs/r/data_loss_prevention_job_trigger.html.markdown b/website/docs/r/data_loss_prevention_job_trigger.html.markdown index 4da0fc245a1..667d41937a7 100644 --- a/website/docs/r/data_loss_prevention_job_trigger.html.markdown +++ b/website/docs/r/data_loss_prevention_job_trigger.html.markdown @@ -655,14 +655,14 @@ The following arguments are supported: * `schedule` - (Optional) Schedule for triggered jobs - Structure is [documented below](#nested_triggers_triggers_schedule). + Structure is [documented below](#nested_triggers_schedule). * `manual` - (Optional) For use with hybrid jobs. Jobs must be manually created and finished. -The `schedule` block supports: +The `schedule` block supports: * `recurrence_period_duration` - (Optional) @@ -757,14 +757,14 @@ The following arguments are supported: Type of information the findings limit applies to. Only one limit per infoType should be provided. If InfoTypeLimit does not have an infoType, the DLP API applies the limit against all infoTypes that are found but not specified in another InfoTypeLimit. - Structure is [documented below](#nested_inspect_job_inspect_config_limits_max_findings_per_info_type_max_findings_per_info_type_info_type). + Structure is [documented below](#nested_inspect_job_inspect_config_limits_max_findings_per_info_type_info_type). * `max_findings` - (Optional) Max findings limit for the given infoType. -The `info_type` block supports: +The `info_type` block supports: * `name` - (Required) @@ -778,10 +778,10 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_job_inspect_config_limits_max_findings_per_info_type_max_findings_per_info_type_info_type_sensitivity_score). + Structure is [documented below](#nested_inspect_job_inspect_config_limits_max_findings_per_info_type_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) @@ -802,10 +802,10 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_job_inspect_config_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_job_inspect_config_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) @@ -817,15 +817,15 @@ The following arguments are supported: * `info_types` - (Optional) List of infoTypes this rule set is applied to. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_info_types). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_info_types). * `rules` - (Required) Set of rules to be applied to infoTypes. The rules are applied in order. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules). -The `info_types` block supports: +The `info_types` block supports: * `name` - (Required) @@ -839,35 +839,35 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `rules` block supports: +The `rules` block supports: * `hotword_rule` - (Optional) Hotword-based detection rule. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_hotword_rule). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_hotword_rule). * `exclusion_rule` - (Optional) The rule that specifies conditions when findings of infoTypes specified in InspectionRuleSet are removed from results. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule). -The `hotword_rule` block supports: +The `hotword_rule` block supports: * `hotword_regex` - (Optional) Regular expression pattern defining what qualifies as a hotword. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_hotword_rule_hotword_regex). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_hotword_rule_hotword_regex). * `proximity` - (Optional) @@ -876,15 +876,15 @@ The following arguments are supported: used to match substrings of the finding itself. For example, the certainty of a phone number regex `(\d{3}) \d{3}-\d{4}` could be adjusted upwards if the area code is known to be the local area code of a company office using the hotword regex `(xxx)`, where `xxx` is the area code in question. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_hotword_rule_proximity). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_hotword_rule_proximity). * `likelihood_adjustment` - (Optional) Likelihood adjustment to apply to all matching findings. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_hotword_rule_likelihood_adjustment). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment). -The `hotword_regex` block supports: +The `hotword_regex` block supports: * `pattern` - (Optional) @@ -896,7 +896,7 @@ The following arguments are supported: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `proximity` block supports: +The `proximity` block supports: * `window_before` - (Optional) @@ -906,7 +906,7 @@ The following arguments are supported: (Optional) Number of characters after the finding to consider. Either this or window_before must be specified -The `likelihood_adjustment` block supports: +The `likelihood_adjustment` block supports: * `fixed_likelihood` - (Optional) @@ -922,7 +922,7 @@ The following arguments are supported: adjustment of 1 followed by an adjustment of -1 when base likelihood is VERY_LIKELY will result in a final likelihood of LIKELY. Either this or fixed_likelihood can be set. -The `exclusion_rule` block supports: +The `exclusion_rule` block supports: * `matching_type` - (Required) @@ -932,51 +932,51 @@ The following arguments are supported: * `dictionary` - (Optional) Dictionary which defines the rule. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_dictionary). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_dictionary). * `regex` - (Optional) Regular expression which defines the rule. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_regex). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_regex). * `exclude_info_types` - (Optional) Set of infoTypes for which findings would affect this rule. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_info_types). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types). * `exclude_by_hotword` - (Optional) Drop if the hotword rule is contained in the proximate context. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_by_hotword). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_exclude_by_hotword). -The `dictionary` block supports: +The `dictionary` block supports: * `word_list` - (Optional) List of words or phrases to search for. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_dictionary_word_list). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list). * `cloud_storage_path` - (Optional) Newline-delimited file of words in Cloud Storage. Only a single file is accepted. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_dictionary_cloud_storage_path). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path). -The `word_list` block supports: +The `word_list` block supports: * `words` - (Required) Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. -The `cloud_storage_path` block supports: +The `cloud_storage_path` block supports: * `path` - (Required) A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` -The `regex` block supports: +The `regex` block supports: * `pattern` - (Required) @@ -987,15 +987,15 @@ The following arguments are supported: (Optional) The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `exclude_info_types` block supports: +The `exclude_info_types` block supports: * `info_types` - (Required) If a finding is matched by any of the infoType detectors listed here, the finding will be excluded from the scan results. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_info_types_info_types). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types). -The `info_types` block supports: +The `info_types` block supports: * `name` - (Required) @@ -1009,22 +1009,22 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_info_types_info_types_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `exclude_by_hotword` block supports: +The `exclude_by_hotword` block supports: * `hotword_regex` - (Optional) Regular expression pattern defining what qualifies as a hotword. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_by_hotword_hotword_regex). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_exclude_by_hotword_hotword_regex). * `proximity` - (Optional) @@ -1033,10 +1033,10 @@ The following arguments are supported: used to match substrings of the finding itself. For example, the certainty of a phone number regex `(\d{3}) \d{3}-\d{4}` could be adjusted upwards if the area code is known to be the local area code of a company office using the hotword regex `(xxx)`, where `xxx` is the area code in question. - Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rule_set_rules_rules_exclusion_rule_exclude_by_hotword_proximity). + Structure is [documented below](#nested_inspect_job_inspect_config_rule_set_rules_exclusion_rule_exclude_by_hotword_proximity). -The `hotword_regex` block supports: +The `hotword_regex` block supports: * `pattern` - (Optional) @@ -1048,7 +1048,7 @@ The following arguments are supported: The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `proximity` block supports: +The `proximity` block supports: * `window_before` - (Optional) @@ -1066,7 +1066,7 @@ The following arguments are supported: infoTypes and that infoType is specified in `info_types` field. Specifying the latter adds findings to the one detected by the system. If built-in info type is not specified in `info_types` list then the name is treated as a custom info type. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_info_type). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_info_type). * `likelihood` - (Optional) @@ -1083,29 +1083,29 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_sensitivity_score). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_sensitivity_score). * `regex` - (Optional) Regular expression which defines the rule. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_regex). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_regex). * `dictionary` - (Optional) Dictionary which defines the rule. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_dictionary). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_dictionary). * `stored_type` - (Optional) A reference to a StoredInfoType to use with scanning. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_stored_type). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_stored_type). * `surrogate_type` - (Optional) Message for detecting output from deidentification transformations that support reversing. -The `info_type` block supports: +The `info_type` block supports: * `name` - (Required) @@ -1119,24 +1119,24 @@ The following arguments are supported: * `sensitivity_score` - (Optional) Optional custom sensitivity for this InfoType. This only applies to data profiling. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_info_type_sensitivity_score). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_info_type_sensitivity_score). -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `sensitivity_score` block supports: +The `sensitivity_score` block supports: * `score` - (Required) The sensitivity score applied to the resource. Possible values are: `SENSITIVITY_LOW`, `SENSITIVITY_MODERATE`, `SENSITIVITY_HIGH`. -The `regex` block supports: +The `regex` block supports: * `pattern` - (Required) @@ -1147,33 +1147,33 @@ The following arguments are supported: (Optional) The index of the submatch to extract as findings. When not specified, the entire match is returned. No more than 3 may be included. -The `dictionary` block supports: +The `dictionary` block supports: * `word_list` - (Optional) List of words or phrases to search for. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_dictionary_word_list). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_dictionary_word_list). * `cloud_storage_path` - (Optional) Newline-delimited file of words in Cloud Storage. Only a single file is accepted. - Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_custom_info_types_dictionary_cloud_storage_path). + Structure is [documented below](#nested_inspect_job_inspect_config_custom_info_types_dictionary_cloud_storage_path). -The `word_list` block supports: +The `word_list` block supports: * `words` - (Required) Words or phrases defining the dictionary. The dictionary must contain at least one phrase and every phrase must contain at least 2 characters that are letters or digits. -The `cloud_storage_path` block supports: +The `cloud_storage_path` block supports: * `path` - (Required) A url representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` -The `stored_type` block supports: +The `stored_type` block supports: * `name` - (Required) @@ -1473,12 +1473,12 @@ The following arguments are supported: * `save_findings` - (Optional) If set, the detailed findings will be persisted to the specified OutputStorageConfig. Only a single instance of this action can be specified. Compatible with: Inspect, Risk - Structure is [documented below](#nested_inspect_job_actions_actions_save_findings). + Structure is [documented below](#nested_inspect_job_actions_save_findings). * `pub_sub` - (Optional) Publish a message into a given Pub/Sub topic when the job completes. - Structure is [documented below](#nested_inspect_job_actions_actions_pub_sub). + Structure is [documented below](#nested_inspect_job_actions_pub_sub). * `publish_summary_to_cscc` - (Optional) @@ -1501,27 +1501,27 @@ The following arguments are supported: * `deidentify` - (Optional) Create a de-identified copy of the requested table or files. - Structure is [documented below](#nested_inspect_job_actions_actions_deidentify). + Structure is [documented below](#nested_inspect_job_actions_deidentify). * `publish_to_stackdriver` - (Optional) Enable Stackdriver metric dlp.googleapis.com/findingCount. -The `save_findings` block supports: +The `save_findings` block supports: * `output_config` - (Required) Information on where to store output - Structure is [documented below](#nested_inspect_job_actions_actions_save_findings_output_config). + Structure is [documented below](#nested_inspect_job_actions_save_findings_output_config). -The `output_config` block supports: +The `output_config` block supports: * `table` - (Optional) Information on the location of the target BigQuery Table. - Structure is [documented below](#nested_inspect_job_actions_actions_save_findings_output_config_table). + Structure is [documented below](#nested_inspect_job_actions_save_findings_output_config_table). * `storage_path` - (Optional) @@ -1530,7 +1530,7 @@ The following arguments are supported: the naming convention -, for example: my-job-id-2. Supported for InspectJobs. The bucket must not be the same as the bucket being inspected. If storing findings to Cloud Storage, the output schema field should not be set. If set, it will be ignored. - Structure is [documented below](#nested_inspect_job_actions_actions_save_findings_output_config_storage_path). + Structure is [documented below](#nested_inspect_job_actions_save_findings_output_config_storage_path). * `output_schema` - (Optional) @@ -1544,7 +1544,7 @@ The following arguments are supported: Possible values are: `BASIC_COLUMNS`, `GCS_COLUMNS`, `DATASTORE_COLUMNS`, `BIG_QUERY_COLUMNS`, `ALL_COLUMNS`. -The `table` block supports: +The `table` block supports: * `project_id` - (Required) @@ -1559,20 +1559,20 @@ The following arguments are supported: Name of the table. If is not set a new one will be generated for you with the following format: `dlp_googleapis_yyyy_mm_dd_[dlp_job_id]`. Pacific timezone will be used for generating the date details. -The `storage_path` block supports: +The `storage_path` block supports: * `path` - (Required) A URL representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` -The `pub_sub` block supports: +The `pub_sub` block supports: * `topic` - (Required) Cloud Pub/Sub topic to send notifications to. -The `deidentify` block supports: +The `deidentify` block supports: * `cloud_storage_output` - (Required) @@ -1592,15 +1592,15 @@ The following arguments are supported: * `transformation_config` - (Optional) User specified deidentify templates and configs for structured, unstructured, and image files. - Structure is [documented below](#nested_inspect_job_actions_actions_deidentify_transformation_config). + Structure is [documented below](#nested_inspect_job_actions_deidentify_transformation_config). * `transformation_details_storage_config` - (Optional) Config for storing transformation details. - Structure is [documented below](#nested_inspect_job_actions_actions_deidentify_transformation_details_storage_config). + Structure is [documented below](#nested_inspect_job_actions_deidentify_transformation_details_storage_config). -The `transformation_config` block supports: +The `transformation_config` block supports: * `deidentify_template` - (Optional) @@ -1614,15 +1614,15 @@ The following arguments are supported: (Optional) If this template is specified, it will serve as the de-identify template for images. -The `transformation_details_storage_config` block supports: +The `transformation_details_storage_config` block supports: * `table` - (Required) The BigQuery table in which to store the output. - Structure is [documented below](#nested_inspect_job_actions_actions_deidentify_transformation_details_storage_config_table). + Structure is [documented below](#nested_inspect_job_actions_deidentify_transformation_details_storage_config_table). -The `table` block supports: +The `table` block supports: * `dataset_id` - (Required) diff --git a/website/docs/r/dataform_repository_release_config.html.markdown b/website/docs/r/dataform_repository_release_config.html.markdown index 4780b4e2e77..648e8010f3d 100644 --- a/website/docs/r/dataform_repository_release_config.html.markdown +++ b/website/docs/r/dataform_repository_release_config.html.markdown @@ -208,10 +208,10 @@ In addition to the arguments listed above, the following computed attributes are * `error_status` - (Output) The error status encountered upon this attempt to create the compilation result, if the attempt was unsuccessful. - Structure is [documented below](#nested_recent_scheduled_release_records_recent_scheduled_release_records_error_status). + Structure is [documented below](#nested_recent_scheduled_release_records_error_status). -The `error_status` block contains: +The `error_status` block contains: * `code` - (Output) diff --git a/website/docs/r/dataform_repository_workflow_config.html.markdown b/website/docs/r/dataform_repository_workflow_config.html.markdown index 85c44831810..3e77b2c624f 100644 --- a/website/docs/r/dataform_repository_workflow_config.html.markdown +++ b/website/docs/r/dataform_repository_workflow_config.html.markdown @@ -250,10 +250,10 @@ In addition to the arguments listed above, the following computed attributes are * `error_status` - (Output) The error status encountered upon this attempt to create the workflow invocation, if the attempt was unsuccessful. - Structure is [documented below](#nested_recent_scheduled_execution_records_recent_scheduled_execution_records_error_status). + Structure is [documented below](#nested_recent_scheduled_execution_records_error_status). -The `error_status` block contains: +The `error_status` block contains: * `code` - (Output) diff --git a/website/docs/r/dataplex_datascan.html.markdown b/website/docs/r/dataplex_datascan.html.markdown index b917bb2fcd6..9c597e3de8f 100644 --- a/website/docs/r/dataplex_datascan.html.markdown +++ b/website/docs/r/dataplex_datascan.html.markdown @@ -110,6 +110,31 @@ resource "google_bigquery_dataset" "source" { delete_contents_on_destroy = true } ``` +## Example Usage - Dataplex Datascan Onetime Profile + + +```hcl +resource "google_dataplex_datascan" "onetime_profile" { + location = "us-central1" + data_scan_id = "dataprofile-onetime" + + data { + resource = "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare" + } + + execution_spec { + trigger { + one_time { + ttl_after_scan_completion = "120s" + } + } + } + +data_profile_spec {} + + project = "my-project-name" +} +``` ## Example Usage - Dataplex Datascan Basic Quality @@ -264,6 +289,40 @@ resource "google_dataplex_datascan" "full_quality" { } + project = "my-project-name" +} +``` +## Example Usage - Dataplex Datascan Onetime Quality + + +```hcl +resource "google_dataplex_datascan" "onetime_quality" { + location = "us-central1" + data_scan_id = "dataquality-onetime" + + data { + resource = "//bigquery.googleapis.com/projects/bigquery-public-data/datasets/samples/tables/shakespeare" + } + + execution_spec { + trigger { + one_time { + ttl_after_scan_completion = "120s" + } + } + } + + data_quality_spec { + rules { + dimension = "VALIDITY" + name = "rule1" + description = "rule 1 for validity dimension" + table_condition_expectation { + sql_expression = "COUNT(*) > 0" + } + } + } + project = "my-project-name" } ``` @@ -369,6 +428,37 @@ resource "google_bigquery_connection" "tf_test_connection" { cloud_resource {} } ``` +## Example Usage - Dataplex Datascan Onetime Discovery + + +```hcl +resource "google_dataplex_datascan" "onetime_discovery" { + location = "us-central1" + data_scan_id = "datadiscovery-onetime" + + data { + resource = "//storage.googleapis.com/projects/${google_storage_bucket.tf_test_bucket.project}/buckets/${google_storage_bucket.tf_test_bucket.name}" + } + + execution_spec { + trigger { + one_time { + ttl_after_scan_completion = "120s" + } + } + } + + data_discovery_spec {} + + project = "my-project-name" +} + +resource "google_storage_bucket" "tf_test_bucket" { + name = "tf-test-bucket-name-%{random_suffix}" + location = "us-west1" + uniform_bucket_level_access = true +} +``` ## Example Usage - Dataplex Datascan Documentation @@ -454,6 +544,93 @@ resource "google_dataplex_datascan" "documentation" { project = "my-project-name" } ``` +## Example Usage - Dataplex Datascan Onetime Documentation + + +```hcl +resource "google_bigquery_dataset" "tf_dataplex_test_dataset" { + dataset_id = "tf_dataplex_test_dataset_id_%{random_suffix}" + default_table_expiration_ms = 3600000 +} + +resource "google_bigquery_table" "tf_dataplex_test_table" { + dataset_id = google_bigquery_dataset.tf_dataplex_test_dataset.dataset_id + table_id = "tf_dataplex_test_table_id_%{random_suffix}" + deletion_protection = false + schema = <The `schedule` block supports: @@ -559,6 +741,12 @@ The following arguments are supported: (Required) Cron schedule for running scans periodically. This field is required for Schedule scans. +The `one_time` block supports: + +* `ttl_after_scan_completion` - + (Optional) + Time to live for the DataScan and its results after the one-time run completes. Accepts a string with a unit suffix 's' (e.g., '7200s'). Default is 24 hours. Ranges between 0 and 31536000 seconds (1 year). + The `data_quality_spec` block supports: * `sampling_percent` - @@ -677,7 +865,7 @@ The following arguments are supported: * `range_expectation` - (Optional) ColumnMap rule which evaluates whether each column value lies between a specified range. - Structure is [documented below](#nested_data_quality_spec_rules_rules_range_expectation). + Structure is [documented below](#nested_data_quality_spec_rules_range_expectation). * `non_null_expectation` - (Optional) @@ -686,12 +874,12 @@ The following arguments are supported: * `set_expectation` - (Optional) ColumnMap rule which evaluates whether each column value is contained by a specified set. - Structure is [documented below](#nested_data_quality_spec_rules_rules_set_expectation). + Structure is [documented below](#nested_data_quality_spec_rules_set_expectation). * `regex_expectation` - (Optional) ColumnMap rule which evaluates whether each column value matches a specified regex. - Structure is [documented below](#nested_data_quality_spec_rules_rules_regex_expectation). + Structure is [documented below](#nested_data_quality_spec_rules_regex_expectation). * `uniqueness_expectation` - (Optional) @@ -700,25 +888,25 @@ The following arguments are supported: * `statistic_range_expectation` - (Optional) ColumnAggregate rule which evaluates whether the column aggregate statistic lies between a specified range. - Structure is [documented below](#nested_data_quality_spec_rules_rules_statistic_range_expectation). + Structure is [documented below](#nested_data_quality_spec_rules_statistic_range_expectation). * `row_condition_expectation` - (Optional) Table rule which evaluates whether each row passes the specified condition. - Structure is [documented below](#nested_data_quality_spec_rules_rules_row_condition_expectation). + Structure is [documented below](#nested_data_quality_spec_rules_row_condition_expectation). * `table_condition_expectation` - (Optional) Table rule which evaluates whether the provided expression is true. - Structure is [documented below](#nested_data_quality_spec_rules_rules_table_condition_expectation). + Structure is [documented below](#nested_data_quality_spec_rules_table_condition_expectation). * `sql_assertion` - (Optional) Table rule which evaluates whether any row matches invalid state. - Structure is [documented below](#nested_data_quality_spec_rules_rules_sql_assertion). + Structure is [documented below](#nested_data_quality_spec_rules_sql_assertion). -The `range_expectation` block supports: +The `range_expectation` block supports: * `min_value` - (Optional) @@ -738,19 +926,19 @@ The following arguments are supported: Whether each value needs to be strictly lesser than ('<') the maximum, or if equality is allowed. Only relevant if a maxValue has been defined. Default = false. -The `set_expectation` block supports: +The `set_expectation` block supports: * `values` - (Required) Expected values for the column value. -The `regex_expectation` block supports: +The `regex_expectation` block supports: * `regex` - (Required) A regular expression the column value is expected to match. -The `statistic_range_expectation` block supports: +The `statistic_range_expectation` block supports: * `statistic` - (Required) @@ -777,19 +965,19 @@ The following arguments are supported: Whether column statistic needs to be strictly lesser than ('<') the maximum, or if equality is allowed. Only relevant if a maxValue has been defined. Default = false. -The `row_condition_expectation` block supports: +The `row_condition_expectation` block supports: * `sql_expression` - (Required) The SQL expression. -The `table_condition_expectation` block supports: +The `table_condition_expectation` block supports: * `sql_expression` - (Required) The SQL expression. -The `sql_assertion` block supports: +The `sql_assertion` block supports: * `sql_statement` - (Required) diff --git a/website/docs/r/dataplex_entry.html.markdown b/website/docs/r/dataplex_entry.html.markdown index 517e6531ea5..7ec6d0e302c 100644 --- a/website/docs/r/dataplex_entry.html.markdown +++ b/website/docs/r/dataplex_entry.html.markdown @@ -201,6 +201,171 @@ resource "google_dataplex_entry" "test_entry_full" { depends_on = [google_dataplex_aspect_type.aspect-type-full-two, google_dataplex_aspect_type.aspect-type-full-one] } ``` +## Example Usage - Dataplex Entry Bigquery Table + + +```hcl +resource "google_dataplex_aspect_type" "aspect-type-full-one" { + aspect_type_id = "aspect-type-one" + location = "us-central1" + project = "1111111111111" + + metadata_template = <The `aspect` block supports: +The `aspect` block supports: * `aspect_type` - (Output) diff --git a/website/docs/r/datastream_connection_profile.html.markdown b/website/docs/r/datastream_connection_profile.html.markdown index 1db42c970ca..dbebe32aabd 100644 --- a/website/docs/r/datastream_connection_profile.html.markdown +++ b/website/docs/r/datastream_connection_profile.html.markdown @@ -31,7 +31,7 @@ To get more information about ConnectionProfile, see: * [Official Documentation](https://cloud.google.com/datastream/docs/create-connection-profiles) ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `oracle_profile.password`, `mysql_profile.password`, `mysql_profile.ssl_config.client_key`, `mysql_profile.ssl_config.client_certificate`, `mysql_profile.ssl_config.ca_certificate`, `postgresql_profile.password`, `sql_server_profile.password`, `mongodb_profile.password`, `mongodb_profile.ssl_config.client_key`, `mongodb_profile.ssl_config.client_certificate`, `mongodb_profile.ssl_config.ca_certificate`, `mongodb_profile.ssl_config.secret_manager_stored_client_key`, `forward_ssh_connectivity.password`, `forward_ssh_connectivity.private_key`. +values will be stored in the raw state as plain text: `oracle_profile.password`, `mysql_profile.password`, `mysql_profile.ssl_config.client_key`, `mysql_profile.ssl_config.client_certificate`, `mysql_profile.ssl_config.ca_certificate`, `postgresql_profile.password`, `postgresql_profile.ssl_config.server_verification.ca_certificate`, `postgresql_profile.ssl_config.server_and_client_verification.client_certificate`, `postgresql_profile.ssl_config.server_and_client_verification.client_key`, `postgresql_profile.ssl_config.server_and_client_verification.ca_certificate`, `sql_server_profile.password`, `mongodb_profile.password`, `mongodb_profile.ssl_config.client_key`, `mongodb_profile.ssl_config.client_certificate`, `mongodb_profile.ssl_config.ca_certificate`, `mongodb_profile.ssl_config.secret_manager_stored_client_key`, `forward_ssh_connectivity.password`, `forward_ssh_connectivity.private_key`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
@@ -357,6 +357,85 @@ resource "google_datastream_connection_profile" "default" { } } ``` + +## Example Usage - Datastream Stream Postgresql Sslconfig Server And Client Verification + + +```hcl +data "google_datastream_static_ips" "datastream_ips" { + location = "us-central1" +} + +resource "google_sql_database_instance" "instance" { + name = "my-instance" + database_version = "POSTGRES_15" + region = "us-central1" + settings { + tier = "db-f1-micro" + ip_configuration { + ipv4_enabled = true + ssl_mode = "TRUSTED_CLIENT_CERTIFICATE_REQUIRED" + dynamic "authorized_networks" { + for_each = data.google_datastream_static_ips.datastream_ips.static_ips + iterator = ip + + content { + name = format("datastream-%d", ip.key) + value = ip.value + } + } + } + } + + deletion_protection = true +} + +resource "google_sql_database" "db" { + instance = google_sql_database_instance.instance.name + name = "db" +} + +resource "random_password" "pwd" { + length = 16 + special = false +} + +resource "google_sql_user" "user" { + name = "user" + instance = google_sql_database_instance.instance.name + password = random_password.pwd.result +} + +resource "google_sql_ssl_cert" "client_cert" { + common_name = "client-name" + instance = google_sql_database_instance.instance.name +} + +resource "google_datastream_connection_profile" "default" { + display_name = "Connection Profile" + location = "us-central1" + connection_profile_id = "profile-id" + + postgresql_profile { + hostname = google_sql_database_instance.instance.public_ip_address + port = 5432 + username = "user" + password = random_password.pwd.result + database = google_sql_database.db.name + ssl_config { + server_and_client_verification { + client_certificate = google_sql_ssl_cert.client_cert.cert + client_key = google_sql_ssl_cert.client_cert.private_key + ca_certificate = google_sql_ssl_cert.client_cert.server_ca_cert + } + } + } +} +``` ## Example Usage - Datastream Connection Profile Salesforce @@ -644,6 +723,58 @@ The following arguments are supported: (Required) Database for the PostgreSQL connection. +* `ssl_config` - + (Optional) + SSL configuration for the PostgreSQL connection. + Structure is [documented below](#nested_postgresql_profile_ssl_config). + + +The `ssl_config` block supports: + +* `server_verification` - + (Optional) + If this field is set, the communication will be encrypted with TLS encryption + and the server identity will be authenticated. + Structure is [documented below](#nested_postgresql_profile_ssl_config_server_verification). + +* `server_and_client_verification` - + (Optional) + If this field is set, the communication will be encrypted with TLS encryption + and both the server identity and the client identity will be authenticated. + Structure is [documented below](#nested_postgresql_profile_ssl_config_server_and_client_verification). + + +The `server_verification` block supports: + +* `ca_certificate` - + (Required) + PEM-encoded server root CA certificate. + **Note**: This property is sensitive and will not be displayed in the plan. + +The `server_and_client_verification` block supports: + +* `client_certificate` - + (Required) + PEM-encoded certificate used by the source database to authenticate the + client identity (i.e., the Datastream's identity). This certificate is + signed by either a root certificate trusted by the server or one or more + intermediate certificates (which is stored with the leaf certificate) to + link to this certificate to the trusted root certificate. + **Note**: This property is sensitive and will not be displayed in the plan. + +* `client_key` - + (Required) + PEM-encoded private key associated with the client certificate. + This value will be used during the SSL/TLS handshake, allowing + the PostgreSQL server to authenticate the client's identity, + i.e. identity of the stream. + **Note**: This property is sensitive and will not be displayed in the plan. + +* `ca_certificate` - + (Required) + PEM-encoded server root CA certificate. + **Note**: This property is sensitive and will not be displayed in the plan. + The `salesforce_profile` block supports: * `domain` - diff --git a/website/docs/r/datastream_stream.html.markdown b/website/docs/r/datastream_stream.html.markdown index 536d6d792ed..65c48ddcd9f 100644 --- a/website/docs/r/datastream_stream.html.markdown +++ b/website/docs/r/datastream_stream.html.markdown @@ -1359,6 +1359,88 @@ resource "google_datastream_stream" "default" { } } ``` +## Example Usage - Datastream Stream Rule Sets Bigquery + + +```hcl +data "google_project" "project" { +} + +resource "google_datastream_stream" "stream" { + stream_id = "rules-stream" + location = "us-central1" + display_name = "BigQuery Stream with Rules" + + source_config { + source_connection_profile = "rules-source-profile" + mysql_source_config { + include_objects { + mysql_databases { + database = "my_database" + } + } + binary_log_position {} + } + } + + destination_config { + destination_connection_profile = "rules-dest-profile" + bigquery_destination_config { + single_target_dataset { + dataset_id = "rules-project:rules-dataset" + } + } + } + + backfill_none {} + + rule_sets { + object_filter { + source_object_identifier { + mysql_identifier { + database = "test_database" + table = "test_table_1" + } + } + } + customization_rules { + bigquery_clustering { + columns = ["user_id"] + } + } + customization_rules { + bigquery_partitioning { + ingestion_time_partition { + } + } + } + } + + rule_sets { + object_filter { + source_object_identifier { + mysql_identifier { + database = "test_database" + table = "test_table_2" + } + } + } + customization_rules { + bigquery_clustering { + columns = ["event_time"] + } + } + customization_rules { + bigquery_partitioning { + time_unit_partition { + column = "event_time" + partitioning_time_granularity = "PARTITIONING_TIME_GRANULARITY_DAY" + } + } + } + } +} +``` ## Example Usage - Datastream Stream Salesforce @@ -1494,6 +1576,11 @@ The following arguments are supported: A reference to a KMS encryption key. If provided, it will be used to encrypt the data. If left blank, data will be encrypted using an internal Stream-specific encryption key provisioned through KMS. +* `rule_sets` - + (Optional) + Rule sets to apply to the stream. + Structure is [documented below](#nested_rule_sets). + * `create_without_validation` - (Optional) Create the stream without validating it. @@ -1593,10 +1680,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `mysql_tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_source_config_mysql_source_config_include_objects_mysql_databases_mysql_databases_mysql_tables). + Structure is [documented below](#nested_source_config_mysql_source_config_include_objects_mysql_databases_mysql_tables). -The `mysql_tables` block supports: +The `mysql_tables` block supports: * `table` - (Required) @@ -1605,10 +1692,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `mysql_columns` - (Optional) MySQL columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_mysql_source_config_include_objects_mysql_databases_mysql_databases_mysql_tables_mysql_tables_mysql_columns). + Structure is [documented below](#nested_source_config_mysql_source_config_include_objects_mysql_databases_mysql_tables_mysql_columns). -The `mysql_columns` block supports: +The `mysql_columns` block supports: * `column` - (Optional) @@ -1656,10 +1743,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `mysql_tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_source_config_mysql_source_config_exclude_objects_mysql_databases_mysql_databases_mysql_tables). + Structure is [documented below](#nested_source_config_mysql_source_config_exclude_objects_mysql_databases_mysql_tables). -The `mysql_tables` block supports: +The `mysql_tables` block supports: * `table` - (Required) @@ -1668,10 +1755,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `mysql_columns` - (Optional) MySQL columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_mysql_source_config_exclude_objects_mysql_databases_mysql_databases_mysql_tables_mysql_tables_mysql_columns). + Structure is [documented below](#nested_source_config_mysql_source_config_exclude_objects_mysql_databases_mysql_tables_mysql_columns). -The `mysql_columns` block supports: +The `mysql_columns` block supports: * `column` - (Optional) @@ -1750,10 +1837,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `oracle_tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_source_config_oracle_source_config_include_objects_oracle_schemas_oracle_schemas_oracle_tables). + Structure is [documented below](#nested_source_config_oracle_source_config_include_objects_oracle_schemas_oracle_tables). -The `oracle_tables` block supports: +The `oracle_tables` block supports: * `table` - (Required) @@ -1762,10 +1849,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `oracle_columns` - (Optional) Oracle columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_oracle_source_config_include_objects_oracle_schemas_oracle_schemas_oracle_tables_oracle_tables_oracle_columns). + Structure is [documented below](#nested_source_config_oracle_source_config_include_objects_oracle_schemas_oracle_tables_oracle_columns). -The `oracle_columns` block supports: +The `oracle_columns` block supports: * `column` - (Optional) @@ -1821,10 +1908,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `oracle_tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_source_config_oracle_source_config_exclude_objects_oracle_schemas_oracle_schemas_oracle_tables). + Structure is [documented below](#nested_source_config_oracle_source_config_exclude_objects_oracle_schemas_oracle_tables). -The `oracle_tables` block supports: +The `oracle_tables` block supports: * `table` - (Required) @@ -1833,10 +1920,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `oracle_columns` - (Optional) Oracle columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_oracle_source_config_exclude_objects_oracle_schemas_oracle_schemas_oracle_tables_oracle_tables_oracle_columns). + Structure is [documented below](#nested_source_config_oracle_source_config_exclude_objects_oracle_schemas_oracle_tables_oracle_columns). -The `oracle_columns` block supports: +The `oracle_columns` block supports: * `column` - (Optional) @@ -1920,10 +2007,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `postgresql_tables` - (Optional) Tables in the schema. - Structure is [documented below](#nested_source_config_postgresql_source_config_include_objects_postgresql_schemas_postgresql_schemas_postgresql_tables). + Structure is [documented below](#nested_source_config_postgresql_source_config_include_objects_postgresql_schemas_postgresql_tables). -The `postgresql_tables` block supports: +The `postgresql_tables` block supports: * `table` - (Required) @@ -1932,10 +2019,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `postgresql_columns` - (Optional) PostgreSQL columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_postgresql_source_config_include_objects_postgresql_schemas_postgresql_schemas_postgresql_tables_postgresql_tables_postgresql_columns). + Structure is [documented below](#nested_source_config_postgresql_source_config_include_objects_postgresql_schemas_postgresql_tables_postgresql_columns). -The `postgresql_columns` block supports: +The `postgresql_columns` block supports: * `column` - (Optional) @@ -1987,10 +2074,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `postgresql_tables` - (Optional) Tables in the schema. - Structure is [documented below](#nested_source_config_postgresql_source_config_exclude_objects_postgresql_schemas_postgresql_schemas_postgresql_tables). + Structure is [documented below](#nested_source_config_postgresql_source_config_exclude_objects_postgresql_schemas_postgresql_tables). -The `postgresql_tables` block supports: +The `postgresql_tables` block supports: * `table` - (Required) @@ -1999,10 +2086,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `postgresql_columns` - (Optional) PostgreSQL columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_postgresql_source_config_exclude_objects_postgresql_schemas_postgresql_schemas_postgresql_tables_postgresql_tables_postgresql_columns). + Structure is [documented below](#nested_source_config_postgresql_source_config_exclude_objects_postgresql_schemas_postgresql_tables_postgresql_columns). -The `postgresql_columns` block supports: +The `postgresql_columns` block supports: * `column` - (Optional) @@ -2083,10 +2170,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_source_config_sql_server_source_config_include_objects_schemas_schemas_tables). + Structure is [documented below](#nested_source_config_sql_server_source_config_include_objects_schemas_tables). -The `tables` block supports: +The `tables` block supports: * `table` - (Required) @@ -2095,10 +2182,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `columns` - (Optional) SQL Server columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_sql_server_source_config_include_objects_schemas_schemas_tables_tables_columns). + Structure is [documented below](#nested_source_config_sql_server_source_config_include_objects_schemas_tables_columns). -The `columns` block supports: +The `columns` block supports: * `column` - (Optional) @@ -2150,10 +2237,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_source_config_sql_server_source_config_exclude_objects_schemas_schemas_tables). + Structure is [documented below](#nested_source_config_sql_server_source_config_exclude_objects_schemas_tables). -The `tables` block supports: +The `tables` block supports: * `table` - (Required) @@ -2162,10 +2249,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `columns` - (Optional) SQL Server columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_source_config_sql_server_source_config_exclude_objects_schemas_schemas_tables_tables_columns). + Structure is [documented below](#nested_source_config_sql_server_source_config_exclude_objects_schemas_tables_columns). -The `columns` block supports: +The `columns` block supports: * `column` - (Optional) @@ -2234,10 +2321,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `fields` - (Optional) Fields in the Salesforce object. When unspecified as part of include/exclude objects, includes/excludes everything/nothing. - Structure is [documented below](#nested_source_config_salesforce_source_config_include_objects_objects_objects_fields). + Structure is [documented below](#nested_source_config_salesforce_source_config_include_objects_objects_fields). -The `fields` block supports: +The `fields` block supports: * `name` - (Optional) @@ -2260,10 +2347,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `fields` - (Optional) Fields in the Salesforce object. When unspecified as part of include/exclude objects, includes/excludes everything/nothing. - Structure is [documented below](#nested_source_config_salesforce_source_config_exclude_objects_objects_objects_fields). + Structure is [documented below](#nested_source_config_salesforce_source_config_exclude_objects_objects_fields). -The `fields` block supports: +The `fields` block supports: * `name` - (Optional) @@ -2305,10 +2392,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `collections` - (Optional) Collections in the database. - Structure is [documented below](#nested_source_config_mongodb_source_config_include_objects_databases_databases_collections). + Structure is [documented below](#nested_source_config_mongodb_source_config_include_objects_databases_collections). -The `collections` block supports: +The `collections` block supports: * `collection` - (Optional) @@ -2317,10 +2404,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `fields` - (Optional) Fields in the collection. - Structure is [documented below](#nested_source_config_mongodb_source_config_include_objects_databases_databases_collections_collections_fields). + Structure is [documented below](#nested_source_config_mongodb_source_config_include_objects_databases_collections_fields). -The `fields` block supports: +The `fields` block supports: * `field` - (Optional) @@ -2343,10 +2430,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `collections` - (Optional) Collections in the database. - Structure is [documented below](#nested_source_config_mongodb_source_config_exclude_objects_databases_databases_collections). + Structure is [documented below](#nested_source_config_mongodb_source_config_exclude_objects_databases_collections). -The `collections` block supports: +The `collections` block supports: * `collection` - (Optional) @@ -2355,10 +2442,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `fields` - (Optional) Fields in the collection. - Structure is [documented below](#nested_source_config_mongodb_source_config_exclude_objects_databases_databases_collections_collections_fields). + Structure is [documented below](#nested_source_config_mongodb_source_config_exclude_objects_databases_collections_fields). -The `fields` block supports: +The `fields` block supports: * `field` - (Optional) @@ -2565,10 +2652,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `mysql_tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_backfill_all_mysql_excluded_objects_mysql_databases_mysql_databases_mysql_tables). + Structure is [documented below](#nested_backfill_all_mysql_excluded_objects_mysql_databases_mysql_tables). -The `mysql_tables` block supports: +The `mysql_tables` block supports: * `table` - (Required) @@ -2577,10 +2664,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `mysql_columns` - (Optional) MySQL columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_backfill_all_mysql_excluded_objects_mysql_databases_mysql_databases_mysql_tables_mysql_tables_mysql_columns). + Structure is [documented below](#nested_backfill_all_mysql_excluded_objects_mysql_databases_mysql_tables_mysql_columns). -The `mysql_columns` block supports: +The `mysql_columns` block supports: * `column` - (Optional) @@ -2628,10 +2715,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `postgresql_tables` - (Optional) Tables in the schema. - Structure is [documented below](#nested_backfill_all_postgresql_excluded_objects_postgresql_schemas_postgresql_schemas_postgresql_tables). + Structure is [documented below](#nested_backfill_all_postgresql_excluded_objects_postgresql_schemas_postgresql_tables). -The `postgresql_tables` block supports: +The `postgresql_tables` block supports: * `table` - (Required) @@ -2640,10 +2727,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `postgresql_columns` - (Optional) PostgreSQL columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_backfill_all_postgresql_excluded_objects_postgresql_schemas_postgresql_schemas_postgresql_tables_postgresql_tables_postgresql_columns). + Structure is [documented below](#nested_backfill_all_postgresql_excluded_objects_postgresql_schemas_postgresql_tables_postgresql_columns). -The `postgresql_columns` block supports: +The `postgresql_columns` block supports: * `column` - (Optional) @@ -2695,10 +2782,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `oracle_tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_backfill_all_oracle_excluded_objects_oracle_schemas_oracle_schemas_oracle_tables). + Structure is [documented below](#nested_backfill_all_oracle_excluded_objects_oracle_schemas_oracle_tables). -The `oracle_tables` block supports: +The `oracle_tables` block supports: * `table` - (Required) @@ -2707,10 +2794,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `oracle_columns` - (Optional) Oracle columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_backfill_all_oracle_excluded_objects_oracle_schemas_oracle_schemas_oracle_tables_oracle_tables_oracle_columns). + Structure is [documented below](#nested_backfill_all_oracle_excluded_objects_oracle_schemas_oracle_tables_oracle_columns). -The `oracle_columns` block supports: +The `oracle_columns` block supports: * `column` - (Optional) @@ -2766,10 +2853,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `tables` - (Optional) Tables in the database. - Structure is [documented below](#nested_backfill_all_sql_server_excluded_objects_schemas_schemas_tables). + Structure is [documented below](#nested_backfill_all_sql_server_excluded_objects_schemas_tables). -The `tables` block supports: +The `tables` block supports: * `table` - (Required) @@ -2778,10 +2865,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `columns` - (Optional) SQL Server columns in the schema. When unspecified as part of include/exclude objects, includes/excludes everything. - Structure is [documented below](#nested_backfill_all_sql_server_excluded_objects_schemas_schemas_tables_tables_columns). + Structure is [documented below](#nested_backfill_all_sql_server_excluded_objects_schemas_tables_columns). -The `columns` block supports: +The `columns` block supports: * `column` - (Optional) @@ -2833,10 +2920,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `fields` - (Optional) Fields in the Salesforce object. When unspecified as part of include/exclude objects, includes/excludes everything/nothing. - Structure is [documented below](#nested_backfill_all_salesforce_excluded_objects_objects_objects_fields). + Structure is [documented below](#nested_backfill_all_salesforce_excluded_objects_objects_fields). -The `fields` block supports: +The `fields` block supports: * `name` - (Optional) @@ -2859,10 +2946,10 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `collections` - (Optional) Collections in the database. - Structure is [documented below](#nested_backfill_all_mongodb_excluded_objects_databases_databases_collections). + Structure is [documented below](#nested_backfill_all_mongodb_excluded_objects_databases_collections). -The `collections` block supports: +The `collections` block supports: * `collection` - (Required) @@ -2871,15 +2958,202 @@ Possible values: NOT_STARTED, RUNNING, PAUSED. Default: NOT_STARTED * `fields` - (Optional) Fields in the collection. - Structure is [documented below](#nested_backfill_all_mongodb_excluded_objects_databases_databases_collections_collections_fields). + Structure is [documented below](#nested_backfill_all_mongodb_excluded_objects_databases_collections_fields). -The `fields` block supports: +The `fields` block supports: * `field` - (Optional) Field name. +The `rule_sets` block supports: + +* `customization_rules` - + (Required) + List of customization rules to apply. + Structure is [documented below](#nested_rule_sets_customization_rules). + +* `object_filter` - + (Required) + Object filter to apply the customization rules to. + Structure is [documented below](#nested_rule_sets_object_filter). + + +The `customization_rules` block supports: + +* `bigquery_partitioning` - + (Optional) + BigQuery partitioning rule. + Structure is [documented below](#nested_rule_sets_customization_rules_bigquery_partitioning). + +* `bigquery_clustering` - + (Optional) + BigQuery clustering rule. + Structure is [documented below](#nested_rule_sets_customization_rules_bigquery_clustering). + + +The `bigquery_partitioning` block supports: + +* `integer_range_partition` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_customization_rules_bigquery_partitioning_integer_range_partition). + +* `time_unit_partition` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_customization_rules_bigquery_partitioning_time_unit_partition). + +* `ingestion_time_partition` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_customization_rules_bigquery_partitioning_ingestion_time_partition). + +* `require_partition_filter` - + (Optional) + If true, queries over the table require a partition filter. + + +The `integer_range_partition` block supports: + +* `column` - + (Required) + The partitioning column. + +* `start` - + (Required) + The starting value for range partitioning (inclusive). + +* `end` - + (Required) + The ending value for range partitioning (exclusive). + +* `interval` - + (Required) + The interval of each range within the partition. + +The `time_unit_partition` block supports: + +* `column` - + (Required) + The partitioning column. + +* `partitioning_time_granularity` - + (Optional) + Partition granularity. + Possible values are: `PARTITIONING_TIME_GRANULARITY_UNSPECIFIED`, `PARTITIONING_TIME_GRANULARITY_HOUR`, `PARTITIONING_TIME_GRANULARITY_DAY`, `PARTITIONING_TIME_GRANULARITY_MONTH`, `PARTITIONING_TIME_GRANULARITY_YEAR`. + +The `ingestion_time_partition` block supports: + +* `partitioning_time_granularity` - + (Optional) + Partition granularity. + Possible values are: `PARTITIONING_TIME_GRANULARITY_UNSPECIFIED`, `PARTITIONING_TIME_GRANULARITY_HOUR`, `PARTITIONING_TIME_GRANULARITY_DAY`, `PARTITIONING_TIME_GRANULARITY_MONTH`, `PARTITIONING_TIME_GRANULARITY_YEAR`. + +The `bigquery_clustering` block supports: + +* `columns` - + (Required) + Column names to set as clustering columns. + +The `object_filter` block supports: + +* `source_object_identifier` - + (Optional) + Specific source object identifier. + Structure is [documented below](#nested_rule_sets_object_filter_source_object_identifier). + + +The `source_object_identifier` block supports: + +* `oracle_identifier` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_object_filter_source_object_identifier_oracle_identifier). + +* `mysql_identifier` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_object_filter_source_object_identifier_mysql_identifier). + +* `postgresql_identifier` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_object_filter_source_object_identifier_postgresql_identifier). + +* `sql_server_identifier` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_object_filter_source_object_identifier_sql_server_identifier). + +* `salesforce_identifier` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_object_filter_source_object_identifier_salesforce_identifier). + +* `mongodb_identifier` - + (Optional) + A nested object resource. + Structure is [documented below](#nested_rule_sets_object_filter_source_object_identifier_mongodb_identifier). + + +The `oracle_identifier` block supports: + +* `schema` - + (Required) + The schema name. + +* `table` - + (Required) + The table name. + +The `mysql_identifier` block supports: + +* `database` - + (Required) + The database name. + +* `table` - + (Required) + The table name. + +The `postgresql_identifier` block supports: + +* `schema` - + (Required) + The schema name. + +* `table` - + (Required) + The table name. + +The `sql_server_identifier` block supports: + +* `schema` - + (Required) + The schema name. + +* `table` - + (Required) + The table name. + +The `salesforce_identifier` block supports: + +* `object_name` - + (Required) + The Salesforce object name. + +The `mongodb_identifier` block supports: + +* `database` - + (Required) + The MongoDB database name. + +* `collection` - + (Required) + The MongoDB collection name. + ## Attributes Reference In addition to the arguments listed above, the following computed attributes are exported: diff --git a/website/docs/r/developer_connect_insights_config.html.markdown b/website/docs/r/developer_connect_insights_config.html.markdown index d424a009c80..a944e000c0a 100644 --- a/website/docs/r/developer_connect_insights_config.html.markdown +++ b/website/docs/r/developer_connect_insights_config.html.markdown @@ -214,12 +214,12 @@ The following arguments are supported: * `google_artifact_registry` - (Optional) Google Artifact Registry configurations. - Structure is [documented below](#nested_artifact_configs_artifact_configs_google_artifact_registry). + Structure is [documented below](#nested_artifact_configs_google_artifact_registry). * `google_artifact_analysis` - (Optional) Google Artifact Analysis configurations. - Structure is [documented below](#nested_artifact_configs_artifact_configs_google_artifact_analysis). + Structure is [documented below](#nested_artifact_configs_google_artifact_analysis). * `uri` - (Optional) @@ -229,7 +229,7 @@ The following arguments are supported: artifacts. -The `google_artifact_registry` block supports: +The `google_artifact_registry` block supports: * `project_id` - (Required) @@ -239,7 +239,7 @@ The following arguments are supported: (Required) The name of the artifact registry package. -The `google_artifact_analysis` block supports: +The `google_artifact_analysis` block supports: * `project_id` - (Required) @@ -315,10 +315,10 @@ In addition to the arguments listed above, the following computed attributes are (Output) A list of messages that carry the error details. There is a common set of message types for APIs to use. - Structure is [documented below](#nested_errors_errors_details). + Structure is [documented below](#nested_errors_details). -The `details` block contains: +The `details` block contains: * `detail_message` - (Output) @@ -343,15 +343,15 @@ In addition to the arguments listed above, the following computed attributes are * `gke_workload` - (Optional) GKEWorkload represents the Google Kubernetes Engine runtime. - Structure is [documented below](#nested_runtime_configs_runtime_configs_gke_workload). + Structure is [documented below](#nested_runtime_configs_gke_workload). * `app_hub_workload` - (Optional) AppHubWorkload represents the App Hub Workload. - Structure is [documented below](#nested_runtime_configs_runtime_configs_app_hub_workload). + Structure is [documented below](#nested_runtime_configs_app_hub_workload). -The `gke_workload` block supports: +The `gke_workload` block supports: * `cluster` - (Required) @@ -365,7 +365,7 @@ In addition to the arguments listed above, the following computed attributes are Format: `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`. -The `app_hub_workload` block supports: +The `app_hub_workload` block supports: * `criticality` - (Output) diff --git a/website/docs/r/dialogflow_conversation_profile.html.markdown b/website/docs/r/dialogflow_conversation_profile.html.markdown index 314b3cbb428..d717d835fdd 100644 --- a/website/docs/r/dialogflow_conversation_profile.html.markdown +++ b/website/docs/r/dialogflow_conversation_profile.html.markdown @@ -41,7 +41,7 @@ To get more information about ConversationProfile, see: ```hcl resource "google_dialogflow_agent" "basic_agent" { display_name = "example_agent" - default_language_code = "en-us" + default_language_code = "en" time_zone = "America/New_York" } resource "google_dialogflow_conversation_profile" "basic_profile" { @@ -231,7 +231,7 @@ The following arguments are supported: * `suggestion_feature` - (Optional) The suggestion feature. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_suggestion_feature). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_suggestion_feature). * `enable_event_based_suggestion` - (Optional) @@ -262,31 +262,31 @@ The following arguments are supported: (Optional) Settings of suggestion trigger. This feature is only supported for types: ARTICLE_SUGGESTION, FAQ. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_suggestion_trigger_settings). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_suggestion_trigger_settings). * `query_config` - (Optional) Configs of query. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_query_config). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_query_config). * `conversation_model_config` - (Optional) Configs of custom conversation model. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_conversation_model_config). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_conversation_model_config). * `conversation_process_config` - (Optional) Config to process conversation. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_conversation_process_config). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_conversation_process_config). -The `suggestion_feature` block supports: +The `suggestion_feature` block supports: * `type` - (Optional) Type of Human Agent Assistant API feature to request. -The `suggestion_trigger_settings` block supports: +The `suggestion_trigger_settings` block supports: * `no_small_talk` - (Optional) @@ -296,7 +296,7 @@ The following arguments are supported: (Optional) Only trigger suggestion if participant role of last utterance is END_USER. -The `query_config` block supports: +The `query_config` block supports: * `max_results` - (Optional) @@ -310,21 +310,21 @@ The following arguments are supported: * `context_filter_settings` - (Optional) Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_query_config_context_filter_settings). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_query_config_context_filter_settings). * `sections` - (Optional) he customized sections chosen to return when requesting a summary of a conversation. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_query_config_sections). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_query_config_sections). * `dialogflow_query_source` - (Optional) Query from Dialogflow agent. This feature is supported for types: DIALOGFLOW_ASSIST. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_query_config_dialogflow_query_source). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_query_config_dialogflow_query_source). -The `context_filter_settings` block supports: +The `context_filter_settings` block supports: * `drop_handoff_messages` - (Optional) @@ -338,7 +338,7 @@ The following arguments are supported: (Optional) If set to true, all messages from ivr stage are dropped. -The `sections` block supports: +The `sections` block supports: * `section_types` - (Optional) @@ -346,7 +346,7 @@ The following arguments are supported: If not provided the default selection will be "{SITUATION, ACTION, RESULT}". Each value may be one of: `SECTION_TYPE_UNSPECIFIED`, `SITUATION`, `ACTION`, `RESOLUTION`, `REASON_FOR_CANCELLATION`, `CUSTOMER_SATISFACTION`, `ENTITIES`. -The `dialogflow_query_source` block supports: +The `dialogflow_query_source` block supports: * `agent` - (Required) @@ -355,16 +355,16 @@ The following arguments are supported: * `human_agent_side_config` - (Optional) The Dialogflow assist configuration for human agent. - Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_feature_configs_query_config_dialogflow_query_source_human_agent_side_config). + Structure is [documented below](#nested_human_agent_assistant_config_human_agent_suggestion_config_feature_configs_query_config_dialogflow_query_source_human_agent_side_config). -The `human_agent_side_config` block supports: +The `human_agent_side_config` block supports: * `agent` - (Optional) The name of a dialogflow virtual agent used for intent detection and suggestion triggered by human agent. Format: projects//locations//agent. -The `conversation_model_config` block supports: +The `conversation_model_config` block supports: * `model` - (Optional) @@ -374,7 +374,7 @@ The following arguments are supported: (Optional) Version of current baseline model. It will be ignored if model is set. Valid versions are: Article Suggestion baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - 1.0 -The `conversation_process_config` block supports: +The `conversation_process_config` block supports: * `recent_sentences_count` - (Optional) @@ -406,7 +406,7 @@ The following arguments are supported: * `suggestion_feature` - (Optional) The suggestion feature. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_suggestion_feature). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_suggestion_feature). * `enable_event_based_suggestion` - (Optional) @@ -437,31 +437,31 @@ The following arguments are supported: (Optional) Settings of suggestion trigger. This feature is only supported for types: ARTICLE_SUGGESTION, FAQ. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_suggestion_trigger_settings). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_suggestion_trigger_settings). * `query_config` - (Optional) Configs of query. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_query_config). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_query_config). * `conversation_model_config` - (Optional) Configs of custom conversation model. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_conversation_model_config). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_conversation_model_config). * `conversation_process_config` - (Optional) Config to process conversation. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_conversation_process_config). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_conversation_process_config). -The `suggestion_feature` block supports: +The `suggestion_feature` block supports: * `type` - (Optional) Type of Human Agent Assistant API feature to request. -The `suggestion_trigger_settings` block supports: +The `suggestion_trigger_settings` block supports: * `no_small_talk` - (Optional) @@ -471,7 +471,7 @@ The following arguments are supported: (Optional) Only trigger suggestion if participant role of last utterance is END_USER. -The `query_config` block supports: +The `query_config` block supports: * `max_results` - (Optional) @@ -485,33 +485,33 @@ The following arguments are supported: * `context_filter_settings` - (Optional) Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_query_config_context_filter_settings). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_query_config_context_filter_settings). * `sections` - (Optional) he customized sections chosen to return when requesting a summary of a conversation. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_query_config_sections). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_query_config_sections). * `knowledge_base_query_source` - (Optional) Query from knowledgebase. This feature is only supported for types: ARTICLE_SUGGESTION, FAQ. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_query_config_knowledge_base_query_source). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_query_config_knowledge_base_query_source). * `document_query_source` - (Optional) Query from knowledge base document. This feature is supported for types: SMART_REPLY, SMART_COMPOSE. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_query_config_document_query_source). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_query_config_document_query_source). * `dialogflow_query_source` - (Optional) Query from Dialogflow agent. This feature is supported for types: DIALOGFLOW_ASSIST. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_query_config_dialogflow_query_source). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_query_config_dialogflow_query_source). -The `context_filter_settings` block supports: +The `context_filter_settings` block supports: * `drop_handoff_messages` - (Optional) @@ -525,7 +525,7 @@ The following arguments are supported: (Optional) If set to true, all messages from ivr stage are dropped. -The `sections` block supports: +The `sections` block supports: * `section_types` - (Optional) @@ -533,19 +533,19 @@ The following arguments are supported: If not provided the default selection will be "{SITUATION, ACTION, RESULT}". Each value may be one of: `SECTION_TYPE_UNSPECIFIED`, `SITUATION`, `ACTION`, `RESOLUTION`, `REASON_FOR_CANCELLATION`, `CUSTOMER_SATISFACTION`, `ENTITIES`. -The `knowledge_base_query_source` block supports: +The `knowledge_base_query_source` block supports: * `knowledge_bases` - (Required) Knowledge bases to query. Format: projects//locations//knowledgeBases/. -The `document_query_source` block supports: +The `document_query_source` block supports: * `documents` - (Required) Knowledge documents to query from. Format: projects//locations//knowledgeBases//documents/. -The `dialogflow_query_source` block supports: +The `dialogflow_query_source` block supports: * `agent` - (Required) @@ -554,16 +554,16 @@ The following arguments are supported: * `human_agent_side_config` - (Optional) The Dialogflow assist configuration for human agent. - Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_feature_configs_query_config_dialogflow_query_source_human_agent_side_config). + Structure is [documented below](#nested_human_agent_assistant_config_end_user_suggestion_config_feature_configs_query_config_dialogflow_query_source_human_agent_side_config). -The `human_agent_side_config` block supports: +The `human_agent_side_config` block supports: * `agent` - (Optional) The name of a dialogflow virtual agent used for intent detection and suggestion triggered by human agent. Format: projects//locations//agent. -The `conversation_model_config` block supports: +The `conversation_model_config` block supports: * `model` - (Optional) @@ -573,7 +573,7 @@ The following arguments are supported: (Optional) Version of current baseline model. It will be ignored if model is set. Valid versions are: Article Suggestion baseline model: - 0.9 - 1.0 (default) Summarization baseline model: - 1.0 -The `conversation_process_config` block supports: +The `conversation_process_config` block supports: * `recent_sentences_count` - (Optional) diff --git a/website/docs/r/dialogflow_cx_flow.html.markdown b/website/docs/r/dialogflow_cx_flow.html.markdown index 2a7b92ae2fc..1fd5280de8c 100644 --- a/website/docs/r/dialogflow_cx_flow.html.markdown +++ b/website/docs/r/dialogflow_cx_flow.html.markdown @@ -638,7 +638,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * `trigger_fulfillment` - (Optional) The fulfillment to call when the condition is satisfied. At least one of triggerFulfillment and target must be specified. When both are defined, triggerFulfillment is executed first. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment). * `target_page` - (Optional) @@ -651,12 +651,12 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo Format: projects//locations//agents//flows/. -The `trigger_fulfillment` block supports: +The `trigger_fulfillment` block supports: * `messages` - (Optional) The list of rich message responses to present to the user. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages). * `webhook` - (Optional) @@ -673,15 +673,15 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * `set_parameter_actions` - (Optional) Set parameter values before executing the webhook. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_set_parameter_actions). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_set_parameter_actions). * `conditional_cases` - (Optional) Conditional cases for this fulfillment. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_conditional_cases). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_conditional_cases). -The `messages` block supports: +The `messages` block supports: * `channel` - (Optional) @@ -690,7 +690,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * `text` - (Optional) The text response message. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_text). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_text). * `payload` - (Optional) @@ -703,12 +703,12 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -717,20 +717,20 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_live_agent_handoff). * `play_audio` - (Optional) Specifies an audio clip to be played by the client as part of the response. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_play_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_telephony_transfer_call). -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -740,13 +740,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -760,13 +760,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Optional) The SSML text to be synthesized. For more information, see SSML. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -776,13 +776,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) Transfer the call to a phone number in E.164 format. -The `set_parameter_actions` block supports: +The `set_parameter_actions` block supports: * `parameter` - (Optional) @@ -792,7 +792,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Optional) The new JSON-encoded value of the parameter. A null value clears the parameter. -The `conditional_cases` block supports: +The `conditional_cases` block supports: * `cases` - (Optional) @@ -812,7 +812,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * `trigger_fulfillment` - (Optional) The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment). * `target_page` - (Optional) @@ -825,12 +825,12 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo Format: projects//locations//agents//flows/. -The `trigger_fulfillment` block supports: +The `trigger_fulfillment` block supports: * `messages` - (Optional) The list of rich message responses to present to the user. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages). * `webhook` - (Optional) @@ -847,12 +847,12 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * `set_parameter_actions` - (Optional) Set parameter values before executing the webhook. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_set_parameter_actions). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_set_parameter_actions). * `conditional_cases` - (Optional) Conditional cases for this fulfillment. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_conditional_cases). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_conditional_cases). * `enable_generative_fallback` - (Optional) @@ -861,7 +861,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo This flag is only useful for fulfillments associated with no-match event handlers. -The `messages` block supports: +The `messages` block supports: * `channel` - (Optional) @@ -870,7 +870,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * `text` - (Optional) The text response message. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_text). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_text). * `payload` - (Optional) @@ -883,12 +883,12 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -897,20 +897,20 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_live_agent_handoff). * `play_audio` - (Optional) Specifies an audio clip to be played by the client as part of the response. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_play_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_telephony_transfer_call). -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -920,13 +920,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -940,13 +940,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Optional) The SSML text to be synthesized. For more information, see SSML. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -956,13 +956,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) Transfer the call to a phone number in E.164 format. -The `set_parameter_actions` block supports: +The `set_parameter_actions` block supports: * `parameter` - (Optional) @@ -972,7 +972,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Optional) The new JSON-encoded value of the parameter. A null value clears the parameter. -The `conditional_cases` block supports: +The `conditional_cases` block supports: * `cases` - (Optional) @@ -1169,7 +1169,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Optional) The text response message. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_text). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_text). * `payload` - (Optional) @@ -1184,13 +1184,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -1200,7 +1200,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_live_agent_handoff). * `end_interaction` - (Output) @@ -1212,19 +1212,19 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Optional) Specifies an audio clip to be played by the client as part of the response. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_play_audio). * `mixed_audio` - (Output) Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. The external URIs are specified via playAudio. This message is generated by Dialogflow only and not supposed to be defined by the user. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_mixed_audio). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_mixed_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_telephony_transfer_call). * `knowledge_info_card` - (Optional) @@ -1234,7 +1234,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -1245,13 +1245,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -1267,13 +1267,13 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo The SSML text to be synthesized. For more information, see SSML. This field is part of a union field `source`: Only one of `text` or `ssml` may be set. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -1283,15 +1283,15 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `mixed_audio` block contains: +The `mixed_audio` block contains: * `segments` - (Optional) Segments this audio response is composed of. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_mixed_audio_segments). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_mixed_audio_segments). -The `segments` block supports: +The `segments` block supports: * `allow_playback_interruption` - (Output) @@ -1308,7 +1308,7 @@ The Default Start Flow cannot be deleted; deleting the `google_dialogflow_cx_flo Client-specific URI that points to an audio clip accessible to the client. Dialogflow does not impose any validation on it. This field is part of a union field `content`: Only one of `audio` or `uri` may be set. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) diff --git a/website/docs/r/dialogflow_cx_intent.html.markdown b/website/docs/r/dialogflow_cx_intent.html.markdown index 0aa58d471c9..73100a1a5f7 100644 --- a/website/docs/r/dialogflow_cx_intent.html.markdown +++ b/website/docs/r/dialogflow_cx_intent.html.markdown @@ -171,14 +171,14 @@ The Default Negative Intent cannot be deleted; deleting the `google_dialogflow_c If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: Part.text is set to a part of the phrase that has no parameters. Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set. - Structure is [documented below](#nested_training_phrases_training_phrases_parts). + Structure is [documented below](#nested_training_phrases_parts). * `repeat_count` - (Optional) Indicates how many times this example was added to the intent. -The `parts` block supports: +The `parts` block supports: * `text` - (Required) diff --git a/website/docs/r/dialogflow_cx_page.html.markdown b/website/docs/r/dialogflow_cx_page.html.markdown index 96ea386225b..17e68b91ae7 100644 --- a/website/docs/r/dialogflow_cx_page.html.markdown +++ b/website/docs/r/dialogflow_cx_page.html.markdown @@ -847,7 +847,7 @@ The following arguments are supported: * `text` - (Optional) The text response message. - Structure is [documented below](#nested_entry_fulfillment_messages_messages_text). + Structure is [documented below](#nested_entry_fulfillment_messages_text). * `payload` - (Optional) @@ -860,12 +860,12 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. - Structure is [documented below](#nested_entry_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_entry_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. - Structure is [documented below](#nested_entry_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_entry_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -874,20 +874,20 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. - Structure is [documented below](#nested_entry_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_entry_fulfillment_messages_live_agent_handoff). * `play_audio` - (Optional) Specifies an audio clip to be played by the client as part of the response. - Structure is [documented below](#nested_entry_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_entry_fulfillment_messages_play_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. - Structure is [documented below](#nested_entry_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_entry_fulfillment_messages_telephony_transfer_call). -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -897,13 +897,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -917,13 +917,13 @@ The following arguments are supported: (Optional) The SSML text to be synthesized. For more information, see SSML. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -933,7 +933,7 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) @@ -987,7 +987,7 @@ The following arguments are supported: * `fill_behavior` - (Optional) Defines fill behavior for the parameter. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior). + Structure is [documented below](#nested_form_parameters_fill_behavior). * `default_value` - (Optional) @@ -1002,15 +1002,15 @@ The following arguments are supported: (Optional) Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level. Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. - Structure is [documented below](#nested_form_parameters_parameters_advanced_settings). + Structure is [documented below](#nested_form_parameters_advanced_settings). -The `fill_behavior` block supports: +The `fill_behavior` block supports: * `initial_prompt_fulfillment` - (Optional) The fulfillment to provide the initial prompt that the agent can present to the user in order to fill the parameter. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment). * `reprompt_event_handlers` - (Optional) @@ -1025,15 +1025,15 @@ The following arguments are supported: A sys.no-match-default or sys.no-input-default handler will be used to handle all following no-match/no-input events after all numbered no-match/no-input handlers for the parameter are consumed. A sys.invalid-parameter handler can be defined to handle the case where the parameter values have been invalidated by webhook. For example, if the user's response fill the parameter, however the parameter was invalidated by webhook, the fulfillment associated with the sys.invalid-parameter handler (if defined) will be called to provide a prompt. If the event handler for the corresponding event can't be found on the parameter, initialPromptFulfillment will be re-prompted. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers). -The `initial_prompt_fulfillment` block supports: +The `initial_prompt_fulfillment` block supports: * `messages` - (Optional) The list of rich message responses to present to the user. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_messages). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_messages). * `webhook` - (Optional) @@ -1050,15 +1050,15 @@ The following arguments are supported: * `set_parameter_actions` - (Optional) Set parameter values before executing the webhook. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_set_parameter_actions). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_set_parameter_actions). * `conditional_cases` - (Optional) Conditional cases for this fulfillment. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_conditional_cases). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_conditional_cases). -The `messages` block supports: +The `messages` block supports: * `channel` - (Optional) @@ -1067,7 +1067,7 @@ The following arguments are supported: * `text` - (Optional) The text response message. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_messages_messages_text). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_messages_text). * `payload` - (Optional) @@ -1080,12 +1080,12 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -1094,20 +1094,20 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_messages_live_agent_handoff). * `play_audio` - (Optional) Specifies an audio clip to be played by the client as part of the response. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_messages_play_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_initial_prompt_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_form_parameters_fill_behavior_initial_prompt_fulfillment_messages_telephony_transfer_call). -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -1117,13 +1117,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -1137,13 +1137,13 @@ The following arguments are supported: (Optional) The SSML text to be synthesized. For more information, see SSML. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -1153,13 +1153,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) Transfer the call to a phone number in E.164 format. -The `set_parameter_actions` block supports: +The `set_parameter_actions` block supports: * `parameter` - (Optional) @@ -1169,14 +1169,14 @@ The following arguments are supported: (Optional) The new JSON-encoded value of the parameter. A null value clears the parameter. -The `conditional_cases` block supports: +The `conditional_cases` block supports: * `cases` - (Optional) A JSON encoded list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#case) for the schema. -The `reprompt_event_handlers` block supports: +The `reprompt_event_handlers` block supports: * `name` - (Output) @@ -1189,7 +1189,7 @@ The following arguments are supported: * `trigger_fulfillment` - (Optional) The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment). * `target_page` - (Optional) @@ -1202,12 +1202,12 @@ The following arguments are supported: Format: projects//locations//agents//flows/. -The `trigger_fulfillment` block supports: +The `trigger_fulfillment` block supports: * `messages` - (Optional) The list of rich message responses to present to the user. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_messages). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_messages). * `webhook` - (Optional) @@ -1224,15 +1224,15 @@ The following arguments are supported: * `set_parameter_actions` - (Optional) Set parameter values before executing the webhook. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_set_parameter_actions). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_set_parameter_actions). * `conditional_cases` - (Optional) Conditional cases for this fulfillment. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_conditional_cases). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_conditional_cases). -The `messages` block supports: +The `messages` block supports: * `channel` - (Optional) @@ -1241,7 +1241,7 @@ The following arguments are supported: * `text` - (Optional) The text response message. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_messages_messages_text). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_messages_text). * `payload` - (Optional) @@ -1254,12 +1254,12 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -1268,20 +1268,20 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_messages_live_agent_handoff). * `play_audio` - (Optional) Specifies an audio clip to be played by the client as part of the response. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_messages_play_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. - Structure is [documented below](#nested_form_parameters_parameters_fill_behavior_reprompt_event_handlers_reprompt_event_handlers_trigger_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_form_parameters_fill_behavior_reprompt_event_handlers_trigger_fulfillment_messages_telephony_transfer_call). -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -1291,13 +1291,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -1311,13 +1311,13 @@ The following arguments are supported: (Optional) The SSML text to be synthesized. For more information, see SSML. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -1327,13 +1327,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) Transfer the call to a phone number in E.164 format. -The `set_parameter_actions` block supports: +The `set_parameter_actions` block supports: * `parameter` - (Optional) @@ -1343,14 +1343,14 @@ The following arguments are supported: (Optional) The new JSON-encoded value of the parameter. A null value clears the parameter. -The `conditional_cases` block supports: +The `conditional_cases` block supports: * `cases` - (Optional) A JSON encoded list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. See [Case](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/Fulfillment#case) for the schema. -The `advanced_settings` block supports: +The `advanced_settings` block supports: * `dtmf_settings` - (Optional) @@ -1359,10 +1359,10 @@ The following arguments are supported: * Flow level * Page level * Parameter level - Structure is [documented below](#nested_form_parameters_parameters_advanced_settings_dtmf_settings). + Structure is [documented below](#nested_form_parameters_advanced_settings_dtmf_settings). -The `dtmf_settings` block supports: +The `dtmf_settings` block supports: * `enabled` - (Optional) @@ -1395,7 +1395,7 @@ The following arguments are supported: * `trigger_fulfillment` - (Optional) The fulfillment to call when the condition is satisfied. At least one of triggerFulfillment and target must be specified. When both are defined, triggerFulfillment is executed first. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment). * `target_page` - (Optional) @@ -1408,12 +1408,12 @@ The following arguments are supported: Format: projects//locations//agents//flows/. -The `trigger_fulfillment` block supports: +The `trigger_fulfillment` block supports: * `messages` - (Optional) The list of rich message responses to present to the user. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages). * `webhook` - (Optional) @@ -1430,15 +1430,15 @@ The following arguments are supported: * `set_parameter_actions` - (Optional) Set parameter values before executing the webhook. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_set_parameter_actions). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_set_parameter_actions). * `conditional_cases` - (Optional) Conditional cases for this fulfillment. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_conditional_cases). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_conditional_cases). -The `messages` block supports: +The `messages` block supports: * `channel` - (Optional) @@ -1447,7 +1447,7 @@ The following arguments are supported: * `text` - (Optional) The text response message. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_text). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_text). * `payload` - (Optional) @@ -1460,12 +1460,12 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -1474,20 +1474,20 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_live_agent_handoff). * `play_audio` - (Optional) Specifies an audio clip to be played by the client as part of the response. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_play_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. - Structure is [documented below](#nested_transition_routes_transition_routes_trigger_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_transition_routes_trigger_fulfillment_messages_telephony_transfer_call). -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -1497,13 +1497,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -1517,13 +1517,13 @@ The following arguments are supported: (Optional) The SSML text to be synthesized. For more information, see SSML. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -1533,13 +1533,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) Transfer the call to a phone number in E.164 format. -The `set_parameter_actions` block supports: +The `set_parameter_actions` block supports: * `parameter` - (Optional) @@ -1549,7 +1549,7 @@ The following arguments are supported: (Optional) The new JSON-encoded value of the parameter. A null value clears the parameter. -The `conditional_cases` block supports: +The `conditional_cases` block supports: * `cases` - (Optional) @@ -1569,7 +1569,7 @@ The following arguments are supported: * `trigger_fulfillment` - (Optional) The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment). * `target_page` - (Optional) @@ -1582,12 +1582,12 @@ The following arguments are supported: Format: projects//locations//agents//flows/. -The `trigger_fulfillment` block supports: +The `trigger_fulfillment` block supports: * `messages` - (Optional) The list of rich message responses to present to the user. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages). * `webhook` - (Optional) @@ -1604,15 +1604,15 @@ The following arguments are supported: * `set_parameter_actions` - (Optional) Set parameter values before executing the webhook. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_set_parameter_actions). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_set_parameter_actions). * `conditional_cases` - (Optional) Conditional cases for this fulfillment. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_conditional_cases). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_conditional_cases). -The `messages` block supports: +The `messages` block supports: * `channel` - (Optional) @@ -1621,7 +1621,7 @@ The following arguments are supported: * `text` - (Optional) The text response message. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_text). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_text). * `payload` - (Optional) @@ -1634,12 +1634,12 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -1648,20 +1648,20 @@ The following arguments are supported: You may set this, for example: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_live_agent_handoff). * `play_audio` - (Optional) Specifies an audio clip to be played by the client as part of the response. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_play_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. - Structure is [documented below](#nested_event_handlers_event_handlers_trigger_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_event_handlers_trigger_fulfillment_messages_telephony_transfer_call). -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -1671,13 +1671,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -1691,13 +1691,13 @@ The following arguments are supported: (Optional) The SSML text to be synthesized. For more information, see SSML. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -1707,13 +1707,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) Transfer the call to a phone number in E.164 format. -The `set_parameter_actions` block supports: +The `set_parameter_actions` block supports: * `parameter` - (Optional) @@ -1723,7 +1723,7 @@ The following arguments are supported: (Optional) The new JSON-encoded value of the parameter. A null value clears the parameter. -The `conditional_cases` block supports: +The `conditional_cases` block supports: * `cases` - (Optional) @@ -1836,7 +1836,7 @@ The following arguments are supported: (Optional) The text response message. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_text). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_text). * `payload` - (Optional) @@ -1851,13 +1851,13 @@ The following arguments are supported: * In the entryFulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_conversation_success). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_conversation_success). * `output_audio_text` - (Optional) A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_output_audio_text). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_output_audio_text). * `live_agent_handoff` - (Optional) @@ -1867,7 +1867,7 @@ The following arguments are supported: * In the entryFulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_live_agent_handoff). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_live_agent_handoff). * `end_interaction` - (Output) @@ -1879,19 +1879,19 @@ The following arguments are supported: (Optional) Specifies an audio clip to be played by the client as part of the response. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_play_audio). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_play_audio). * `mixed_audio` - (Output) Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. The external URIs are specified via playAudio. This message is generated by Dialogflow only and not supposed to be defined by the user. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_mixed_audio). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_mixed_audio). * `telephony_transfer_call` - (Optional) Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint. This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_telephony_transfer_call). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_telephony_transfer_call). * `knowledge_info_card` - (Optional) @@ -1901,7 +1901,7 @@ The following arguments are supported: This field is part of a union field `message`: Only one of `text`, `payload`, `conversationSuccess`, `outputAudioText`, `liveAgentHandoff`, `endInteraction`, `playAudio`, `mixedAudio`, `telephonyTransferCall`, or `knowledgeInfoCard` may be set. -The `text` block supports: +The `text` block supports: * `text` - (Optional) @@ -1912,13 +1912,13 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `conversation_success` block supports: +The `conversation_success` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `output_audio_text` block supports: +The `output_audio_text` block supports: * `allow_playback_interruption` - (Output) @@ -1934,13 +1934,13 @@ The following arguments are supported: The SSML text to be synthesized. For more information, see SSML. This field is part of a union field `source`: Only one of `text` or `ssml` may be set. -The `live_agent_handoff` block supports: +The `live_agent_handoff` block supports: * `metadata` - (Optional) Custom metadata. Dialogflow doesn't impose any structure on this. -The `play_audio` block supports: +The `play_audio` block supports: * `audio_uri` - (Required) @@ -1950,15 +1950,15 @@ The following arguments are supported: (Output) Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request. -The `mixed_audio` block contains: +The `mixed_audio` block contains: * `segments` - (Optional) Segments this audio response is composed of. - Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_messages_mixed_audio_segments). + Structure is [documented below](#nested_knowledge_connector_settings_trigger_fulfillment_messages_mixed_audio_segments). -The `segments` block supports: +The `segments` block supports: * `allow_playback_interruption` - (Output) @@ -1975,7 +1975,7 @@ The following arguments are supported: Client-specific URI that points to an audio clip accessible to the client. Dialogflow does not impose any validation on it. This field is part of a union field `content`: Only one of `audio` or `uri` may be set. -The `telephony_transfer_call` block supports: +The `telephony_transfer_call` block supports: * `phone_number` - (Required) diff --git a/website/docs/r/dialogflow_cx_test_case.html.markdown b/website/docs/r/dialogflow_cx_test_case.html.markdown index 2935458f4e0..e76d37f6b02 100644 --- a/website/docs/r/dialogflow_cx_test_case.html.markdown +++ b/website/docs/r/dialogflow_cx_test_case.html.markdown @@ -225,20 +225,20 @@ The following arguments are supported: * `user_input` - (Optional) The user input. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_user_input). + Structure is [documented below](#nested_test_case_conversation_turns_user_input). * `virtual_agent_output` - (Optional) The virtual agent output. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_virtual_agent_output). + Structure is [documented below](#nested_test_case_conversation_turns_virtual_agent_output). -The `user_input` block supports: +The `user_input` block supports: * `input` - (Optional) User input. Supports text input, event input, dtmf input in the test case. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_user_input_input). + Structure is [documented below](#nested_test_case_conversation_turns_user_input_input). * `injected_parameters` - (Optional) @@ -253,7 +253,7 @@ The following arguments are supported: Whether sentiment analysis is enabled. -The `input` block supports: +The `input` block supports: * `language_code` - (Optional) @@ -263,32 +263,32 @@ The following arguments are supported: * `text` - (Optional) The natural language text to be processed. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_user_input_input_text). + Structure is [documented below](#nested_test_case_conversation_turns_user_input_input_text). * `event` - (Optional) The event to be triggered. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_user_input_input_event). + Structure is [documented below](#nested_test_case_conversation_turns_user_input_input_event). * `dtmf` - (Optional) The DTMF event to be handled. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_user_input_input_dtmf). + Structure is [documented below](#nested_test_case_conversation_turns_user_input_input_dtmf). -The `text` block supports: +The `text` block supports: * `text` - (Required) The natural language text to be processed. Text length must not exceed 256 characters. -The `event` block supports: +The `event` block supports: * `event` - (Required) Name of the event. -The `dtmf` block supports: +The `dtmf` block supports: * `digits` - (Optional) @@ -298,7 +298,7 @@ The following arguments are supported: (Optional) The finish digit (if any). -The `virtual_agent_output` block supports: +The `virtual_agent_output` block supports: * `session_parameters` - (Optional) @@ -307,20 +307,20 @@ The following arguments are supported: * `triggered_intent` - (Optional) The [Intent](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents#Intent) that triggered the response. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_virtual_agent_output_triggered_intent). + Structure is [documented below](#nested_test_case_conversation_turns_virtual_agent_output_triggered_intent). * `current_page` - (Optional) The [Page](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.flows.pages#Page) on which the utterance was spoken. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_virtual_agent_output_current_page). + Structure is [documented below](#nested_test_case_conversation_turns_virtual_agent_output_current_page). * `text_responses` - (Optional) The text responses from the agent for the turn. - Structure is [documented below](#nested_test_case_conversation_turns_test_case_conversation_turns_virtual_agent_output_text_responses). + Structure is [documented below](#nested_test_case_conversation_turns_virtual_agent_output_text_responses). -The `triggered_intent` block supports: +The `triggered_intent` block supports: * `name` - (Optional) @@ -331,7 +331,7 @@ The following arguments are supported: (Output) The human-readable name of the intent, unique within the agent. -The `current_page` block supports: +The `current_page` block supports: * `name` - (Optional) @@ -342,7 +342,7 @@ The following arguments are supported: (Output) The human-readable name of the page, unique within the flow. -The `text_responses` block supports: +The `text_responses` block supports: * `text` - (Optional) @@ -399,20 +399,20 @@ In addition to the arguments listed above, the following computed attributes are * `user_input` - (Optional) The user input. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_user_input). + Structure is [documented below](#nested_last_test_result_conversation_turns_user_input). * `virtual_agent_output` - (Optional) The virtual agent output. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_virtual_agent_output). + Structure is [documented below](#nested_last_test_result_conversation_turns_virtual_agent_output). -The `user_input` block supports: +The `user_input` block supports: * `input` - (Optional) User input. Supports text input, event input, dtmf input in the test case. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_user_input_input). + Structure is [documented below](#nested_last_test_result_conversation_turns_user_input_input). * `injected_parameters` - (Optional) @@ -427,7 +427,7 @@ In addition to the arguments listed above, the following computed attributes are Whether sentiment analysis is enabled. -The `input` block supports: +The `input` block supports: * `language_code` - (Optional) @@ -437,32 +437,32 @@ In addition to the arguments listed above, the following computed attributes are * `text` - (Optional) The natural language text to be processed. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_user_input_input_text). + Structure is [documented below](#nested_last_test_result_conversation_turns_user_input_input_text). * `event` - (Optional) The event to be triggered. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_user_input_input_event). + Structure is [documented below](#nested_last_test_result_conversation_turns_user_input_input_event). * `dtmf` - (Optional) The DTMF event to be handled. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_user_input_input_dtmf). + Structure is [documented below](#nested_last_test_result_conversation_turns_user_input_input_dtmf). -The `text` block supports: +The `text` block supports: * `text` - (Required) The natural language text to be processed. Text length must not exceed 256 characters. -The `event` block supports: +The `event` block supports: * `event` - (Required) Name of the event. -The `dtmf` block supports: +The `dtmf` block supports: * `digits` - (Optional) @@ -472,7 +472,7 @@ In addition to the arguments listed above, the following computed attributes are (Optional) The finish digit (if any). -The `virtual_agent_output` block supports: +The `virtual_agent_output` block supports: * `session_parameters` - (Optional) @@ -481,30 +481,30 @@ In addition to the arguments listed above, the following computed attributes are * `differences` - (Optional) The list of differences between the original run and the replay for this output, if any. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_virtual_agent_output_differences). + Structure is [documented below](#nested_last_test_result_conversation_turns_virtual_agent_output_differences). * `triggered_intent` - (Optional) The [Intent](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents#Intent) that triggered the response. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_virtual_agent_output_triggered_intent). + Structure is [documented below](#nested_last_test_result_conversation_turns_virtual_agent_output_triggered_intent). * `current_page` - (Optional) The [Page](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.flows.pages#Page) on which the utterance was spoken. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_virtual_agent_output_current_page). + Structure is [documented below](#nested_last_test_result_conversation_turns_virtual_agent_output_current_page). * `text_responses` - (Optional) The text responses from the agent for the turn. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_virtual_agent_output_text_responses). + Structure is [documented below](#nested_last_test_result_conversation_turns_virtual_agent_output_text_responses). * `status` - (Optional) Response error from the agent in the test result. If set, other output is empty. - Structure is [documented below](#nested_last_test_result_conversation_turns_conversation_turns_virtual_agent_output_status). + Structure is [documented below](#nested_last_test_result_conversation_turns_virtual_agent_output_status). -The `differences` block supports: +The `differences` block supports: * `type` - (Optional) @@ -520,7 +520,7 @@ In addition to the arguments listed above, the following computed attributes are (Optional) A human readable description of the diff, showing the actual output vs expected output. -The `triggered_intent` block supports: +The `triggered_intent` block supports: * `name` - (Optional) @@ -531,7 +531,7 @@ In addition to the arguments listed above, the following computed attributes are (Optional) The human-readable name of the intent, unique within the agent. -The `current_page` block supports: +The `current_page` block supports: * `name` - (Optional) @@ -542,13 +542,13 @@ In addition to the arguments listed above, the following computed attributes are (Optional) The human-readable name of the page, unique within the flow. -The `text_responses` block supports: +The `text_responses` block supports: * `text` - (Optional) A collection of text responses. -The `status` block supports: +The `status` block supports: * `code` - (Optional) diff --git a/website/docs/r/dialogflow_cx_tool.html.markdown b/website/docs/r/dialogflow_cx_tool.html.markdown index c4e48edf735..f6ecccb2ddd 100644 --- a/website/docs/r/dialogflow_cx_tool.html.markdown +++ b/website/docs/r/dialogflow_cx_tool.html.markdown @@ -617,10 +617,10 @@ The following arguments are supported: * `entity_operation` - (Optional) Entity operation configuration for the tool to use. This field is part of a required union field `action_spec`. - Structure is [documented below](#nested_connector_spec_actions_actions_entity_operation). + Structure is [documented below](#nested_connector_spec_actions_entity_operation). -The `entity_operation` block supports: +The `entity_operation` block supports: * `entity_id` - (Required) diff --git a/website/docs/r/dialogflow_generator.html.markdown b/website/docs/r/dialogflow_generator.html.markdown index fe77eb6a806..32df52242da 100644 --- a/website/docs/r/dialogflow_generator.html.markdown +++ b/website/docs/r/dialogflow_generator.html.markdown @@ -139,7 +139,7 @@ The following arguments are supported: * `conversation_context` - (Optional) Optional. Conversation transcripts. - Structure is [documented below](#nested_summarization_context_few_shot_examples_few_shot_examples_conversation_context). + Structure is [documented below](#nested_summarization_context_few_shot_examples_conversation_context). * `extra_info` - (Optional) @@ -148,23 +148,23 @@ The following arguments are supported: * `output` - (Required) Required. Example output of the model. - Structure is [documented below](#nested_summarization_context_few_shot_examples_few_shot_examples_output). + Structure is [documented below](#nested_summarization_context_few_shot_examples_output). * `summarization_section_list` - (Optional) Summarization sections. - Structure is [documented below](#nested_summarization_context_few_shot_examples_few_shot_examples_summarization_section_list). + Structure is [documented below](#nested_summarization_context_few_shot_examples_summarization_section_list). -The `conversation_context` block supports: +The `conversation_context` block supports: * `message_entries` - (Optional) Optional. List of message transcripts in the conversation. - Structure is [documented below](#nested_summarization_context_few_shot_examples_few_shot_examples_conversation_context_message_entries). + Structure is [documented below](#nested_summarization_context_few_shot_examples_conversation_context_message_entries). -The `message_entries` block supports: +The `message_entries` block supports: * `role` - (Optional) @@ -183,23 +183,23 @@ The following arguments are supported: (Optional) Optional. Create time of the message entry. -The `output` block supports: +The `output` block supports: * `summary_suggestion` - (Optional) Optional. Suggested summary. - Structure is [documented below](#nested_summarization_context_few_shot_examples_few_shot_examples_output_summary_suggestion). + Structure is [documented below](#nested_summarization_context_few_shot_examples_output_summary_suggestion). -The `summary_suggestion` block supports: +The `summary_suggestion` block supports: * `summary_sections` - (Required) Required. All the parts of generated summary. - Structure is [documented below](#nested_summarization_context_few_shot_examples_few_shot_examples_output_summary_suggestion_summary_sections). + Structure is [documented below](#nested_summarization_context_few_shot_examples_output_summary_suggestion_summary_sections). -The `summary_sections` block supports: +The `summary_sections` block supports: * `section` - (Required) @@ -209,15 +209,15 @@ The following arguments are supported: (Required) Required. Summary text for the section. -The `summarization_section_list` block supports: +The `summarization_section_list` block supports: * `summarization_sections` - (Optional) Optional. Summarization sections. - Structure is [documented below](#nested_summarization_context_few_shot_examples_few_shot_examples_summarization_section_list_summarization_sections). + Structure is [documented below](#nested_summarization_context_few_shot_examples_summarization_section_list_summarization_sections). -The `summarization_sections` block supports: +The `summarization_sections` block supports: * `key` - (Optional) diff --git a/website/docs/r/dialogflow_version.html.markdown b/website/docs/r/dialogflow_version.html.markdown index 27d04fbd9ea..ae836040278 100644 --- a/website/docs/r/dialogflow_version.html.markdown +++ b/website/docs/r/dialogflow_version.html.markdown @@ -58,7 +58,7 @@ resource "google_project_service_identity" "gcp_sa" { } resource "google_dialogflow_agent" "basic_agent" { display_name = "example_agent" - default_language_code = "en-us" + default_language_code = "en" time_zone = "America/New_York" project = google_project.project.project_id depends_on = [time_sleep.wait_enable_service_api] diff --git a/website/docs/r/discovery_engine_cmek_config.html.markdown b/website/docs/r/discovery_engine_cmek_config.html.markdown index e8fcf85c469..e8294f01682 100644 --- a/website/docs/r/discovery_engine_cmek_config.html.markdown +++ b/website/docs/r/discovery_engine_cmek_config.html.markdown @@ -30,11 +30,6 @@ To get more information about CmekConfig, see: * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.cmekConfigs) - ## Example Usage - Discoveryengine Cmekconfig Default @@ -70,16 +65,16 @@ The following arguments are supported: The geographic location where the CMEK config should reside. The value can only be one of "us" and "eu". +* `cmek_config_id` - + (Required) + The unique id of the cmek config. + * `single_region_keys` - (Optional) Single-regional CMEKs that are required for some VAIS features. Structure is [documented below](#nested_single_region_keys). -* `cmek_config_id` - - (Optional) - The unique id of the cmek config. - * `set_default` - (Optional) Set the following CmekConfig as the default to be used for child resources @@ -151,7 +146,7 @@ In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hash import { identity = { location = "<-required value->" - cmekConfigId = "<-optional value->" + cmekConfigId = "<-required value->" project = "<-optional value->" } to = google_discovery_engine_cmek_config.default diff --git a/website/docs/r/discovery_engine_control.html.markdown b/website/docs/r/discovery_engine_control.html.markdown index 558c37716df..8ec73901ff5 100644 --- a/website/docs/r/discovery_engine_control.html.markdown +++ b/website/docs/r/discovery_engine_control.html.markdown @@ -152,19 +152,19 @@ The following arguments are supported: * `query_terms` - (Optional) The query terms that must be present in the search request for this condition to be met. - Structure is [documented below](#nested_conditions_conditions_query_terms). + Structure is [documented below](#nested_conditions_query_terms). * `active_time_range` - (Optional) The time range when the condition is active. - Structure is [documented below](#nested_conditions_conditions_active_time_range). + Structure is [documented below](#nested_conditions_active_time_range). * `query_regex` - (Optional) The regular expression that the query must match for this condition to be met. -The `query_terms` block supports: +The `query_terms` block supports: * `value` - (Optional) @@ -174,7 +174,7 @@ The following arguments are supported: (Optional) If true, the query term must be an exact match. Otherwise, the query term can be a partial match. -The `active_time_range` block supports: +The `active_time_range` block supports: * `start_time` - (Optional) diff --git a/website/docs/r/discovery_engine_data_store.html.markdown b/website/docs/r/discovery_engine_data_store.html.markdown index 298bc0a15ec..155b43ca0ee 100644 --- a/website/docs/r/discovery_engine_data_store.html.markdown +++ b/website/docs/r/discovery_engine_data_store.html.markdown @@ -323,21 +323,21 @@ The following arguments are supported: * `ocr_parsing_config` - (Optional) Configurations applied to OCR parser. Currently it only applies to PDFs. - Structure is [documented below](#nested_document_processing_config_parsing_config_overrides_parsing_config_overrides_ocr_parsing_config). + Structure is [documented below](#nested_document_processing_config_parsing_config_overrides_ocr_parsing_config). * `layout_parsing_config` - (Optional) Configurations applied to layout parser. - Structure is [documented below](#nested_document_processing_config_parsing_config_overrides_parsing_config_overrides_layout_parsing_config). + Structure is [documented below](#nested_document_processing_config_parsing_config_overrides_layout_parsing_config). -The `ocr_parsing_config` block supports: +The `ocr_parsing_config` block supports: * `use_native_text` - (Optional) If true, will use native text instead of OCR text on pages containing native text. -The `layout_parsing_config` block supports: +The `layout_parsing_config` block supports: * `enable_table_annotation` - (Optional) diff --git a/website/docs/r/discovery_engine_widget_config.html.markdown b/website/docs/r/discovery_engine_widget_config.html.markdown index 619e398c41a..63b007f14a2 100644 --- a/website/docs/r/discovery_engine_widget_config.html.markdown +++ b/website/docs/r/discovery_engine_widget_config.html.markdown @@ -274,7 +274,7 @@ The following arguments are supported: * `facet_field` - (Optional) - Structure is [documented below](#nested_ui_settings_data_store_ui_configs_data_store_ui_configs_facet_field). + Structure is [documented below](#nested_ui_settings_data_store_ui_configs_facet_field). * `fields_ui_components_map` - (Optional) @@ -283,10 +283,10 @@ The following arguments are supported: the field along with its device visibility. The 3 custom fields are optional and can be added or removed. `title`, `thumbnail`, `url` are required UI components that cannot be removed. - Structure is [documented below](#nested_ui_settings_data_store_ui_configs_data_store_ui_configs_fields_ui_components_map). + Structure is [documented below](#nested_ui_settings_data_store_ui_configs_fields_ui_components_map). -The `facet_field` block supports: +The `facet_field` block supports: * `field` - (Required) @@ -296,7 +296,7 @@ The following arguments are supported: (Optional) The field name that end users will see. -The `fields_ui_components_map` block supports: +The `fields_ui_components_map` block supports: * `ui_component` - (Required) The identifier for this object. Format specified above. @@ -344,14 +344,14 @@ The following arguments are supported: * `icon` - (Optional) Icon URL of shortcut. - Structure is [documented below](#nested_homepage_setting_shortcuts_shortcuts_icon). + Structure is [documented below](#nested_homepage_setting_shortcuts_icon). * `destination_uri` - (Optional) Destination URL of shortcut. -The `icon` block supports: +The `icon` block supports: * `url` - (Optional) diff --git a/website/docs/r/document_ai_warehouse_document_schema.html.markdown b/website/docs/r/document_ai_warehouse_document_schema.html.markdown index 977f2b9bd42..0f10f360c33 100644 --- a/website/docs/r/document_ai_warehouse_document_schema.html.markdown +++ b/website/docs/r/document_ai_warehouse_document_schema.html.markdown @@ -128,7 +128,7 @@ The following arguments are supported: * `schema_sources` - (Optional) The schema source information. - Structure is [documented below](#nested_property_definitions_property_definitions_schema_sources). + Structure is [documented below](#nested_property_definitions_schema_sources). * `integer_type_options` - (Optional) @@ -145,12 +145,12 @@ The following arguments are supported: * `property_type_options` - (Optional) Nested structured data property. - Structure is [documented below](#nested_property_definitions_property_definitions_property_type_options). + Structure is [documented below](#nested_property_definitions_property_type_options). * `enum_type_options` - (Optional) Enum/categorical property. - Structure is [documented below](#nested_property_definitions_property_definitions_enum_type_options). + Structure is [documented below](#nested_property_definitions_enum_type_options). * `date_time_type_options` - (Optional) @@ -165,7 +165,7 @@ The following arguments are supported: Timestamp property. Not supported by CMEK compliant deployment. -The `schema_sources` block supports: +The `schema_sources` block supports: * `name` - (Optional) @@ -175,15 +175,15 @@ The following arguments are supported: (Optional) The Doc AI processor type name. -The `property_type_options` block supports: +The `property_type_options` block supports: * `property_definitions` - (Required) Defines the metadata for a schema property. - Structure is [documented below](#nested_property_definitions_property_definitions_property_type_options_property_definitions). + Structure is [documented below](#nested_property_definitions_property_type_options_property_definitions). -The `property_definitions` block supports: +The `property_definitions` block supports: * `name` - (Required) @@ -221,7 +221,7 @@ The following arguments are supported: * `schema_sources` - (Optional) The schema source information. - Structure is [documented below](#nested_property_definitions_property_definitions_property_type_options_property_definitions_property_definitions_schema_sources). + Structure is [documented below](#nested_property_definitions_property_type_options_property_definitions_schema_sources). * `integer_type_options` - (Optional) @@ -238,7 +238,7 @@ The following arguments are supported: * `enum_type_options` - (Optional) Enum/categorical property. - Structure is [documented below](#nested_property_definitions_property_definitions_property_type_options_property_definitions_property_definitions_enum_type_options). + Structure is [documented below](#nested_property_definitions_property_type_options_property_definitions_enum_type_options). * `date_time_type_options` - (Optional) @@ -253,7 +253,7 @@ The following arguments are supported: Timestamp property. Not supported by CMEK compliant deployment. -The `schema_sources` block supports: +The `schema_sources` block supports: * `name` - (Optional) @@ -263,7 +263,7 @@ The following arguments are supported: (Optional) The Doc AI processor type name. -The `enum_type_options` block supports: +The `enum_type_options` block supports: * `possible_values` - (Required) @@ -273,7 +273,7 @@ The following arguments are supported: (Optional) Make sure the enum property value provided in the document is in the possile value list during document creation. The validation check runs by default. -The `enum_type_options` block supports: +The `enum_type_options` block supports: * `possible_values` - (Required) diff --git a/website/docs/r/edgecontainer_cluster.html.markdown b/website/docs/r/edgecontainer_cluster.html.markdown index fafd940e52e..2f479f78db2 100644 --- a/website/docs/r/edgecontainer_cluster.html.markdown +++ b/website/docs/r/edgecontainer_cluster.html.markdown @@ -273,14 +273,14 @@ The following arguments are supported: * `window` - (Optional) Represents an arbitrary window of time. - Structure is [documented below](#nested_maintenance_policy_maintenance_exclusions_maintenance_exclusions_window). + Structure is [documented below](#nested_maintenance_policy_maintenance_exclusions_window). * `id` - (Optional) A unique (per cluster) id for the window. -The `window` block supports: +The `window` block supports: * `start_time` - (Optional) diff --git a/website/docs/r/eventarc_pipeline.html.markdown b/website/docs/r/eventarc_pipeline.html.markdown index 47f32e514e1..84f6caad263 100644 --- a/website/docs/r/eventarc_pipeline.html.markdown +++ b/website/docs/r/eventarc_pipeline.html.markdown @@ -363,23 +363,23 @@ The following arguments are supported: * `authentication_config` - (Optional) Represents a config used to authenticate message requests. - Structure is [documented below](#nested_destinations_destinations_authentication_config). + Structure is [documented below](#nested_destinations_authentication_config). * `output_payload_format` - (Optional) Represents the format of message data. - Structure is [documented below](#nested_destinations_destinations_output_payload_format). + Structure is [documented below](#nested_destinations_output_payload_format). * `network_config` - (Optional) Represents a network config to be used for destination resolution and connectivity. - Structure is [documented below](#nested_destinations_destinations_network_config). + Structure is [documented below](#nested_destinations_network_config). * `http_endpoint` - (Optional) Represents a HTTP endpoint destination. - Structure is [documented below](#nested_destinations_destinations_http_endpoint). + Structure is [documented below](#nested_destinations_http_endpoint). * `workflow` - (Optional) @@ -402,7 +402,7 @@ The following arguments are supported: `projects/{project}/locations/{location}/topics/{topic}` -The `authentication_config` block supports: +The `authentication_config` block supports: * `google_oidc` - (Optional) @@ -410,7 +410,7 @@ The following arguments are supported: a GCP service account. Use this authentication method to invoke your Cloud Run and Cloud Functions destinations or HTTP endpoints that support Google OIDC. - Structure is [documented below](#nested_destinations_destinations_authentication_config_google_oidc). + Structure is [documented below](#nested_destinations_authentication_config_google_oidc). * `oauth_token` - (Optional) @@ -418,10 +418,10 @@ The following arguments are supported: [OAuth token](https://developers.google.com/identity/protocols/OAuth2). This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com. - Structure is [documented below](#nested_destinations_destinations_authentication_config_oauth_token). + Structure is [documented below](#nested_destinations_authentication_config_oauth_token). -The `google_oidc` block supports: +The `google_oidc` block supports: * `service_account` - (Required) @@ -439,7 +439,7 @@ The following arguments are supported: identifies the recipient that the JWT is intended for. If unspecified, the destination URI will be used. -The `oauth_token` block supports: +The `oauth_token` block supports: * `service_account` - (Required) @@ -458,36 +458,36 @@ The following arguments are supported: specified, "https://www.googleapis.com/auth/cloud-platform" will be used. -The `output_payload_format` block supports: +The `output_payload_format` block supports: * `protobuf` - (Optional) The format of a Protobuf message payload. - Structure is [documented below](#nested_destinations_destinations_output_payload_format_protobuf). + Structure is [documented below](#nested_destinations_output_payload_format_protobuf). * `avro` - (Optional) The format of an AVRO message payload. - Structure is [documented below](#nested_destinations_destinations_output_payload_format_avro). + Structure is [documented below](#nested_destinations_output_payload_format_avro). * `json` - (Optional) The format of a JSON message payload. -The `protobuf` block supports: +The `protobuf` block supports: * `schema_definition` - (Optional) The entire schema definition is stored in this field. -The `avro` block supports: +The `avro` block supports: * `schema_definition` - (Optional) The entire schema definition is stored in this field. -The `network_config` block supports: +The `network_config` block supports: * `network_attachment` - (Optional) @@ -497,7 +497,7 @@ The following arguments are supported: Required for HTTP endpoint destinations. Must not be specified for Workflows, MessageBus, or Topic destinations. -The `http_endpoint` block supports: +The `http_endpoint` block supports: * `uri` - (Required) @@ -721,10 +721,10 @@ The following arguments are supported: * `transformation` - (Optional) Transformation defines the way to transform an incoming message. - Structure is [documented below](#nested_mediations_mediations_transformation). + Structure is [documented below](#nested_mediations_transformation). -The `transformation` block supports: +The `transformation` block supports: * `transformation_template` - (Optional) diff --git a/website/docs/r/filestore_instance.html.markdown b/website/docs/r/filestore_instance.html.markdown index c91b01d3840..192de8ab685 100644 --- a/website/docs/r/filestore_instance.html.markdown +++ b/website/docs/r/filestore_instance.html.markdown @@ -281,10 +281,10 @@ The following arguments are supported: * `nfs_export_options` - (Optional) Nfs Export Options. There is a limit of 10 export options per file share. - Structure is [documented below](#nested_file_shares_file_shares_nfs_export_options). + Structure is [documented below](#nested_file_shares_nfs_export_options). -The `nfs_export_options` block supports: +The `nfs_export_options` block supports: * `ip_ranges` - (Optional) @@ -357,10 +357,10 @@ The following arguments are supported: (Optional) Private Service Connect configuration. Should only be set when connect_mode is PRIVATE_SERVICE_CONNECT. - Structure is [documented below](#nested_networks_networks_psc_config). + Structure is [documented below](#nested_networks_psc_config). -The `psc_config` block supports: +The `psc_config` block supports: * `endpoint_project` - (Optional) diff --git a/website/docs/r/firebase_app_hosting_backend.html.markdown b/website/docs/r/firebase_app_hosting_backend.html.markdown index a1bb2a9b6b5..7d53cc50324 100644 --- a/website/docs/r/firebase_app_hosting_backend.html.markdown +++ b/website/docs/r/firebase_app_hosting_backend.html.markdown @@ -343,10 +343,10 @@ In addition to the arguments listed above, the following computed attributes are (Output) A managed Cloud Run [`service`](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#resource:-service). - Structure is [documented below](#nested_managed_resources_managed_resources_run_service). + Structure is [documented below](#nested_managed_resources_run_service). -The `run_service` block contains: +The `run_service` block contains: * `service` - (Output) diff --git a/website/docs/r/firebase_app_hosting_domain.html.markdown b/website/docs/r/firebase_app_hosting_domain.html.markdown index 93fd80306ec..509e402e6f2 100644 --- a/website/docs/r/firebase_app_hosting_domain.html.markdown +++ b/website/docs/r/firebase_app_hosting_domain.html.markdown @@ -242,20 +242,20 @@ In addition to the arguments listed above, the following computed attributes are * `discovered` - (Output) The set of DNS records App Hosting discovered when inspecting a domain. - Structure is [documented below](#nested_custom_domain_status_required_dns_updates_required_dns_updates_discovered). + Structure is [documented below](#nested_custom_domain_status_required_dns_updates_discovered). * `desired` - (Output) The set of DNS records App Hosting needs in order to be able to serve secure content on the domain. - Structure is [documented below](#nested_custom_domain_status_required_dns_updates_required_dns_updates_desired). + Structure is [documented below](#nested_custom_domain_status_required_dns_updates_desired). * `check_time` - (Output) The last time App Hosting checked your custom domain's DNS records. -The `discovered` block contains: +The `discovered` block contains: * `domain_name` - (Output) @@ -269,15 +269,15 @@ In addition to the arguments listed above, the following computed attributes are three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). - Structure is [documented below](#nested_custom_domain_status_required_dns_updates_required_dns_updates_discovered_discovered_check_error). + Structure is [documented below](#nested_custom_domain_status_required_dns_updates_discovered_check_error). * `records` - (Output) Records on the domain. - Structure is [documented below](#nested_custom_domain_status_required_dns_updates_required_dns_updates_discovered_discovered_records). + Structure is [documented below](#nested_custom_domain_status_required_dns_updates_discovered_records). -The `check_error` block contains: +The `check_error` block contains: * `code` - (Output) @@ -293,7 +293,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) A list of messages that carry the error details. -The `records` block contains: +The `records` block contains: * `domain_name` - (Output) @@ -334,7 +334,7 @@ In addition to the arguments listed above, the following computed attributes are An enum that indicates which state(s) this DNS record applies to. Populated for all records with an `ADD` or `REMOVE` required action. -The `desired` block contains: +The `desired` block contains: * `domain_name` - (Output) @@ -348,15 +348,15 @@ In addition to the arguments listed above, the following computed attributes are three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). - Structure is [documented below](#nested_custom_domain_status_required_dns_updates_required_dns_updates_desired_desired_check_error). + Structure is [documented below](#nested_custom_domain_status_required_dns_updates_desired_check_error). * `records` - (Output) Records on the domain. - Structure is [documented below](#nested_custom_domain_status_required_dns_updates_required_dns_updates_desired_desired_records). + Structure is [documented below](#nested_custom_domain_status_required_dns_updates_desired_records). -The `check_error` block contains: +The `check_error` block contains: * `code` - (Output) @@ -372,7 +372,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) A list of messages that carry the error details. -The `records` block contains: +The `records` block contains: * `required_action` - (Output) diff --git a/website/docs/r/firebase_hosting_custom_domain.html.markdown b/website/docs/r/firebase_hosting_custom_domain.html.markdown index 74c96ba35a9..92e8d471099 100644 --- a/website/docs/r/firebase_hosting_custom_domain.html.markdown +++ b/website/docs/r/firebase_hosting_custom_domain.html.markdown @@ -301,10 +301,10 @@ In addition to the arguments listed above, the following computed attributes are * `records` - (Optional) Records on the domain - Structure is [documented below](#nested_required_dns_updates_discovered_discovered_records). + Structure is [documented below](#nested_required_dns_updates_discovered_records). -The `records` block supports: +The `records` block supports: * `domain_name` - (Optional) @@ -337,10 +337,10 @@ In addition to the arguments listed above, the following computed attributes are * `records` - (Optional) Records on the domain - Structure is [documented below](#nested_required_dns_updates_desired_desired_records). + Structure is [documented below](#nested_required_dns_updates_desired_records). -The `records` block supports: +The `records` block supports: * `domain_name` - (Optional) @@ -443,10 +443,10 @@ In addition to the arguments listed above, the following computed attributes are * `records` - (Optional) Records on the domain - Structure is [documented below](#nested_cert_verification_dns_discovered_discovered_records). + Structure is [documented below](#nested_cert_verification_dns_discovered_records). -The `records` block supports: +The `records` block supports: * `domain_name` - (Optional) @@ -479,10 +479,10 @@ In addition to the arguments listed above, the following computed attributes are * `records` - (Optional) Records on the domain - Structure is [documented below](#nested_cert_verification_dns_desired_desired_records). + Structure is [documented below](#nested_cert_verification_dns_desired_records). -The `records` block supports: +The `records` block supports: * `domain_name` - (Optional) diff --git a/website/docs/r/firebase_hosting_version.html.markdown b/website/docs/r/firebase_hosting_version.html.markdown index 8800b7d3712..009f529f837 100644 --- a/website/docs/r/firebase_hosting_version.html.markdown +++ b/website/docs/r/firebase_hosting_version.html.markdown @@ -329,10 +329,10 @@ The following arguments are supported: * `run` - (Optional) The request will be forwarded to Cloud Run. - Structure is [documented below](#nested_config_rewrites_rewrites_run). + Structure is [documented below](#nested_config_rewrites_run). -The `run` block supports: +The `run` block supports: * `service_id` - (Required) diff --git a/website/docs/r/firestore_index.html.markdown b/website/docs/r/firestore_index.html.markdown index f658d802270..727d47071e8 100644 --- a/website/docs/r/firestore_index.html.markdown +++ b/website/docs/r/firestore_index.html.markdown @@ -353,10 +353,10 @@ The following arguments are supported: (Optional) Indicates that this field supports vector search operations. Only one of `order`, `arrayConfig`, and `vectorConfig` can be specified. Vector Fields should come after the field path `__name__`. - Structure is [documented below](#nested_fields_fields_vector_config). + Structure is [documented below](#nested_fields_vector_config). -The `vector_config` block supports: +The `vector_config` block supports: * `dimension` - (Optional) diff --git a/website/docs/r/gemini_code_tools_setting.html.markdown b/website/docs/r/gemini_code_tools_setting.html.markdown index 7371a6a2fde..cce67e625f7 100644 --- a/website/docs/r/gemini_code_tools_setting.html.markdown +++ b/website/docs/r/gemini_code_tools_setting.html.markdown @@ -94,14 +94,14 @@ The following arguments are supported: * `config` - (Optional) Configuration parameters for the tool. - Structure is [documented below](#nested_enabled_tool_enabled_tool_config). + Structure is [documented below](#nested_enabled_tool_config). * `uri_override` - (Optional) Overridden URI, if allowed by Tool. -The `config` block supports: +The `config` block supports: * `key` - (Required) diff --git a/website/docs/r/gke_backup_backup_plan.html.markdown b/website/docs/r/gke_backup_backup_plan.html.markdown index 9c9441d5f36..36b59dbaa4a 100644 --- a/website/docs/r/gke_backup_backup_plan.html.markdown +++ b/website/docs/r/gke_backup_backup_plan.html.markdown @@ -558,7 +558,7 @@ The following arguments are supported: * `start_time` - (Required) Specifies the start time of the window using time of the day in UTC. - Structure is [documented below](#nested_backup_schedule_rpo_config_exclusion_windows_exclusion_windows_start_time). + Structure is [documented below](#nested_backup_schedule_rpo_config_exclusion_windows_start_time). * `duration` - (Required) @@ -575,7 +575,7 @@ The following arguments are supported: (Optional) No recurrence. The exclusion window occurs only once and on this date in UTC. Only one of singleOccurrenceDate, daily and daysOfWeek may be set. - Structure is [documented below](#nested_backup_schedule_rpo_config_exclusion_windows_exclusion_windows_single_occurrence_date). + Structure is [documented below](#nested_backup_schedule_rpo_config_exclusion_windows_single_occurrence_date). * `daily` - (Optional) @@ -587,10 +587,10 @@ The following arguments are supported: (Optional) The exclusion window occurs on these days of each week in UTC. Only one of singleOccurrenceDate, daily and daysOfWeek may be set. - Structure is [documented below](#nested_backup_schedule_rpo_config_exclusion_windows_exclusion_windows_days_of_week). + Structure is [documented below](#nested_backup_schedule_rpo_config_exclusion_windows_days_of_week). -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Optional) @@ -608,7 +608,7 @@ The following arguments are supported: (Optional) Fractions of seconds in nanoseconds. -The `single_occurrence_date` block supports: +The `single_occurrence_date` block supports: * `year` - (Optional) @@ -622,7 +622,7 @@ The following arguments are supported: (Optional) Day of a month. -The `days_of_week` block supports: +The `days_of_week` block supports: * `days_of_week` - (Optional) diff --git a/website/docs/r/gke_backup_restore_plan.html.markdown b/website/docs/r/gke_backup_restore_plan.html.markdown index a4614a63f49..bb19823d815 100644 --- a/website/docs/r/gke_backup_restore_plan.html.markdown +++ b/website/docs/r/gke_backup_restore_plan.html.markdown @@ -782,7 +782,7 @@ The following arguments are supported: determine which resources in backup should be acted upon by the supplied transformation rule actions, and this will ensure that only specific resources are affected by transformation rule actions. - Structure is [documented below](#nested_restore_config_transformation_rules_transformation_rules_resource_filter). + Structure is [documented below](#nested_restore_config_transformation_rules_resource_filter). * `field_actions` - (Required) @@ -790,10 +790,10 @@ The following arguments are supported: resources. Actions are executed in order defined - this order matters, as they could potentially interfere with each other and the first operation could affect the outcome of the second operation. - Structure is [documented below](#nested_restore_config_transformation_rules_transformation_rules_field_actions). + Structure is [documented below](#nested_restore_config_transformation_rules_field_actions). -The `resource_filter` block supports: +The `resource_filter` block supports: * `namespaces` - (Optional) @@ -812,7 +812,7 @@ The following arguments are supported: no type filtering will be performed (all resources of all types matching previous filtering parameters will be candidates for transformation). - Structure is [documented below](#nested_restore_config_transformation_rules_transformation_rules_resource_filter_group_kinds). + Structure is [documented below](#nested_restore_config_transformation_rules_resource_filter_group_kinds). * `json_path` - (Optional) @@ -822,7 +822,7 @@ The following arguments are supported: be candidates for transformation). -The `group_kinds` block supports: +The `group_kinds` block supports: * `resource_group` - (Optional) @@ -835,7 +835,7 @@ The following arguments are supported: Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc. -The `field_actions` block supports: +The `field_actions` block supports: * `op` - (Required) @@ -888,16 +888,16 @@ The following arguments are supported: (Required) The satisfying group kind must be restored first in order to satisfy the dependency. - Structure is [documented below](#nested_restore_config_restore_order_group_kind_dependencies_group_kind_dependencies_satisfying). + Structure is [documented below](#nested_restore_config_restore_order_group_kind_dependencies_satisfying). * `requiring` - (Required) The requiring group kind requires that the satisfying group kind be restored first. - Structure is [documented below](#nested_restore_config_restore_order_group_kind_dependencies_group_kind_dependencies_requiring). + Structure is [documented below](#nested_restore_config_restore_order_group_kind_dependencies_requiring). -The `satisfying` block supports: +The `satisfying` block supports: * `resource_group` - (Optional) @@ -910,7 +910,7 @@ The following arguments are supported: Kind of a Kubernetes resource, e.g. "CustomResourceDefinition", "StorageClass", etc. -The `requiring` block supports: +The `requiring` block supports: * `resource_group` - (Optional) diff --git a/website/docs/r/gke_hub_feature.html.markdown b/website/docs/r/gke_hub_feature.html.markdown index fb024e812ca..f6a128676b1 100644 --- a/website/docs/r/gke_hub_feature.html.markdown +++ b/website/docs/r/gke_hub_feature.html.markdown @@ -443,15 +443,15 @@ The following arguments are supported: * `upgrade` - (Required) Which upgrade to override. - Structure is [documented below](#nested_spec_clusterupgrade_gke_upgrade_overrides_gke_upgrade_overrides_upgrade). + Structure is [documented below](#nested_spec_clusterupgrade_gke_upgrade_overrides_upgrade). * `post_conditions` - (Required) Post conditions to override for the specified upgrade. - Structure is [documented below](#nested_spec_clusterupgrade_gke_upgrade_overrides_gke_upgrade_overrides_post_conditions). + Structure is [documented below](#nested_spec_clusterupgrade_gke_upgrade_overrides_post_conditions). -The `upgrade` block supports: +The `upgrade` block supports: * `name` - (Required) @@ -461,7 +461,7 @@ The following arguments are supported: (Required) Version of the upgrade, e.g., "1.22.1-gke.100". It should be a valid version. It must not exceet 99 characters. -The `post_conditions` block supports: +The `post_conditions` block supports: * `soaking` - (Required) @@ -683,7 +683,7 @@ The following arguments are supported: * `container_resources` - (Optional) Container resource requirements. - Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_deployment_config_container_resources). + Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_container_resources). * `pod_affinity` - (Optional) @@ -693,23 +693,23 @@ The following arguments are supported: * `pod_toleration` - (Optional) Pod tolerations of node taints. - Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_deployment_config_pod_toleration). + Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_pod_toleration). -The `container_resources` block supports: +The `container_resources` block supports: * `limits` - (Optional) Limits describes the maximum amount of compute resources allowed for use by the running container. - Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_deployment_config_container_resources_limits). + Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_container_resources_limits). * `requests` - (Optional) Requests describes the amount of compute resources reserved for the container by the kube-scheduler. - Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_deployment_config_container_resources_requests). + Structure is [documented below](#nested_fleet_default_member_config_policycontroller_policy_controller_hub_config_deployment_configs_container_resources_requests). -The `limits` block supports: +The `limits` block supports: * `memory` - (Optional) @@ -719,7 +719,7 @@ The following arguments are supported: (Optional) CPU requirement expressed in Kubernetes resource units. -The `requests` block supports: +The `requests` block supports: * `memory` - (Optional) @@ -729,7 +729,7 @@ The following arguments are supported: (Optional) CPU requirement expressed in Kubernetes resource units. -The `pod_toleration` block supports: +The `pod_toleration` block supports: * `key` - (Optional) diff --git a/website/docs/r/gkeonprem_vmware_admin_cluster.html.markdown b/website/docs/r/gkeonprem_vmware_admin_cluster.html.markdown index 73e70ff5733..6f6958dd1b4 100644 --- a/website/docs/r/gkeonprem_vmware_admin_cluster.html.markdown +++ b/website/docs/r/gkeonprem_vmware_admin_cluster.html.markdown @@ -398,10 +398,10 @@ The following arguments are supported: * `ips` - (Required) The node's network configurations used by the VMware Admin Cluster. - Structure is [documented below](#nested_network_config_static_ip_config_ip_blocks_ip_blocks_ips). + Structure is [documented below](#nested_network_config_static_ip_config_ip_blocks_ips). -The `ips` block supports: +The `ips` block supports: * `ip` - (Required) @@ -677,10 +677,10 @@ The following arguments are supported: * `status` - (Output) ResourceStatus representing detailed cluster state. - Structure is [documented below](#nested_platform_config_bundles_bundles_status). + Structure is [documented below](#nested_platform_config_bundles_status). -The `status` block contains: +The `status` block contains: * `error_message` - (Output) @@ -693,10 +693,10 @@ The following arguments are supported: * `conditions` - (Output) ResourceConditions provide a standard mechanism for higher-level status reporting from admin cluster controller. - Structure is [documented below](#nested_platform_config_bundles_bundles_status_conditions). + Structure is [documented below](#nested_platform_config_bundles_status_conditions). -The `conditions` block contains: +The `conditions` block contains: * `type` - (Output) diff --git a/website/docs/r/gkeonprem_vmware_cluster.html.markdown b/website/docs/r/gkeonprem_vmware_cluster.html.markdown index 271b22f5411..5b7f07d327f 100644 --- a/website/docs/r/gkeonprem_vmware_cluster.html.markdown +++ b/website/docs/r/gkeonprem_vmware_cluster.html.markdown @@ -476,10 +476,10 @@ The following arguments are supported: * `ips` - (Required) The node's network configurations used by the VMware User Cluster. - Structure is [documented below](#nested_network_config_static_ip_config_ip_blocks_ip_blocks_ips). + Structure is [documented below](#nested_network_config_static_ip_config_ip_blocks_ips). -The `ips` block supports: +The `ips` block supports: * `ip` - (Required) diff --git a/website/docs/r/healthcare_dicom_store.html.markdown b/website/docs/r/healthcare_dicom_store.html.markdown index fd6a8c96b9b..55fd739b21d 100644 --- a/website/docs/r/healthcare_dicom_store.html.markdown +++ b/website/docs/r/healthcare_dicom_store.html.markdown @@ -189,10 +189,10 @@ The following arguments are supported: * `bigquery_destination` - (Required) BigQueryDestination to include a fully qualified BigQuery table URI where DICOM instance metadata will be streamed. - Structure is [documented below](#nested_stream_configs_stream_configs_bigquery_destination). + Structure is [documented below](#nested_stream_configs_bigquery_destination). -The `bigquery_destination` block supports: +The `bigquery_destination` block supports: * `table_uri` - (Required) diff --git a/website/docs/r/healthcare_fhir_store.html.markdown b/website/docs/r/healthcare_fhir_store.html.markdown index d7d12463c35..c5f121c80a9 100644 --- a/website/docs/r/healthcare_fhir_store.html.markdown +++ b/website/docs/r/healthcare_fhir_store.html.markdown @@ -490,10 +490,10 @@ The following arguments are supported: are named after the resource types, e.g. "Patient", "Observation". When there is no existing table for a given resource type, the server attempts to create one. See the [streaming config reference](https://cloud.google.com/healthcare/docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores#streamconfig) for more details. - Structure is [documented below](#nested_stream_configs_stream_configs_bigquery_destination). + Structure is [documented below](#nested_stream_configs_bigquery_destination). -The `bigquery_destination` block supports: +The `bigquery_destination` block supports: * `dataset_uri` - (Required) @@ -502,10 +502,10 @@ The following arguments are supported: * `schema_config` - (Required) The configuration for the exported BigQuery schema. - Structure is [documented below](#nested_stream_configs_stream_configs_bigquery_destination_schema_config). + Structure is [documented below](#nested_stream_configs_bigquery_destination_schema_config). -The `schema_config` block supports: +The `schema_config` block supports: * `schema_type` - (Optional) @@ -527,10 +527,10 @@ The following arguments are supported: * `last_updated_partition_config` - (Optional) The configuration for exported BigQuery tables to be partitioned by FHIR resource's last updated time column. - Structure is [documented below](#nested_stream_configs_stream_configs_bigquery_destination_schema_config_last_updated_partition_config). + Structure is [documented below](#nested_stream_configs_bigquery_destination_schema_config_last_updated_partition_config). -The `last_updated_partition_config` block supports: +The `last_updated_partition_config` block supports: * `type` - (Required) diff --git a/website/docs/r/iam_access_boundary_policy.html.markdown b/website/docs/r/iam_access_boundary_policy.html.markdown index 16727ff2b0d..4d5e26192f4 100644 --- a/website/docs/r/iam_access_boundary_policy.html.markdown +++ b/website/docs/r/iam_access_boundary_policy.html.markdown @@ -117,10 +117,10 @@ The following arguments are supported: * `access_boundary_rule` - (Optional) An access boundary rule in an IAM policy. - Structure is [documented below](#nested_rules_rules_access_boundary_rule). + Structure is [documented below](#nested_rules_access_boundary_rule). -The `access_boundary_rule` block supports: +The `access_boundary_rule` block supports: * `available_resource` - (Optional) @@ -133,10 +133,10 @@ The following arguments are supported: * `availability_condition` - (Optional) The availability condition further constrains the access allowed by the access boundary rule. - Structure is [documented below](#nested_rules_rules_access_boundary_rule_availability_condition). + Structure is [documented below](#nested_rules_access_boundary_rule_availability_condition). -The `availability_condition` block supports: +The `availability_condition` block supports: * `expression` - (Required) diff --git a/website/docs/r/iam_deny_policy.html.markdown b/website/docs/r/iam_deny_policy.html.markdown index 9713c58c107..2ad339558da 100644 --- a/website/docs/r/iam_deny_policy.html.markdown +++ b/website/docs/r/iam_deny_policy.html.markdown @@ -112,10 +112,10 @@ The following arguments are supported: * `deny_rule` - (Optional) A deny rule in an IAM deny policy. - Structure is [documented below](#nested_rules_rules_deny_rule). + Structure is [documented below](#nested_rules_deny_rule). -The `deny_rule` block supports: +The `deny_rule` block supports: * `denied_principals` - (Optional) @@ -140,10 +140,10 @@ The following arguments are supported: * `denial_condition` - (Optional) User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header. - Structure is [documented below](#nested_rules_rules_deny_rule_denial_condition). + Structure is [documented below](#nested_rules_deny_rule_denial_condition). -The `denial_condition` block supports: +The `denial_condition` block supports: * `expression` - (Required) diff --git a/website/docs/r/iam_workforce_pool_provider_scim_tenant.html.markdown b/website/docs/r/iam_workforce_pool_provider_scim_tenant.html.markdown index 45a13fe63fa..c4bfbfc14c3 100644 --- a/website/docs/r/iam_workforce_pool_provider_scim_tenant.html.markdown +++ b/website/docs/r/iam_workforce_pool_provider_scim_tenant.html.markdown @@ -79,6 +79,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "example" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = true # state, base_uri, purge_time and service_agent are output only, not settable } @@ -119,6 +120,10 @@ The following arguments are supported: (Optional) Maps BYOID claims to SCIM claims. This is a required field for new SCIM Tenants being created. +* `hard_delete` - + (Optional) + Deletes the SCIM tenant immediately. This operation cannot be undone. + ## Attributes Reference diff --git a/website/docs/r/iam_workforce_pool_provider_scim_token.html.markdown b/website/docs/r/iam_workforce_pool_provider_scim_token.html.markdown index a756ce7e631..74f6dc8b97a 100644 --- a/website/docs/r/iam_workforce_pool_provider_scim_token.html.markdown +++ b/website/docs/r/iam_workforce_pool_provider_scim_token.html.markdown @@ -79,6 +79,7 @@ resource "google_iam_workforce_pool_provider_scim_tenant" "tenant" { "google.subject" = "user.externalId", "google.group" = "group.externalId" } + hard_delete = true # state, base_uri, purge_time and service_agent are output only, not settable } diff --git a/website/docs/r/iam_workload_identity_pool.html.markdown b/website/docs/r/iam_workload_identity_pool.html.markdown index 7b757610c2d..ff193151081 100644 --- a/website/docs/r/iam_workload_identity_pool.html.markdown +++ b/website/docs/r/iam_workload_identity_pool.html.markdown @@ -242,10 +242,10 @@ The following arguments are supported: List of Trust Anchors to be used while performing validation against a given `TrustStore`. The incoming end entity's certificate must be chained up to one of the trust anchors here. - Structure is [documented below](#nested_inline_trust_config_additional_trust_bundles_trust_store_trust_anchors). + Structure is [documented below](#nested_inline_trust_config_additional_trust_bundles_trust_anchors). -The `trust_anchors` block supports: +The `trust_anchors` block supports: * `pem_certificate` - (Required) diff --git a/website/docs/r/identity_platform_config.html.markdown b/website/docs/r/identity_platform_config.html.markdown index cde38a8dc73..66c4f4ca5bc 100644 --- a/website/docs/r/identity_platform_config.html.markdown +++ b/website/docs/r/identity_platform_config.html.markdown @@ -392,10 +392,10 @@ The following arguments are supported: * `totp_provider_config` - (Optional) TOTP MFA provider config for this project. - Structure is [documented below](#nested_mfa_provider_configs_provider_configs_totp_provider_config). + Structure is [documented below](#nested_mfa_provider_configs_totp_provider_config). -The `totp_provider_config` block supports: +The `totp_provider_config` block supports: * `adjacent_intervals` - (Optional) diff --git a/website/docs/r/integration_connectors_connection.html.markdown b/website/docs/r/integration_connectors_connection.html.markdown index 0829e84055f..06942e57dae 100644 --- a/website/docs/r/integration_connectors_connection.html.markdown +++ b/website/docs/r/integration_connectors_connection.html.markdown @@ -398,21 +398,21 @@ The following arguments are supported: * `secret_value` - (Optional) Secret value of configVariable. - Structure is [documented below](#nested_config_variable_config_variable_secret_value). + Structure is [documented below](#nested_config_variable_secret_value). * `encryption_key_value` - (Optional) Encryption key value of configVariable. - Structure is [documented below](#nested_config_variable_config_variable_encryption_key_value). + Structure is [documented below](#nested_config_variable_encryption_key_value). -The `secret_value` block supports: +The `secret_value` block supports: * `secret_version` - (Required) Secret version of Secret Value for Config variable. -The `encryption_key_value` block supports: +The `encryption_key_value` block supports: * `type` - (Required) @@ -488,21 +488,21 @@ The following arguments are supported: * `secret_value` - (Optional) Secret value of configVariable. - Structure is [documented below](#nested_auth_config_additional_variable_additional_variable_secret_value). + Structure is [documented below](#nested_auth_config_additional_variable_secret_value). * `encryption_key_value` - (Optional) Encryption key value of configVariable. - Structure is [documented below](#nested_auth_config_additional_variable_additional_variable_encryption_key_value). + Structure is [documented below](#nested_auth_config_additional_variable_encryption_key_value). -The `secret_value` block supports: +The `secret_value` block supports: * `secret_version` - (Required) Secret version of Secret Value for Config variable. -The `encryption_key_value` block supports: +The `encryption_key_value` block supports: * `type` - (Required) @@ -674,10 +674,10 @@ The following arguments are supported: * `destination` - (Optional) The destinations for the key. - Structure is [documented below](#nested_destination_config_destination_config_destination). + Structure is [documented below](#nested_destination_config_destination). -The `destination` block supports: +The `destination` block supports: * `port` - (Optional) @@ -809,21 +809,21 @@ The following arguments are supported: * `secret_value` - (Optional) Secret value of configVariable - Structure is [documented below](#nested_ssl_config_additional_variable_additional_variable_secret_value). + Structure is [documented below](#nested_ssl_config_additional_variable_secret_value). * `encryption_key_value` - (Optional) Encryption key value of configVariable - Structure is [documented below](#nested_ssl_config_additional_variable_additional_variable_encryption_key_value). + Structure is [documented below](#nested_ssl_config_additional_variable_encryption_key_value). -The `secret_value` block supports: +The `secret_value` block supports: * `secret_version` - (Required) Secret version of Secret Value for Config variable. -The `encryption_key_value` block supports: +The `encryption_key_value` block supports: * `type` - (Optional) @@ -927,21 +927,21 @@ The following arguments are supported: * `secret_value` - (Optional) Secret value of configVariable - Structure is [documented below](#nested_eventing_config_auth_config_additional_variable_additional_variable_secret_value). + Structure is [documented below](#nested_eventing_config_auth_config_additional_variable_secret_value). * `encryption_key_value` - (Optional) Encryption key value of configVariable - Structure is [documented below](#nested_eventing_config_auth_config_additional_variable_additional_variable_encryption_key_value). + Structure is [documented below](#nested_eventing_config_auth_config_additional_variable_encryption_key_value). -The `secret_value` block supports: +The `secret_value` block supports: * `secret_version` - (Required) Secret version of Secret Value for Config variable. -The `encryption_key_value` block supports: +The `encryption_key_value` block supports: * `type` - (Optional) @@ -994,21 +994,21 @@ The following arguments are supported: * `secret_value` - (Optional) Secret value of configVariable - Structure is [documented below](#nested_eventing_config_additional_variable_additional_variable_secret_value). + Structure is [documented below](#nested_eventing_config_additional_variable_secret_value). * `encryption_key_value` - (Optional) Encryption key value of configVariable. - Structure is [documented below](#nested_eventing_config_additional_variable_additional_variable_encryption_key_value). + Structure is [documented below](#nested_eventing_config_additional_variable_encryption_key_value). -The `secret_value` block supports: +The `secret_value` block supports: * `secret_version` - (Required) Secret version of Secret Value for Config variable. -The `encryption_key_value` block supports: +The `encryption_key_value` block supports: * `type` - (Optional) diff --git a/website/docs/r/integrations_auth_config.html.markdown b/website/docs/r/integrations_auth_config.html.markdown index 662574fc70f..9734ae106ae 100644 --- a/website/docs/r/integrations_auth_config.html.markdown +++ b/website/docs/r/integrations_auth_config.html.markdown @@ -218,37 +218,37 @@ The following arguments are supported: * `key` - (Optional) Key of the map entry. - Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_entries_key). + Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_key). * `value` - (Optional) Value of the map entry. - Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_entries_value). + Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_value). -The `key` block supports: +The `key` block supports: * `literal_value` - (Optional) Passing a literal value - Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_entries_key_literal_value). + Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_key_literal_value). -The `literal_value` block supports: +The `literal_value` block supports: * `string_value` - (Optional) String. -The `value` block supports: +The `value` block supports: * `literal_value` - (Optional) Passing a literal value - Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_entries_value_literal_value). + Structure is [documented below](#nested_decrypted_credential_oauth2_client_credentials_token_params_entries_value_literal_value). -The `literal_value` block supports: +The `literal_value` block supports: * `string_value` - (Optional) diff --git a/website/docs/r/kms_ekm_connection.html.markdown b/website/docs/r/kms_ekm_connection.html.markdown index 4291ff21629..a57a6779f1f 100644 --- a/website/docs/r/kms_ekm_connection.html.markdown +++ b/website/docs/r/kms_ekm_connection.html.markdown @@ -104,14 +104,14 @@ The following arguments are supported: * `server_certificates` - (Required) Required. A list of leaf server certificates used to authenticate HTTPS connections to the EKM replica. Currently, a maximum of 10 Certificate is supported. - Structure is [documented below](#nested_service_resolvers_service_resolvers_server_certificates). + Structure is [documented below](#nested_service_resolvers_server_certificates). * `endpoint_filter` - (Optional) Optional. The filter applied to the endpoints of the resolved service. If no filter is specified, all endpoints will be considered. An endpoint will be chosen arbitrarily from the filtered list for each request. For endpoint filter syntax and examples, see https://cloud.google.com/service-directory/docs/reference/rpc/google.cloud.servicedirectory.v1#resolveservicerequest. -The `server_certificates` block supports: +The `server_certificates` block supports: * `raw_der` - (Required) diff --git a/website/docs/r/looker_instance.html.markdown b/website/docs/r/looker_instance.html.markdown index f16a92bce74..04fe46ab66f 100644 --- a/website/docs/r/looker_instance.html.markdown +++ b/website/docs/r/looker_instance.html.markdown @@ -250,8 +250,24 @@ resource "google_looker_instance" "looker-instance" { } psc_config { allowed_vpcs = ["projects/test-project/global/networks/test"] - # update only - # service_attachments = [{local_fqdn: "www.local-fqdn.com" target_service_attachment_uri: "projects/my-project/regions/us-east1/serviceAttachments/sa"}] + + # First Service Attachment + # service_attachments { + # local_fqdn = "www.example-one.com" + # target_service_attachment_uri = "projects/my-project/regions/us-east1/serviceAttachments/sa-1" + # } + + # Second Service Attachment + # service_attachments { + # local_fqdn = "api.internal-partner.com" + # target_service_attachment_uri = "projects/partner-project/regions/us-central1/serviceAttachments/sa-gateway" + # } + + # Third Service Attachment + # service_attachments { + # local_fqdn = "git.internal-repo.com" + # target_service_attachment_uri = "projects/devops-project/regions/us-west1/serviceAttachments/gitlab-sa" + # } } } ``` @@ -339,6 +355,11 @@ The following arguments are supported: disrupt service. Structure is [documented below](#nested_maintenance_window). +* `periodic_export_config` - + (Optional) + Configuration for periodic export. + Structure is [documented below](#nested_periodic_export_config). + * `platform_edition` - (Optional) Platform editions for a Looker instance. Each edition maps to a set of instance features, like its size. Must be one of these values: @@ -545,6 +566,43 @@ nested resources will return an error. Possible values: DEFAULT, FORCE The `start_time` block supports: +* `hours` - + (Optional) + Hours of day in 24 hour format. Should be from 0 to 23. + +* `minutes` - + (Optional) + Minutes of hour of day. Must be from 0 to 59. + +* `seconds` - + (Optional) + Seconds of minutes of the time. Must normally be from 0 to 59. + +* `nanos` - + (Optional) + Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + +The `periodic_export_config` block supports: + +* `kms_key` - + (Required) + Name of the CMEK key in KMS. + Format: + projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + +* `gcs_uri` - + (Required) + Cloud Storage bucket URI for periodic export. + Format: gs://{bucket_name} + +* `start_time` - + (Required) + Time in UTC to start the periodic export job. + Structure is [documented below](#nested_periodic_export_config_start_time). + + +The `start_time` block supports: + * `hours` - (Optional) Hours of day in 24 hour format. Should be from 0 to 23. diff --git a/website/docs/r/lustre_instance.html.markdown b/website/docs/r/lustre_instance.html.markdown index 159aa133660..82286a597bc 100644 --- a/website/docs/r/lustre_instance.html.markdown +++ b/website/docs/r/lustre_instance.html.markdown @@ -132,11 +132,58 @@ The following arguments are supported: (Optional) The KMS key id to use for encryption of the Lustre instance. +* `access_rules_options` - + (Optional) + Access control rules for the Lustre instance. Configures default root + squashing behavior and specific access rules based on IP addresses. + Structure is [documented below](#nested_access_rules_options). + * `project` - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +The `access_rules_options` block supports: + +* `default_squash_mode` - + (Required) + Set to "ROOT_SQUASH" to enable root squashing by default. + Other values include "NO_SQUASH". + Possible values are: `ROOT_SQUASH`, `NO_SQUASH`. + +* `default_squash_uid` - + (Optional) + The UID to map the root user to when root squashing is enabled + (e.g., 65534 for nobody). + +* `default_squash_gid` - + (Optional) + The GID to map the root user to when root squashing is enabled + (e.g., 65534 for nobody). + +* `access_rules` - + (Optional) + An array of access rule exceptions. Each rule defines IP address ranges + that should have different squash behavior than the default. + Structure is [documented below](#nested_access_rules_options_access_rules). + + +The `access_rules` block supports: + +* `name` - + (Required) + A unique identifier for the access rule. + +* `ip_address_ranges` - + (Required) + An array of IP address strings or CIDR ranges that this rule applies to. + +* `squash_mode` - + (Required) + The squash mode for this specific rule. Currently, only "NO_SQUASH" + is supported for exceptions. + Possible values are: `NO_SQUASH`. + ## Attributes Reference In addition to the arguments listed above, the following computed attributes are exported: @@ -175,9 +222,9 @@ In addition to the arguments listed above, the following computed attributes are This resource provides the following [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: -- `create` - Default is 40 minutes. -- `update` - Default is 20 minutes. -- `delete` - Default is 20 minutes. +- `create` - Default is 120 minutes. +- `update` - Default is 60 minutes. +- `delete` - Default is 60 minutes. ## Import diff --git a/website/docs/r/managed_kafka_cluster.html.markdown b/website/docs/r/managed_kafka_cluster.html.markdown index 607b1c50324..7a6b6c4e652 100644 --- a/website/docs/r/managed_kafka_cluster.html.markdown +++ b/website/docs/r/managed_kafka_cluster.html.markdown @@ -233,9 +233,9 @@ The following arguments are supported: The `broker_capacity_config` block supports: -* `disk_size_gb` - +* `disk_size_gib` - (Optional) - The disk to provision for each broker in Gigabytes. Minimum: 100 GB. + The disk to provision for each broker in Gibibytes. Minimum: 100 GiB. The `rebalance_config` block supports: diff --git a/website/docs/r/managed_kafka_connect_cluster.html.markdown b/website/docs/r/managed_kafka_connect_cluster.html.markdown index c6e720bf058..edb208793d0 100644 --- a/website/docs/r/managed_kafka_connect_cluster.html.markdown +++ b/website/docs/r/managed_kafka_connect_cluster.html.markdown @@ -152,9 +152,11 @@ The following arguments are supported: VPC subnet to make available to the Kafka Connect cluster. Structured like: projects/{project}/regions/{region}/subnetworks/{subnet_id}. It is used to create a Private Service Connect (PSC) interface for the Kafka Connect workers. It must be located in the same region as the Kafka Connect cluster. The CIDR range of the subnet must be within the IPv4 address ranges for private networks, as specified in RFC 1918. The primary subnet CIDR range must have a minimum size of /22 (1024 addresses). * `additional_subnets` - - (Optional) + (Optional, Deprecated) Additional subnets may be specified. They may be in another region, but must be in the same VPC network. The Connect workers can communicate with network endpoints in either the primary or additional subnets. + ~> **Warning:** `additionalSubnets` is deprecated and will be removed in a future major release. Managed Kafka Connect clusters can now reach any endpoint accessible from the primary subnet without the need to define additional subnets. Please see https://cloud.google.com/managed-service-for-apache-kafka/docs/connect-cluster/create-connect-cluster#worker-subnet for more information. + * `dns_domain_names` - (Optional) Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog diff --git a/website/docs/r/memcache_instance.html.markdown b/website/docs/r/memcache_instance.html.markdown index eea1071a921..b7b003cec98 100644 --- a/website/docs/r/memcache_instance.html.markdown +++ b/website/docs/r/memcache_instance.html.markdown @@ -243,10 +243,10 @@ When the field is set to false, deleting the instance is allowed. * `start_time` - (Required) Required. Start time of the window in UTC time. - Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_weekly_maintenance_window_start_time). + Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_start_time). -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Optional) diff --git a/website/docs/r/memorystore_instance.html.markdown b/website/docs/r/memorystore_instance.html.markdown index b6c2fbb1242..b89853acf67 100644 --- a/website/docs/r/memorystore_instance.html.markdown +++ b/website/docs/r/memorystore_instance.html.markdown @@ -636,10 +636,10 @@ The following arguments are supported: * `start_time` - (Required) Start time of the window in UTC time. - Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_weekly_maintenance_window_start_time). + Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_start_time). -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Optional) @@ -928,18 +928,18 @@ In addition to the arguments listed above, the following computed attributes are * `connections` - (Optional) A group of PSC connections. They are created in the same VPC network, one for each service attachment in the cluster. - Structure is [documented below](#nested_endpoints_endpoints_connections). + Structure is [documented below](#nested_endpoints_connections). -The `connections` block supports: +The `connections` block supports: * `psc_auto_connection` - (Optional) Detailed information of a PSC connection that is created through service connectivity automation. - Structure is [documented below](#nested_endpoints_endpoints_connections_connections_psc_auto_connection). + Structure is [documented below](#nested_endpoints_connections_psc_auto_connection). -The `psc_auto_connection` block supports: +The `psc_auto_connection` block supports: * `psc_connection_id` - (Output) diff --git a/website/docs/r/memorystore_instance_desired_user_created_endpoints.html.markdown b/website/docs/r/memorystore_instance_desired_user_created_endpoints.html.markdown index 57d63bbe56a..07f8fd76c35 100644 --- a/website/docs/r/memorystore_instance_desired_user_created_endpoints.html.markdown +++ b/website/docs/r/memorystore_instance_desired_user_created_endpoints.html.markdown @@ -341,19 +341,19 @@ The following arguments are supported: * `connections` - (Optional) - Structure is [documented below](#nested_desired_user_created_endpoints_desired_user_created_endpoints_connections). + Structure is [documented below](#nested_desired_user_created_endpoints_connections). -The `connections` block supports: +The `connections` block supports: * `psc_connection` - (Optional) Detailed information of a PSC connection that is created by the customer who owns the cluster. - Structure is [documented below](#nested_desired_user_created_endpoints_desired_user_created_endpoints_connections_connections_psc_connection). + Structure is [documented below](#nested_desired_user_created_endpoints_connections_psc_connection). -The `psc_connection` block supports: +The `psc_connection` block supports: * `psc_connection_id` - (Required) diff --git a/website/docs/r/monitoring_alert_policy.html.markdown b/website/docs/r/monitoring_alert_policy.html.markdown index 7291c26fa17..52de003fd53 100644 --- a/website/docs/r/monitoring_alert_policy.html.markdown +++ b/website/docs/r/monitoring_alert_policy.html.markdown @@ -240,7 +240,7 @@ The following arguments are supported: (Optional) A condition that checks that a time series continues to receive new data points. - Structure is [documented below](#nested_conditions_conditions_condition_absent). + Structure is [documented below](#nested_conditions_condition_absent). * `name` - (Output) @@ -254,13 +254,13 @@ The following arguments are supported: * `condition_monitoring_query_language` - (Optional) A Monitoring Query Language query that outputs a boolean stream - Structure is [documented below](#nested_conditions_conditions_condition_monitoring_query_language). + Structure is [documented below](#nested_conditions_condition_monitoring_query_language). * `condition_threshold` - (Optional) A condition that compares a time series against a threshold. - Structure is [documented below](#nested_conditions_conditions_condition_threshold). + Structure is [documented below](#nested_conditions_condition_threshold). * `display_name` - (Required) @@ -274,7 +274,7 @@ The following arguments are supported: (Optional) A condition that checks for log messages matching given constraints. If set, no other conditions can be present. - Structure is [documented below](#nested_conditions_conditions_condition_matched_log). + Structure is [documented below](#nested_conditions_condition_matched_log). * `condition_prometheus_query_language` - (Optional) @@ -282,17 +282,17 @@ The following arguments are supported: Prometheus Query Language (PromQL). The PrometheusQueryLanguageCondition message contains information from a Prometheus alerting rule and its associated rule group. - Structure is [documented below](#nested_conditions_conditions_condition_prometheus_query_language). + Structure is [documented below](#nested_conditions_condition_prometheus_query_language). * `condition_sql` - (Optional) A condition that allows alerting policies to be defined using GoogleSQL. SQL conditions examine a sliding window of logs using GoogleSQL. Alert policies with SQL conditions may incur additional billing. - Structure is [documented below](#nested_conditions_conditions_condition_sql). + Structure is [documented below](#nested_conditions_condition_sql). -The `condition_absent` block supports: +The `condition_absent` block supports: * `aggregations` - (Optional) @@ -305,7 +305,7 @@ The following arguments are supported: all members of a group of resources). Multiple aggregations are applied in the order specified. - Structure is [documented below](#nested_conditions_conditions_condition_absent_aggregations). + Structure is [documented below](#nested_conditions_condition_absent_aggregations). * `trigger` - (Optional) @@ -315,7 +315,7 @@ The following arguments are supported: the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations. - Structure is [documented below](#nested_conditions_conditions_condition_absent_trigger). + Structure is [documented below](#nested_conditions_condition_absent_trigger). * `duration` - (Required) @@ -341,7 +341,7 @@ The following arguments are supported: in length. -The `aggregations` block supports: +The `aggregations` block supports: * `per_series_aligner` - (Optional) @@ -430,7 +430,7 @@ The following arguments are supported: returned. Possible values are: `REDUCE_NONE`, `REDUCE_MEAN`, `REDUCE_MIN`, `REDUCE_MAX`, `REDUCE_SUM`, `REDUCE_STDDEV`, `REDUCE_COUNT`, `REDUCE_COUNT_TRUE`, `REDUCE_COUNT_FALSE`, `REDUCE_FRACTION_TRUE`, `REDUCE_PERCENTILE_99`, `REDUCE_PERCENTILE_95`, `REDUCE_PERCENTILE_50`, `REDUCE_PERCENTILE_05`. -The `trigger` block supports: +The `trigger` block supports: * `percent` - (Optional) @@ -444,7 +444,7 @@ The following arguments are supported: that must fail the predicate for the condition to be triggered. -The `condition_monitoring_query_language` block supports: +The `condition_monitoring_query_language` block supports: * `query` - (Required) @@ -478,7 +478,7 @@ The following arguments are supported: been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified. - Structure is [documented below](#nested_conditions_conditions_condition_monitoring_query_language_trigger). + Structure is [documented below](#nested_conditions_condition_monitoring_query_language_trigger). * `evaluation_missing_data` - (Optional) @@ -488,7 +488,7 @@ The following arguments are supported: Possible values are: `EVALUATION_MISSING_DATA_INACTIVE`, `EVALUATION_MISSING_DATA_ACTIVE`, `EVALUATION_MISSING_DATA_NO_OP`. -The `trigger` block supports: +The `trigger` block supports: * `percent` - (Optional) @@ -502,7 +502,7 @@ The following arguments are supported: that must fail the predicate for the condition to be triggered. -The `condition_threshold` block supports: +The `condition_threshold` block supports: * `threshold_value` - (Optional) @@ -545,7 +545,7 @@ The following arguments are supported: the MetricService.ListTimeSeries request. It is advisable to use the ListTimeSeries method when debugging this field. - Structure is [documented below](#nested_conditions_conditions_condition_threshold_denominator_aggregations). + Structure is [documented below](#nested_conditions_condition_threshold_denominator_aggregations). * `duration` - (Required) @@ -573,7 +573,7 @@ The following arguments are supported: `forecastHorizon`. When this field is not set, the `MetricThreshold` tests the current value of the timeseries against the threshold. - Structure is [documented below](#nested_conditions_conditions_condition_threshold_forecast_options). + Structure is [documented below](#nested_conditions_condition_threshold_forecast_options). * `comparison` - (Required) @@ -597,7 +597,7 @@ The following arguments are supported: been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified. - Structure is [documented below](#nested_conditions_conditions_condition_threshold_trigger). + Structure is [documented below](#nested_conditions_condition_threshold_trigger). * `aggregations` - (Optional) @@ -614,7 +614,7 @@ The following arguments are supported: request. It is advisable to use the ListTimeSeries method when debugging this field. - Structure is [documented below](#nested_conditions_conditions_condition_threshold_aggregations). + Structure is [documented below](#nested_conditions_condition_threshold_aggregations). * `filter` - (Optional) @@ -639,7 +639,7 @@ The following arguments are supported: Possible values are: `EVALUATION_MISSING_DATA_INACTIVE`, `EVALUATION_MISSING_DATA_ACTIVE`, `EVALUATION_MISSING_DATA_NO_OP`. -The `denominator_aggregations` block supports: +The `denominator_aggregations` block supports: * `per_series_aligner` - (Optional) @@ -728,7 +728,7 @@ The following arguments are supported: returned. Possible values are: `REDUCE_NONE`, `REDUCE_MEAN`, `REDUCE_MIN`, `REDUCE_MAX`, `REDUCE_SUM`, `REDUCE_STDDEV`, `REDUCE_COUNT`, `REDUCE_COUNT_TRUE`, `REDUCE_COUNT_FALSE`, `REDUCE_FRACTION_TRUE`, `REDUCE_PERCENTILE_99`, `REDUCE_PERCENTILE_95`, `REDUCE_PERCENTILE_50`, `REDUCE_PERCENTILE_05`. -The `forecast_options` block supports: +The `forecast_options` block supports: * `forecast_horizon` - (Required) @@ -739,7 +739,7 @@ The following arguments are supported: forecasts made for the Configured `duration`, then the timeseries is considered to be failing. -The `trigger` block supports: +The `trigger` block supports: * `percent` - (Optional) @@ -753,7 +753,7 @@ The following arguments are supported: that must fail the predicate for the condition to be triggered. -The `aggregations` block supports: +The `aggregations` block supports: * `per_series_aligner` - (Optional) @@ -842,7 +842,7 @@ The following arguments are supported: returned. Possible values are: `REDUCE_NONE`, `REDUCE_MEAN`, `REDUCE_MIN`, `REDUCE_MAX`, `REDUCE_SUM`, `REDUCE_STDDEV`, `REDUCE_COUNT`, `REDUCE_COUNT_TRUE`, `REDUCE_COUNT_FALSE`, `REDUCE_FRACTION_TRUE`, `REDUCE_PERCENTILE_99`, `REDUCE_PERCENTILE_95`, `REDUCE_PERCENTILE_50`, `REDUCE_PERCENTILE_05`. -The `condition_matched_log` block supports: +The `condition_matched_log` block supports: * `filter` - (Required) @@ -858,7 +858,7 @@ The following arguments are supported: Label keys and corresponding values can be used in notifications generated by this condition. -The `condition_prometheus_query_language` block supports: +The `condition_prometheus_query_language` block supports: * `query` - (Required) @@ -922,7 +922,7 @@ The following arguments are supported: Users with the `monitoring.alertPolicyViewer` role are able to see the name of the non-existent metric in the alerting policy condition. -The `condition_sql` block supports: +The `condition_sql` block supports: * `query` - (Required) @@ -935,37 +935,37 @@ The following arguments are supported: * `minutes` - (Optional) Used to schedule the query to run every so many minutes. - Structure is [documented below](#nested_conditions_conditions_condition_sql_minutes). + Structure is [documented below](#nested_conditions_condition_sql_minutes). * `hourly` - (Optional) Used to schedule the query to run every so many hours. - Structure is [documented below](#nested_conditions_conditions_condition_sql_hourly). + Structure is [documented below](#nested_conditions_condition_sql_hourly). * `daily` - (Optional) Used to schedule the query to run every so many days. - Structure is [documented below](#nested_conditions_conditions_condition_sql_daily). + Structure is [documented below](#nested_conditions_condition_sql_daily). * `row_count_test` - (Optional) A test that checks if the number of rows in the result set violates some threshold. - Structure is [documented below](#nested_conditions_conditions_condition_sql_row_count_test). + Structure is [documented below](#nested_conditions_condition_sql_row_count_test). * `boolean_test` - (Optional) A test that uses an alerting result in a boolean column produced by the SQL query. - Structure is [documented below](#nested_conditions_conditions_condition_sql_boolean_test). + Structure is [documented below](#nested_conditions_condition_sql_boolean_test). -The `minutes` block supports: +The `minutes` block supports: * `periodicity` - (Required) Number of minutes between runs. The interval must be greater than or equal to 5 minutes and less than or equal to 1440 minutes. -The `hourly` block supports: +The `hourly` block supports: * `periodicity` - (Required) @@ -978,7 +978,7 @@ The following arguments are supported: Must be greater than or equal to 0 minutes and less than or equal to 59 minutes. If left unspecified, then an arbitrary offset is used. -The `daily` block supports: +The `daily` block supports: * `periodicity` - (Required) @@ -990,10 +990,10 @@ The following arguments are supported: The time of day (in UTC) at which the query should run. If left unspecified, the server picks an arbitrary time of day and runs the query at the same time each day. - Structure is [documented below](#nested_conditions_conditions_condition_sql_daily_execution_time). + Structure is [documented below](#nested_conditions_condition_sql_daily_execution_time). -The `execution_time` block supports: +The `execution_time` block supports: * `hours` - (Optional) @@ -1018,7 +1018,7 @@ The following arguments are supported: Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. -The `row_count_test` block supports: +The `row_count_test` block supports: * `comparison` - (Required) @@ -1036,7 +1036,7 @@ The following arguments are supported: (Required) The value against which to compare the row count. -The `boolean_test` block supports: +The `boolean_test` block supports: * `column` - (Required) diff --git a/website/docs/r/monitoring_slo.html.markdown b/website/docs/r/monitoring_slo.html.markdown index 0df0ab628b6..59281e2d124 100644 --- a/website/docs/r/monitoring_slo.html.markdown +++ b/website/docs/r/monitoring_slo.html.markdown @@ -291,7 +291,7 @@ The following arguments are supported: performance with respect to a single aspect of service quality. Exactly one of the following must be set: `basic_sli`, `request_based_sli`, `windows_based_sli` - Structure is [documented below](#nested_service_level_indicator_basic_sli). + Structure is [documented below](#nested_basic_sli). * `request_based_sli` - (Optional) @@ -302,7 +302,7 @@ The following arguments are supported: performance with respect to a single aspect of service quality. Exactly one of the following must be set: `basic_sli`, `request_based_sli`, `windows_based_sli` - Structure is [documented below](#nested_service_level_indicator_request_based_sli). + Structure is [documented below](#nested_request_based_sli). * `windows_based_sli` - (Optional) @@ -314,7 +314,7 @@ The following arguments are supported: aspect of service quality. Exactly one of the following must be set: `basic_sli`, `request_based_sli`, `windows_based_sli` - Structure is [documented below](#nested_service_level_indicator_windows_based_sli). + Structure is [documented below](#nested_windows_based_sli). * `slo_id` - (Optional) @@ -325,7 +325,7 @@ The following arguments are supported: -The `basic_sli` block supports: +The `basic_sli` block supports: * `method` - (Optional) @@ -357,15 +357,15 @@ The following arguments are supported: * `latency` - (Optional) Parameters for a latency threshold SLI. - Structure is [documented below](#nested_service_level_indicator_basic_sli_latency). + Structure is [documented below](#nested_basic_sli_latency). * `availability` - (Optional) Availability based SLI, dervied from count of requests made to this service that return successfully. - Structure is [documented below](#nested_service_level_indicator_basic_sli_availability). + Structure is [documented below](#nested_basic_sli_availability). -The `latency` block supports: +The `latency` block supports: * `threshold` - (Required) @@ -373,13 +373,13 @@ The following arguments are supported: Good service is defined to be the count of requests made to this service that return in no more than threshold. -The `availability` block supports: +The `availability` block supports: * `enabled` - (Optional) Whether an availability SLI is enabled or not. Must be set to true. Defaults to `true`. -The `request_based_sli` block supports: +The `request_based_sli` block supports: * `good_total_ratio` - (Optional) @@ -389,7 +389,7 @@ The following arguments are supported: The relationship good_service + bad_service = total_service will be assumed. Exactly one of `distribution_cut` or `good_total_ratio` can be set. - Structure is [documented below](#nested_service_level_indicator_request_based_sli_good_total_ratio). + Structure is [documented below](#nested_request_based_sli_good_total_ratio). * `distribution_cut` - (Optional) @@ -399,10 +399,10 @@ The following arguments are supported: Defines a distribution TimeSeries filter and thresholds used for measuring good service and total service. Exactly one of `distribution_cut` or `good_total_ratio` can be set. - Structure is [documented below](#nested_service_level_indicator_request_based_sli_distribution_cut). + Structure is [documented below](#nested_request_based_sli_distribution_cut). -The `good_total_ratio` block supports: +The `good_total_ratio` block supports: * `good_service_filter` - (Optional) @@ -433,7 +433,7 @@ The following arguments are supported: Exactly two of `good_service_filter`,`bad_service_filter`,`total_service_filter` must be set (good + bad = total is assumed). -The `distribution_cut` block supports: +The `distribution_cut` block supports: * `distribution_filter` - (Required) @@ -449,10 +449,10 @@ The following arguments are supported: that range.min <= x <= range.max. inclusive of min and max. Open ranges can be defined by setting just one of min or max. - Structure is [documented below](#nested_service_level_indicator_request_based_sli_distribution_cut_range). + Structure is [documented below](#nested_request_based_sli_distribution_cut_range). -The `range` block supports: +The `range` block supports: * `min` - (Optional) @@ -464,7 +464,7 @@ The following arguments are supported: max value for the range (inclusive). If not given, will be set to 0 -The `windows_based_sli` block supports: +The `windows_based_sli` block supports: * `window_period` - (Optional) @@ -486,7 +486,7 @@ The following arguments are supported: high enough. One of `good_bad_metric_filter`, `good_total_ratio_threshold`, `metric_mean_in_range`, `metric_sum_in_range` must be set for `windows_based_sli`. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold). * `metric_mean_in_range` - (Optional) @@ -497,7 +497,7 @@ The following arguments are supported: `metric_sum_in_range` must be set for `windows_based_sli`. Average value X of `time_series` should satisfy `range.min <= X <= range.max` for a good window. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_metric_mean_in_range). + Structure is [documented below](#nested_windows_based_sli_metric_mean_in_range). * `metric_sum_in_range` - (Optional) @@ -508,10 +508,10 @@ The following arguments are supported: One of `good_bad_metric_filter`, `good_total_ratio_threshold`, `metric_mean_in_range`, `metric_sum_in_range` must be set for `windows_based_sli`. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_metric_sum_in_range). + Structure is [documented below](#nested_windows_based_sli_metric_sum_in_range). -The `good_total_ratio_threshold` block supports: +The `good_total_ratio_threshold` block supports: * `threshold` - (Optional) @@ -521,15 +521,15 @@ The following arguments are supported: * `performance` - (Optional) Request-based SLI to evaluate to judge window quality. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold_performance). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold_performance). * `basic_sli_performance` - (Optional) Basic SLI to evaluate to judge window quality. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold_basic_sli_performance). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold_basic_sli_performance). -The `performance` block supports: +The `performance` block supports: * `good_total_ratio` - (Optional) @@ -538,7 +538,7 @@ The following arguments are supported: Must specify exactly two of good, bad, and total service filters. The relationship good_service + bad_service = total_service will be assumed. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold_performance_good_total_ratio). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold_performance_good_total_ratio). * `distribution_cut` - (Optional) @@ -547,10 +547,10 @@ The following arguments are supported: total count of all values aggregated in the Distribution. Defines a distribution TimeSeries filter and thresholds used for measuring good service and total service. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold_performance_distribution_cut). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold_performance_distribution_cut). -The `good_total_ratio` block supports: +The `good_total_ratio` block supports: * `good_service_filter` - (Optional) @@ -581,7 +581,7 @@ The following arguments are supported: Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE. -The `distribution_cut` block supports: +The `distribution_cut` block supports: * `distribution_filter` - (Required) @@ -597,10 +597,10 @@ The following arguments are supported: that range.min <= x <= range.max. inclusive of min and max. Open ranges can be defined by setting just one of min or max. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold_performance_distribution_cut_range). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold_performance_distribution_cut_range). -The `range` block supports: +The `range` block supports: * `min` - (Optional) @@ -612,7 +612,7 @@ The following arguments are supported: max value for the range (inclusive). If not given, will be set to 0 -The `basic_sli_performance` block supports: +The `basic_sli_performance` block supports: * `method` - (Optional) @@ -644,15 +644,15 @@ The following arguments are supported: * `latency` - (Optional) Parameters for a latency threshold SLI. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold_basic_sli_performance_latency). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold_basic_sli_performance_latency). * `availability` - (Optional) Availability based SLI, dervied from count of requests made to this service that return successfully. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_good_total_ratio_threshold_basic_sli_performance_availability). + Structure is [documented below](#nested_windows_based_sli_good_total_ratio_threshold_basic_sli_performance_availability). -The `latency` block supports: +The `latency` block supports: * `threshold` - (Required) @@ -660,13 +660,13 @@ The following arguments are supported: Good service is defined to be the count of requests made to this service that return in no more than threshold. -The `availability` block supports: +The `availability` block supports: * `enabled` - (Optional) Whether an availability SLI is enabled or not. Must be set to `true. Defaults to `true`. -The `metric_mean_in_range` block supports: +The `metric_mean_in_range` block supports: * `time_series` - (Required) @@ -686,10 +686,10 @@ The following arguments are supported: just one of min or max. Mean value `X` of `time_series` values should satisfy `range.min <= X <= range.max` for a good service. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_metric_mean_in_range_range). + Structure is [documented below](#nested_windows_based_sli_metric_mean_in_range_range). -The `range` block supports: +The `range` block supports: * `min` - (Optional) @@ -703,7 +703,7 @@ The following arguments are supported: will be set to "infinity", defining an open range ">= range.min" -The `metric_sum_in_range` block supports: +The `metric_sum_in_range` block supports: * `time_series` - (Required) @@ -723,10 +723,10 @@ The following arguments are supported: max. Open ranges can be defined by setting just one of min or max. Summed value `X` should satisfy `range.min <= X <= range.max` for a good window. - Structure is [documented below](#nested_service_level_indicator_windows_based_sli_metric_sum_in_range_range). + Structure is [documented below](#nested_windows_based_sli_metric_sum_in_range_range). -The `range` block supports: +The `range` block supports: * `min` - (Optional) diff --git a/website/docs/r/monitoring_uptime_check_config.html.markdown b/website/docs/r/monitoring_uptime_check_config.html.markdown index 4f956ca7b16..fd8dd12c0bf 100644 --- a/website/docs/r/monitoring_uptime_check_config.html.markdown +++ b/website/docs/r/monitoring_uptime_check_config.html.markdown @@ -387,10 +387,10 @@ The following arguments are supported: * `json_path_matcher` - (Optional) Information needed to perform a JSONPath content match. Used for `ContentMatcherOption::MATCHES_JSON_PATH` and `ContentMatcherOption::NOT_MATCHES_JSON_PATH`. - Structure is [documented below](#nested_content_matchers_content_matchers_json_path_matcher). + Structure is [documented below](#nested_content_matchers_json_path_matcher). -The `json_path_matcher` block supports: +The `json_path_matcher` block supports: * `json_path` - (Required) diff --git a/website/docs/r/netapp_host_group.html.markdown b/website/docs/r/netapp_host_group.html.markdown index 3115d59dff1..86f0e8532a8 100644 --- a/website/docs/r/netapp_host_group.html.markdown +++ b/website/docs/r/netapp_host_group.html.markdown @@ -54,6 +54,10 @@ resource "google_netapp_host_group" "test_host_group" { The following arguments are supported: +* `name` - + (Required) + The resource name of the Host Group. Needs to be unique per location. + * `type` - (Required) Type of the host group. @@ -74,10 +78,6 @@ The following arguments are supported: (Required) Location (region) of the Host Group. -* `name` - - (Required) - The resource name of the Host Group. Needs to be unique per location. - * `description` - (Optional) @@ -138,8 +138,8 @@ In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hash ```tf import { identity = { - location = "<-required value->" name = "<-required value->" + location = "<-required value->" project = "<-optional value->" } to = google_netapp_host_group.default diff --git a/website/docs/r/netapp_volume.html.markdown b/website/docs/r/netapp_volume.html.markdown index 8c81b758b51..925514c6543 100644 --- a/website/docs/r/netapp_volume.html.markdown +++ b/website/docs/r/netapp_volume.html.markdown @@ -174,7 +174,9 @@ The following arguments are supported: * `hybrid_replication_parameters` - (Optional) - The Hybrid Replication parameters for the volume. + [Volume migration](https://docs.cloud.google.com/netapp/volumes/docs/migrate/ontap/overview) and + [external replication](https://docs.cloud.google.com/netapp/volumes/docs/protect-data/replicate-ontap/overview) + are two types of Hybrid Replication. This parameter block specifies the parameters for a hybrid replication. Structure is [documented below](#nested_hybrid_replication_parameters). * `throughput_mibps` - @@ -411,23 +413,24 @@ Possible values: DEFAULT, FORCE. * `peer_volume_name` - (Optional) - Required. Name of the user's local source volume to be peered with the destination volume. + Required. Name of the ONTAP source volume to be replicated to NetApp Volumes destination volume. * `peer_cluster_name` - (Optional) - Required. Name of the user's local source cluster to be peered with the destination cluster. + Required. Name of the ONTAP source cluster to be peered with NetApp Volumes. * `peer_svm_name` - (Optional) - Required. Name of the user's local source vserver svm to be peered with the destination vserver svm. + Required. Name of the ONTAP source vserver SVM to be peered with NetApp Volumes. * `peer_ip_addresses` - (Optional) - Required. List of node ip addresses to be peered with. + Required. List of all intercluster LIF IP addresses of the ONTAP source cluster. * `cluster_location` - (Optional) - Optional. Name of source cluster location associated with the Hybrid replication. This is a free-form field for the display purpose only. + Optional. Name of source cluster location associated with the replication. This is a free-form field + for display purposes only. * `description` - (Optional) @@ -445,12 +448,15 @@ Possible values: DEFAULT, FORCE. * `hybrid_replication_type` - (Optional) - Optional. Type of the volume's hybrid replication. + Optional. Type of the hybrid replication. Use `MIGRATION` to create a volume migration + and `ONPREM_REPLICATION` to create an external replication. + Other values are read-only. `REVERSE_ONPREM_REPLICATION` is used to represent an external + replication which got reversed. Default is `MIGRATION`. Possible values are: `MIGRATION`, `CONTINUOUS_REPLICATION`, `ONPREM_REPLICATION`, `REVERSE_ONPREM_REPLICATION`. * `large_volume_constituent_count` - (Optional) - Optional. Constituent volume count for large volume. + Optional. If the source is a FlexGroup volume, this field needs to match the number of constituents in the FlexGroup. The `cache_parameters` block supports: diff --git a/website/docs/r/network_connectivity_destination.html.markdown b/website/docs/r/network_connectivity_destination.html.markdown new file mode 100644 index 00000000000..cd7f19deeab --- /dev/null +++ b/website/docs/r/network_connectivity_destination.html.markdown @@ -0,0 +1,235 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkconnectivity/Destination.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Network Connectivity" +description: |- + 'Manage Multicloud Data Transfer Destinations' +--- + +# google_network_connectivity_destination + +'Manage Multicloud Data Transfer Destinations' + + +To get more information about Destination, see: + +* [API documentation](https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.multicloudDataTransferConfigs.destinations) +* How-to Guides + * [QUICKSTART_TITLE](https://docs.cloud.google.com/data-transfer-essentials/docs/create-resources) + + +## Example Usage - Network Connectivity Destination Basic + + +```hcl +resource "google_network_connectivity_multicloud_data_transfer_config" "config" { + name = "basic-config" + location = "europe-west4" + description = "A basic multicloud data transfer config for the destination example" +} + +resource "google_network_connectivity_destination" "example" { + name = "basic-destination" + location = "europe-west4" + multicloud_data_transfer_config = google_network_connectivity_multicloud_data_transfer_config.config.name + description = "A basic destination" + labels = { + foo = "bar" + } + ip_prefix = "10.0.0.0/8" + endpoints { + asn = "14618" + csp = "AWS" + } +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `ip_prefix` - + (Required) + The IP prefix that represents your workload on another CSP. + +* `endpoints` - + (Required) + The list of DestinationEndpoint resources configured for the IP prefix. + Structure is [documented below](#nested_endpoints). + +* `multicloud_data_transfer_config` - + (Required) + The multicloud data transfer config of the destination. + +* `location` - + (Required) + The location of the destination. + +* `name` - + (Required) + The name of the destination. + + +* `labels` - + (Optional) + User-defined labels. + + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + +* `description` - + (Optional) + A description of this resource. + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + + +The `endpoints` block supports: + +* `asn` - + (Required) + The ASN of the remote IP prefix. + +* `csp` - + (Required) + The CSP of the remote IP prefix. + +* `state` - + (Output) + The state of the DestinationEndpoint resource. + +* `update_time` - + (Output) + Time when the DestinationEndpoint resource was updated. + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}` + +* `create_time` - + Time when the `Destination` resource was created. + +* `update_time` - + Time when the `Destination` resource was updated. + +* `etag` - + The etag is computed by the server, and might be sent with update and + delete requests so that the client has an up-to-date value before + proceeding. + +* `state_timeline` - + The timeline of the expected `Destination` states or the current rest + state. If a state change is expected, the value is `ADDING`, + `DELETING` or `SUSPENDING`, depending on the action specified. + Structure is [documented below](#nested_state_timeline). + +* `uid` - + The Google-generated unique ID for the `Destination` resource. + This value is unique across all `Destination` resources. + If a resource is deleted and another with the same name is + created, the new resource is assigned a different and unique ID. + +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + + +The `state_timeline` block contains: + +* `states` - + (Output) + The state and activation time details of the resource state. + Structure is [documented below](#nested_state_timeline_states). + + +The `states` block contains: + +* `state` - + (Output) + The state of the resource. + +* `effective_time` - + (Output) + Accompanies only the transient states, which include `ADDING`, + `DELETING`, and `SUSPENDING`, to denote the time until which the + transient state of the resource will be effective. For instance, if the + state is `ADDING`, this field shows the time when the resource state + transitions to `ACTIVE`. + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +Destination can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}` +* `{{project}}/{{location}}/{{multicloud_data_transfer_config}}/{{name}}` +* `{{location}}/{{multicloud_data_transfer_config}}/{{name}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import Destination using identity values. For example: + +```tf +import { + identity = { + multicloudDataTransferConfig = "<-required value->" + location = "<-required value->" + name = "<-required value->" + project = "<-optional value->" + } + to = google_network_connectivity_destination.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Destination using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}}" + to = google_network_connectivity_destination.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Destination can be imported using one of the formats above. For example: + +``` +$ terraform import google_network_connectivity_destination.default projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{multicloud_data_transfer_config}}/destinations/{{name}} +$ terraform import google_network_connectivity_destination.default {{project}}/{{location}}/{{multicloud_data_transfer_config}}/{{name}} +$ terraform import google_network_connectivity_destination.default {{location}}/{{multicloud_data_transfer_config}}/{{name}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). diff --git a/website/docs/r/network_connectivity_multicloud_data_transfer_config.html.markdown b/website/docs/r/network_connectivity_multicloud_data_transfer_config.html.markdown new file mode 100644 index 00000000000..917e3d7561a --- /dev/null +++ b/website/docs/r/network_connectivity_multicloud_data_transfer_config.html.markdown @@ -0,0 +1,206 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkconnectivity/MulticloudDataTransferConfig.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Network Connectivity" +description: |- + 'Manage Multicloud Data Transfer Configs' +--- + +# google_network_connectivity_multicloud_data_transfer_config + +'Manage Multicloud Data Transfer Configs' + + +To get more information about MulticloudDataTransferConfig, see: + +* [API documentation](https://docs.cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest/v1/projects.locations.multicloudDataTransferConfigs) +* How-to Guides + * [QUICKSTART_TITLE](https://docs.cloud.google.com/data-transfer-essentials/docs/create-resources) + + +## Example Usage - Network Connectivity Multicloud Data Transfer Config Basic + + +```hcl +resource "google_network_connectivity_multicloud_data_transfer_config" "example" { + name = "basic_config" + location = "europe-west1" + description = "A basic multicloud data transfer configs" + labels = { + foo = "bar" + } + services { + service_name = "big-query" + } + services { + service_name = "cloud-storage" + } +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `location` - + (Required) + The location of the multicloud data transfer config. + +* `name` - + (Required) + The name of the MulticloudDataTransferConfig resource. + + +* `labels` - + (Optional) + User-defined labels. + + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + +* `description` - + (Optional) + A description of this resource. + +* `services` - + (Optional) + Maps services to their current or planned states. Service names are keys, + and the associated values describe the state of the service. + Structure is [documented below](#nested_services). + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + + +The `services` block supports: + +* `service_name` - + (Required) + The name of the service, like "big-query" or "cloud-storage". + This corresponds to the map key in the API. + +* `states` - + (Output) + The state and activation time details for the service. + Structure is [documented below](#nested_services_states). + + +The `states` block contains: + +* `state` - + (Output) + The state of the resource. + +* `effective_time` - + (Output) + The time when the state becomes effective + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}` + +* `create_time` - + Time when the MulticloudDataTransferConfig resource was created. + +* `update_time` - + Time when the MulticloudDataTransferConfig resource was updated. + +* `etag` - + The etag is computed by the server, and might be sent with update and + delete requests so that the client has an up-to-date value before + proceeding. + +* `destinations_count` - + The number of Destination resources configured for the + MulticloudDataTransferConfig resource. + +* `destinations_active_count` - + The number of Destination resources in use with the + MulticloudDataTransferConfig resource. + +* `uid` - + The Google-generated unique ID for the MulticloudDataTransferConfig + resource. This value is unique across all MulticloudDataTransferConfig + resources. If a resource is deleted and another with the same name is + created, the new resource is assigned a different and unique ID. + +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +MulticloudDataTransferConfig can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}` +* `{{project}}/{{location}}/{{name}}` +* `{{location}}/{{name}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import MulticloudDataTransferConfig using identity values. For example: + +```tf +import { + identity = { + location = "<-required value->" + name = "<-required value->" + project = "<-optional value->" + } + to = google_network_connectivity_multicloud_data_transfer_config.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import MulticloudDataTransferConfig using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}}" + to = google_network_connectivity_multicloud_data_transfer_config.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), MulticloudDataTransferConfig can be imported using one of the formats above. For example: + +``` +$ terraform import google_network_connectivity_multicloud_data_transfer_config.default projects/{{project}}/locations/{{location}}/multicloudDataTransferConfigs/{{name}} +$ terraform import google_network_connectivity_multicloud_data_transfer_config.default {{project}}/{{location}}/{{name}} +$ terraform import google_network_connectivity_multicloud_data_transfer_config.default {{location}}/{{name}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). diff --git a/website/docs/r/network_connectivity_service_connection_policy.html.markdown b/website/docs/r/network_connectivity_service_connection_policy.html.markdown index d783b21bb00..d7775975e2e 100644 --- a/website/docs/r/network_connectivity_service_connection_policy.html.markdown +++ b/website/docs/r/network_connectivity_service_connection_policy.html.markdown @@ -191,7 +191,7 @@ In addition to the arguments listed above, the following computed attributes are * `error` - (Optional) The most recent error during operating this connection. - Structure is [documented below](#nested_psc_connections_psc_connections_error). + Structure is [documented below](#nested_psc_connections_error). * `gce_operation` - (Optional) @@ -208,10 +208,10 @@ In addition to the arguments listed above, the following computed attributes are * `error_info` - (Optional) The error info for the latest error during operating this connection. - Structure is [documented below](#nested_psc_connections_psc_connections_error_info). + Structure is [documented below](#nested_psc_connections_error_info). -The `error` block supports: +The `error` block supports: * `message` - (Optional) @@ -225,7 +225,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) A list of messages that carry the error details. -The `error_info` block supports: +The `error_info` block supports: * `reason` - (Optional) diff --git a/website/docs/r/network_security_authorization_policy.html.markdown b/website/docs/r/network_security_authorization_policy.html.markdown index e237259a8b3..3fe1196b224 100644 --- a/website/docs/r/network_security_authorization_policy.html.markdown +++ b/website/docs/r/network_security_authorization_policy.html.markdown @@ -137,16 +137,16 @@ The following arguments are supported: (Optional) List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ipBlocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source. - Structure is [documented below](#nested_rules_rules_sources). + Structure is [documented below](#nested_rules_sources). * `destinations` - (Optional) List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination. - Structure is [documented below](#nested_rules_rules_destinations). + Structure is [documented below](#nested_rules_destinations). -The `sources` block supports: +The `sources` block supports: * `principals` - (Optional) @@ -158,7 +158,7 @@ The following arguments are supported: List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted. -The `destinations` block supports: +The `destinations` block supports: * `hosts` - (Required) @@ -176,10 +176,10 @@ The following arguments are supported: (Optional) Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy. - Structure is [documented below](#nested_rules_rules_destinations_destinations_http_header_match). + Structure is [documented below](#nested_rules_destinations_http_header_match). -The `http_header_match` block supports: +The `http_header_match` block supports: * `header_name` - (Required) diff --git a/website/docs/r/network_security_authz_policy.html.markdown b/website/docs/r/network_security_authz_policy.html.markdown index 5b7d2687ff6..6121a973182 100644 --- a/website/docs/r/network_security_authz_policy.html.markdown +++ b/website/docs/r/network_security_authz_policy.html.markdown @@ -342,52 +342,52 @@ The following arguments are supported: * `from` - (Optional) Describes properties of one or more sources of a request. - Structure is [documented below](#nested_http_rules_http_rules_from). + Structure is [documented below](#nested_http_rules_from). * `to` - (Optional) Describes properties of one or more targets of a request - Structure is [documented below](#nested_http_rules_http_rules_to). + Structure is [documented below](#nested_http_rules_to). * `when` - (Optional) CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes. -The `from` block supports: +The `from` block supports: * `sources` - (Optional) Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 1 source. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match. - Structure is [documented below](#nested_http_rules_http_rules_from_sources). + Structure is [documented below](#nested_http_rules_from_sources). * `not_sources` - (Optional) Describes the negated properties of request sources. Matches requests from sources that do not match the criteria specified in this field. At least one of sources or notSources must be specified. Limited to 1 not_source. - Structure is [documented below](#nested_http_rules_http_rules_from_not_sources). + Structure is [documented below](#nested_http_rules_from_not_sources). -The `sources` block supports: +The `sources` block supports: * `ip_blocks` - (Optional) A list of IP addresses or IP address ranges to match against the source IP address of the request. Limited to 10 ipBlocks per Authorization Policy - Structure is [documented below](#nested_http_rules_http_rules_from_sources_sources_ip_blocks). + Structure is [documented below](#nested_http_rules_from_sources_ip_blocks). * `principals` - (Optional) A list of identities derived from the client's certificate. This field will not match on a request unless mutual TLS is enabled for the Forwarding rule or Gateway. Each identity is a string whose value is matched against the URI SAN, or DNS SAN or the subject field in the client's certificate. The match can be exact, prefix, suffix or a substring match. One of exact, prefix, suffix or contains must be specified. Limited to 5 principals. - Structure is [documented below](#nested_http_rules_http_rules_from_sources_sources_principals). + Structure is [documented below](#nested_http_rules_from_sources_principals). * `resources` - (Optional) A list of resources to match against the resource of the source VM of a request. Limited to 5 resources. - Structure is [documented below](#nested_http_rules_http_rules_from_sources_sources_resources). + Structure is [documented below](#nested_http_rules_from_sources_resources). -The `ip_blocks` block supports: +The `ip_blocks` block supports: * `prefix` - (Required) @@ -397,7 +397,7 @@ The following arguments are supported: (Required) The length of the address range. -The `principals` block supports: +The `principals` block supports: * `principal_selector` - (Optional) @@ -409,7 +409,7 @@ The following arguments are supported: (Optional) Required. A non-empty string whose value is matched against the principal value based on the principalSelector. Only exact match can be applied for CLIENT_CERT_URI_SAN, CLIENT_CERT_DNS_NAME_SAN, CLIENT_CERT_COMMON_NAME selectors. - Structure is [documented below](#nested_http_rules_http_rules_from_sources_sources_principals_principals_principal). + Structure is [documented below](#nested_http_rules_from_sources_principals_principal). * `ignore_case` - (Optional, Deprecated) @@ -450,7 +450,7 @@ The following arguments are supported: ~> **Warning:** `principals.contains` is deprecated and will be removed in a future major release. Use `principals.principal.contains` instead. -The `principal` block supports: +The `principal` block supports: * `ignore_case` - (Optional) @@ -480,27 +480,27 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `resources` block supports: +The `resources` block supports: * `tag_value_id_set` - (Optional) A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. - Structure is [documented below](#nested_http_rules_http_rules_from_sources_sources_resources_resources_tag_value_id_set). + Structure is [documented below](#nested_http_rules_from_sources_resources_tag_value_id_set). * `iam_service_account` - (Optional) An IAM service account to match against the source service account of the VM sending the request. - Structure is [documented below](#nested_http_rules_http_rules_from_sources_sources_resources_resources_iam_service_account). + Structure is [documented below](#nested_http_rules_from_sources_resources_iam_service_account). -The `tag_value_id_set` block supports: +The `tag_value_id_set` block supports: * `ids` - (Optional) A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. The match follows AND semantics which means all the ids must match. Limited to 5 matches. -The `iam_service_account` block supports: +The `iam_service_account` block supports: * `ignore_case` - (Optional) @@ -530,27 +530,27 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `not_sources` block supports: +The `not_sources` block supports: * `ip_blocks` - (Optional) A list of IP addresses or IP address ranges to match against the source IP address of the request. Limited to 10 ipBlocks per Authorization Policy - Structure is [documented below](#nested_http_rules_http_rules_from_not_sources_not_sources_ip_blocks). + Structure is [documented below](#nested_http_rules_from_not_sources_ip_blocks). * `principals` - (Optional) A list of identities derived from the client's certificate. This field will not match on a request unless mutual TLS is enabled for the Forwarding rule or Gateway. Each identity is a string whose value is matched against the URI SAN, or DNS SAN or the subject field in the client's certificate. The match can be exact, prefix, suffix or a substring match. One of exact, prefix, suffix or contains must be specified. Limited to 5 principals. - Structure is [documented below](#nested_http_rules_http_rules_from_not_sources_not_sources_principals). + Structure is [documented below](#nested_http_rules_from_not_sources_principals). * `resources` - (Optional) A list of resources to match against the resource of the source VM of a request. Limited to 5 resources. - Structure is [documented below](#nested_http_rules_http_rules_from_not_sources_not_sources_resources). + Structure is [documented below](#nested_http_rules_from_not_sources_resources). -The `ip_blocks` block supports: +The `ip_blocks` block supports: * `prefix` - (Required) @@ -560,7 +560,7 @@ The following arguments are supported: (Required) The length of the address range. -The `principals` block supports: +The `principals` block supports: * `principal_selector` - (Optional) @@ -572,7 +572,7 @@ The following arguments are supported: (Optional) Required. A non-empty string whose value is matched against the principal value based on the principalSelector. Only exact match can be applied for CLIENT_CERT_URI_SAN, CLIENT_CERT_DNS_NAME_SAN, CLIENT_CERT_COMMON_NAME selectors. - Structure is [documented below](#nested_http_rules_http_rules_from_not_sources_not_sources_principals_principals_principal). + Structure is [documented below](#nested_http_rules_from_not_sources_principals_principal). * `ignore_case` - (Optional, Deprecated) @@ -613,7 +613,7 @@ The following arguments are supported: ~> **Warning:** `principals.contains` is deprecated and will be removed in a future major release. Use `principals.principal.contains` instead. -The `principal` block supports: +The `principal` block supports: * `ignore_case` - (Optional) @@ -643,27 +643,27 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `resources` block supports: +The `resources` block supports: * `tag_value_id_set` - (Optional) A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. - Structure is [documented below](#nested_http_rules_http_rules_from_not_sources_not_sources_resources_resources_tag_value_id_set). + Structure is [documented below](#nested_http_rules_from_not_sources_resources_tag_value_id_set). * `iam_service_account` - (Optional) An IAM service account to match against the source service account of the VM sending the request. - Structure is [documented below](#nested_http_rules_http_rules_from_not_sources_not_sources_resources_resources_iam_service_account). + Structure is [documented below](#nested_http_rules_from_not_sources_resources_iam_service_account). -The `tag_value_id_set` block supports: +The `tag_value_id_set` block supports: * `ids` - (Optional) A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. The match follows AND semantics which means all the ids must match. Limited to 5 matches. -The `iam_service_account` block supports: +The `iam_service_account` block supports: * `ignore_case` - (Optional) @@ -693,53 +693,53 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `to` block supports: +The `to` block supports: * `operations` - (Optional) Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 1 operation. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches. - Structure is [documented below](#nested_http_rules_http_rules_to_operations). + Structure is [documented below](#nested_http_rules_to_operations). * `not_operations` - (Optional) Describes the negated properties of the targets of a request. Matches requests for operations that do not match the criteria specified in this field. At least one of operations or notOperations must be specified. Limited to 1 not_operation. - Structure is [documented below](#nested_http_rules_http_rules_to_not_operations). + Structure is [documented below](#nested_http_rules_to_not_operations). -The `operations` block supports: +The `operations` block supports: * `header_set` - (Optional) A list of headers to match against in http header. - Structure is [documented below](#nested_http_rules_http_rules_to_operations_operations_header_set). + Structure is [documented below](#nested_http_rules_to_operations_header_set). * `hosts` - (Optional) A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 matches. - Structure is [documented below](#nested_http_rules_http_rules_to_operations_operations_hosts). + Structure is [documented below](#nested_http_rules_to_operations_hosts). * `paths` - (Optional) A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 matches. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method. - Structure is [documented below](#nested_http_rules_http_rules_to_operations_operations_paths). + Structure is [documented below](#nested_http_rules_to_operations_paths). * `methods` - (Optional) A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive. -The `header_set` block supports: +The `header_set` block supports: * `headers` - (Optional) A list of headers to match against in http header. The match can be one of exact, prefix, suffix, or contains (substring match). The match follows AND semantics which means all the headers must match. Matches are always case sensitive unless the ignoreCase is set. Limited to 10 matches. - Structure is [documented below](#nested_http_rules_http_rules_to_operations_operations_header_set_headers). + Structure is [documented below](#nested_http_rules_to_operations_header_set_headers). -The `headers` block supports: +The `headers` block supports: * `name` - (Optional) @@ -748,10 +748,10 @@ The following arguments are supported: * `value` - (Optional) Specifies how the header match will be performed. - Structure is [documented below](#nested_http_rules_http_rules_to_operations_operations_header_set_headers_headers_value). + Structure is [documented below](#nested_http_rules_to_operations_header_set_headers_value). -The `value` block supports: +The `value` block supports: * `ignore_case` - (Optional) @@ -781,7 +781,7 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `hosts` block supports: +The `hosts` block supports: * `ignore_case` - (Optional) @@ -811,7 +811,7 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `paths` block supports: +The `paths` block supports: * `ignore_case` - (Optional) @@ -841,40 +841,40 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `not_operations` block supports: +The `not_operations` block supports: * `header_set` - (Optional) A list of headers to match against in http header. - Structure is [documented below](#nested_http_rules_http_rules_to_not_operations_not_operations_header_set). + Structure is [documented below](#nested_http_rules_to_not_operations_header_set). * `hosts` - (Optional) A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 matches. - Structure is [documented below](#nested_http_rules_http_rules_to_not_operations_not_operations_hosts). + Structure is [documented below](#nested_http_rules_to_not_operations_hosts). * `paths` - (Optional) A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 matches. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method. - Structure is [documented below](#nested_http_rules_http_rules_to_not_operations_not_operations_paths). + Structure is [documented below](#nested_http_rules_to_not_operations_paths). * `methods` - (Optional) A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive. -The `header_set` block supports: +The `header_set` block supports: * `headers` - (Optional) A list of headers to match against in http header. The match can be one of exact, prefix, suffix, or contains (substring match). The match follows AND semantics which means all the headers must match. Matches are always case sensitive unless the ignoreCase is set. Limited to 10 matches. - Structure is [documented below](#nested_http_rules_http_rules_to_not_operations_not_operations_header_set_headers). + Structure is [documented below](#nested_http_rules_to_not_operations_header_set_headers). -The `headers` block supports: +The `headers` block supports: * `name` - (Optional) @@ -883,10 +883,10 @@ The following arguments are supported: * `value` - (Optional) Specifies how the header match will be performed. - Structure is [documented below](#nested_http_rules_http_rules_to_not_operations_not_operations_header_set_headers_headers_value). + Structure is [documented below](#nested_http_rules_to_not_operations_header_set_headers_value). -The `value` block supports: +The `value` block supports: * `ignore_case` - (Optional) @@ -916,7 +916,7 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `hosts` block supports: +The `hosts` block supports: * `ignore_case` - (Optional) @@ -946,7 +946,7 @@ The following arguments are supported: Examples: * abc matches the value xyz.abc.def -The `paths` block supports: +The `paths` block supports: * `ignore_case` - (Optional) diff --git a/website/docs/r/network_security_client_tls_policy.html.markdown b/website/docs/r/network_security_client_tls_policy.html.markdown index 33db87f55d8..565f4e23644 100644 --- a/website/docs/r/network_security_client_tls_policy.html.markdown +++ b/website/docs/r/network_security_client_tls_policy.html.markdown @@ -150,21 +150,21 @@ The following arguments are supported: * `grpc_endpoint` - (Optional) gRPC specific configuration to access the gRPC server to obtain the cert and private key. - Structure is [documented below](#nested_server_validation_ca_server_validation_ca_grpc_endpoint). + Structure is [documented below](#nested_server_validation_ca_grpc_endpoint). * `certificate_provider_instance` - (Optional) The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information. - Structure is [documented below](#nested_server_validation_ca_server_validation_ca_certificate_provider_instance). + Structure is [documented below](#nested_server_validation_ca_certificate_provider_instance). -The `grpc_endpoint` block supports: +The `grpc_endpoint` block supports: * `target_uri` - (Required) The target URI of the gRPC endpoint. Only UDS path is supported, and should start with "unix:". -The `certificate_provider_instance` block supports: +The `certificate_provider_instance` block supports: * `plugin_instance` - (Required) diff --git a/website/docs/r/network_security_dns_threat_detector.html.markdown b/website/docs/r/network_security_dns_threat_detector.html.markdown index 0bfbfe3b700..de4253a04d8 100644 --- a/website/docs/r/network_security_dns_threat_detector.html.markdown +++ b/website/docs/r/network_security_dns_threat_detector.html.markdown @@ -23,8 +23,6 @@ description: |- DNS Armor is a fully-managed service that provides DNS-layer security for your Google Cloud workloads. -~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. -See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. To get more information about DnsThreatDetector, see: @@ -37,15 +35,11 @@ To get more information about DnsThreatDetector, see: ```hcl resource "google_compute_network" "foobar" { - provider = google-beta - name = "my-vpc" auto_create_subnetworks = false } resource "google_network_security_dns_threat_detector" "default" { - provider = google-beta - name = "my-threat-detector" location = "global" threat_detector_provider = "INFOBLOX" diff --git a/website/docs/r/network_security_mirroring_endpoint_group.html.markdown b/website/docs/r/network_security_mirroring_endpoint_group.html.markdown index da543a1f5c2..7d2ad676c75 100644 --- a/website/docs/r/network_security_mirroring_endpoint_group.html.markdown +++ b/website/docs/r/network_security_mirroring_endpoint_group.html.markdown @@ -242,10 +242,10 @@ In addition to the arguments listed above, the following computed attributes are * `locations` - (Output) The list of locations where the deployment group is present. - Structure is [documented below](#nested_connected_deployment_groups_connected_deployment_groups_locations). + Structure is [documented below](#nested_connected_deployment_groups_locations). -The `locations` block contains: +The `locations` block contains: * `location` - (Output) diff --git a/website/docs/r/network_security_server_tls_policy.html.markdown b/website/docs/r/network_security_server_tls_policy.html.markdown index a26967e40bc..12eee48e849 100644 --- a/website/docs/r/network_security_server_tls_policy.html.markdown +++ b/website/docs/r/network_security_server_tls_policy.html.markdown @@ -254,22 +254,22 @@ The following arguments are supported: * `grpc_endpoint` - (Optional) gRPC specific configuration to access the gRPC server to obtain the cert and private key. - Structure is [documented below](#nested_mtls_policy_client_validation_ca_client_validation_ca_grpc_endpoint). + Structure is [documented below](#nested_mtls_policy_client_validation_ca_grpc_endpoint). * `certificate_provider_instance` - (Optional) Optional if policy is to be used with Traffic Director. For external HTTPS load balancer must be empty. Defines a mechanism to provision server identity (public and private keys). Cannot be combined with allowOpen as a permissive mode that allows both plain text and TLS is not supported. - Structure is [documented below](#nested_mtls_policy_client_validation_ca_client_validation_ca_certificate_provider_instance). + Structure is [documented below](#nested_mtls_policy_client_validation_ca_certificate_provider_instance). -The `grpc_endpoint` block supports: +The `grpc_endpoint` block supports: * `target_uri` - (Required) The target URI of the gRPC endpoint. Only UDS path is supported, and should start with "unix:". -The `certificate_provider_instance` block supports: +The `certificate_provider_instance` block supports: * `plugin_instance` - (Required) diff --git a/website/docs/r/network_services_authz_extension.html.markdown b/website/docs/r/network_services_authz_extension.html.markdown index 4ebc61597b3..b01edcc2b00 100644 --- a/website/docs/r/network_services_authz_extension.html.markdown +++ b/website/docs/r/network_services_authz_extension.html.markdown @@ -56,6 +56,37 @@ resource "google_network_services_authz_extension" "default" { forward_headers = ["Authorization"] } ``` +## Example Usage - Network Services Authz Extension Basic With Auth Grpc + + +```hcl +resource "google_compute_region_backend_service" "default" { + provider = google-beta + name = "authz-service-grpc" + project = "my-project-name" + region = "us-west1" + + protocol = "HTTP2" + load_balancing_scheme = "INTERNAL_MANAGED" + port_name = "grpc" +} + +resource "google_network_services_authz_extension" "default" { + provider = google-beta + name = "my-authz-ext-with-grpc" + project = "my-project-name" + location = "us-west1" + + description = "my description" + load_balancing_scheme = "INTERNAL_MANAGED" + wire_format = "EXT_AUTHZ_GRPC" + authority = "ext11.com" + service = google_compute_region_backend_service.default.self_link + timeout = "0.1s" + fail_open = false + forward_headers = ["Authorization"] +} +``` ## Argument Reference @@ -120,8 +151,22 @@ The following arguments are supported: * `wire_format` - (Optional) - The format of communication supported by the callout extension. Will be set to EXT_PROC_GRPC by the backend if no value is set. - Possible values are: `WIRE_FORMAT_UNSPECIFIED`, `EXT_PROC_GRPC`. + Specifies the communication protocol used by the callout extension + to communicate with its backend service. + Supported values: + - WIRE_FORMAT_UNSPECIFIED: + No wire format is explicitly specified. The backend automatically + defaults this value to EXT_PROC_GRPC. + - EXT_PROC_GRPC: + Uses Envoy's External Processing (ext_proc) gRPC API over a single + gRPC stream. The backend service must support HTTP/2 or H2C. + All supported events for a client request are sent over the same + gRPC stream. This is the default wire format. + - EXT_AUTHZ_GRPC: + Uses Envoy's external authorization (ext_authz) gRPC API. + The backend service must support HTTP/2 or H2C. + This option is only supported for regional AuthzExtension resources. + Possible values are: `WIRE_FORMAT_UNSPECIFIED`, `EXT_PROC_GRPC`, `EXT_AUTHZ_GRPC`. * `project` - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used. diff --git a/website/docs/r/network_services_edge_cache_keyset.html.markdown b/website/docs/r/network_services_edge_cache_keyset.html.markdown index 76218c1416e..619d80606cd 100644 --- a/website/docs/r/network_services_edge_cache_keyset.html.markdown +++ b/website/docs/r/network_services_edge_cache_keyset.html.markdown @@ -31,7 +31,7 @@ To get more information about EdgeCacheKeyset, see: * [Create keysets](https://cloud.google.com/media-cdn/docs/create-keyset) ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `public_key.public_key.value`. +values will be stored in the raw state as plain text: `public_key.value`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
diff --git a/website/docs/r/network_services_edge_cache_service.html.markdown b/website/docs/r/network_services_edge_cache_service.html.markdown index 76b6bc106c1..9e528ed0bc5 100644 --- a/website/docs/r/network_services_edge_cache_service.html.markdown +++ b/website/docs/r/network_services_edge_cache_service.html.markdown @@ -524,10 +524,10 @@ The following arguments are supported: * `route_rule` - (Required) The routeRules to match against. routeRules support advanced routing behaviour, and can match on paths, headers and query parameters, as well as status codes and HTTP methods. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule). + Structure is [documented below](#nested_routing_path_matcher_route_rule). -The `route_rule` block supports: +The `route_rule` block supports: * `priority` - (Required) @@ -544,23 +544,23 @@ The following arguments are supported: (Required) The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule must match for the request to match the rule. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_match_rule). + Structure is [documented below](#nested_routing_path_matcher_route_rule_match_rule). * `route_methods` - (Optional) Allow overriding the set of methods that are allowed for this route. When not set, Media CDN allows only "GET", "HEAD", and "OPTIONS". - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_methods). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_methods). * `header_action` - (Optional) The header actions, including adding & removing headers, for requests that match this route. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_header_action). + Structure is [documented below](#nested_routing_path_matcher_route_rule_header_action). * `route_action` - (Optional) In response to a matching path, the routeAction performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected origin. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_action). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_action). * `origin` - (Optional) @@ -570,10 +570,10 @@ The following arguments are supported: * `url_redirect` - (Optional) The URL redirect configuration for requests that match this route. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_url_redirect). + Structure is [documented below](#nested_routing_path_matcher_route_rule_url_redirect). -The `match_rule` block supports: +The `match_rule` block supports: * `ignore_case` - (Optional) @@ -582,12 +582,12 @@ The following arguments are supported: * `header_match` - (Optional) Specifies a list of header match criteria, all of which must match corresponding headers in the request. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_match_rule_match_rule_header_match). + Structure is [documented below](#nested_routing_path_matcher_route_rule_match_rule_header_match). * `query_parameter_match` - (Optional) Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_match_rule_match_rule_query_parameter_match). + Structure is [documented below](#nested_routing_path_matcher_route_rule_match_rule_query_parameter_match). * `prefix_match` - (Optional) @@ -609,7 +609,7 @@ The following arguments are supported: For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. -The `header_match` block supports: +The `header_match` block supports: * `header_name` - (Required) @@ -636,7 +636,7 @@ The following arguments are supported: If set to false (default), the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. -The `query_parameter_match` block supports: +The `query_parameter_match` block supports: * `name` - (Required) @@ -650,38 +650,38 @@ The following arguments are supported: (Optional) The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. -The `route_methods` block supports: +The `route_methods` block supports: * `allowed_methods` - (Optional) The non-empty set of HTTP methods that are allowed for this route. Any combination of "GET", "HEAD", "OPTIONS", "PUT", "POST", "DELETE", and "PATCH". -The `header_action` block supports: +The `header_action` block supports: * `request_header_to_add` - (Optional) Describes a header to add. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_header_action_request_header_to_add). + Structure is [documented below](#nested_routing_path_matcher_route_rule_header_action_request_header_to_add). * `response_header_to_add` - (Optional) Headers to add to the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_header_action_response_header_to_add). + Structure is [documented below](#nested_routing_path_matcher_route_rule_header_action_response_header_to_add). * `request_header_to_remove` - (Optional) A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_header_action_request_header_to_remove). + Structure is [documented below](#nested_routing_path_matcher_route_rule_header_action_request_header_to_remove). * `response_header_to_remove` - (Optional) A list of header names for headers that need to be removed from the request prior to forwarding the request to the origin. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_header_action_response_header_to_remove). + Structure is [documented below](#nested_routing_path_matcher_route_rule_header_action_response_header_to_remove). -The `request_header_to_add` block supports: +The `request_header_to_add` block supports: * `header_name` - (Required) @@ -695,7 +695,7 @@ The following arguments are supported: (Optional) Whether to replace all existing headers with the same name. -The `response_header_to_add` block supports: +The `response_header_to_add` block supports: * `header_name` - (Required) @@ -709,35 +709,35 @@ The following arguments are supported: (Optional) Whether to replace all existing headers with the same name. -The `request_header_to_remove` block supports: +The `request_header_to_remove` block supports: * `header_name` - (Required) The name of the header to remove. -The `response_header_to_remove` block supports: +The `response_header_to_remove` block supports: * `header_name` - (Required) Headers to remove from the response prior to sending it back to the client. Response headers are only sent to the client, and do not have an effect on the cache serving the response. -The `route_action` block supports: +The `route_action` block supports: * `cdn_policy` - (Optional) The policy to use for defining caching and signed request behaviour for requests that match this route. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_action_cdn_policy). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_action_cdn_policy). * `url_rewrite` - (Optional) The URL rewrite configuration for requests that match this route. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_action_url_rewrite). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_action_url_rewrite). * `cors_policy` - (Optional) CORSPolicy defines Cross-Origin-Resource-Sharing configuration, including which CORS response headers will be set. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_action_cors_policy). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_action_cors_policy). * `compression_mode` - (Optional) @@ -746,7 +746,7 @@ The following arguments are supported: Possible values are: `DISABLED`, `AUTOMATIC`. -The `cdn_policy` block supports: +The `cdn_policy` block supports: * `cache_mode` - (Optional) @@ -792,7 +792,7 @@ The following arguments are supported: * `cache_key_policy` - (Optional) Defines the request parameters that contribute to the cache key. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_action_cdn_policy_cache_key_policy). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_action_cdn_policy_cache_key_policy). * `negative_caching` - (Optional) @@ -825,13 +825,13 @@ The following arguments are supported: (Optional) Additional options for signed tokens. signedTokenOptions may only be specified when signedRequestMode is REQUIRE_TOKENS. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_action_cdn_policy_signed_token_options). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_action_cdn_policy_signed_token_options). * `add_signatures` - (Optional) Enable signature generation or propagation on this route. This field may only be specified when signedRequestMode is set to REQUIRE_TOKENS. - Structure is [documented below](#nested_routing_path_matcher_path_matcher_route_rule_route_rule_route_action_cdn_policy_add_signatures). + Structure is [documented below](#nested_routing_path_matcher_route_rule_route_action_cdn_policy_add_signatures). * `signed_request_maximum_expiration_ttl` - (Optional) @@ -842,7 +842,7 @@ The following arguments are supported: By default, signedRequestMaximumExpirationTtl is not set and the expiration time of a signed request may be arbitrarily far into future. -The `cache_key_policy` block supports: +The `cache_key_policy` block supports: * `include_protocol` - (Optional) @@ -890,7 +890,7 @@ The following arguments are supported: Note that specifying several cookies, and/or cookies that have a large range of values (e.g., per-user) will dramatically impact the cache hit rate, and may result in a higher eviction rate and reduced performance. You may specify up to three cookie names. -The `signed_token_options` block supports: +The `signed_token_options` block supports: * `token_query_parameter` - (Optional) @@ -905,7 +905,7 @@ The following arguments are supported: You may specify up to 3 signature algorithms to use. Each value may be one of: `ED25519`, `HMAC_SHA_256`, `HMAC_SHA1`. -The `add_signatures` block supports: +The `add_signatures` block supports: * `actions` - (Required) @@ -953,7 +953,7 @@ The following arguments are supported: You may specify up to 6 parameters to copy. A given parameter is be copied only if the parameter exists in the verified token. Parameter names are matched exactly as specified. The order of the parameters does not matter. Duplicates are not allowed. This field may only be specified when the GENERATE_COOKIE or GENERATE_TOKEN_HLS_COOKIELESS actions are specified. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `path_prefix_rewrite` - (Optional) @@ -977,7 +977,7 @@ The following arguments are supported: Only one of pathPrefixRewrite and pathTemplateRewrite may be specified. -The `cors_policy` block supports: +The `cors_policy` block supports: * `max_age` - (Required) @@ -1013,7 +1013,7 @@ The following arguments are supported: (Optional) If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. -The `url_redirect` block supports: +The `url_redirect` block supports: * `host_redirect` - (Optional) diff --git a/website/docs/r/network_services_grpc_route.html.markdown b/website/docs/r/network_services_grpc_route.html.markdown index 2ca833d1f1d..56fdd097b14 100644 --- a/website/docs/r/network_services_grpc_route.html.markdown +++ b/website/docs/r/network_services_grpc_route.html.markdown @@ -231,28 +231,28 @@ The following arguments are supported: * `matches` - (Optional) Matches define conditions used for matching the rule against incoming gRPC requests. - Structure is [documented below](#nested_rules_rules_matches). + Structure is [documented below](#nested_rules_matches). * `action` - (Optional) Required. A detailed rule defining how to route traffic. - Structure is [documented below](#nested_rules_rules_action). + Structure is [documented below](#nested_rules_action). -The `matches` block supports: +The `matches` block supports: * `headers` - (Optional) Specifies a list of HTTP request headers to match against. - Structure is [documented below](#nested_rules_rules_matches_matches_headers). + Structure is [documented below](#nested_rules_matches_headers). * `method` - (Optional) A gRPC method to match against. If this field is empty or omitted, will match all methods. - Structure is [documented below](#nested_rules_rules_matches_matches_method). + Structure is [documented below](#nested_rules_matches_method). -The `headers` block supports: +The `headers` block supports: * `key` - (Required) @@ -268,7 +268,7 @@ The following arguments are supported: Default value is `EXACT`. Possible values are: `TYPE_UNSPECIFIED`, `EXACT`, `REGULAR_EXPRESSION`. -The `method` block supports: +The `method` block supports: * `grpc_service` - (Required) @@ -282,17 +282,17 @@ The following arguments are supported: (Optional) Specifies that matches are case sensitive. The default value is true. -The `action` block supports: +The `action` block supports: * `destinations` - (Optional) The destination to which traffic should be forwarded. - Structure is [documented below](#nested_rules_rules_action_destinations). + Structure is [documented below](#nested_rules_action_destinations). * `fault_injection_policy` - (Optional) The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. - Structure is [documented below](#nested_rules_rules_action_fault_injection_policy). + Structure is [documented below](#nested_rules_action_fault_injection_policy). * `timeout` - (Optional) @@ -301,10 +301,10 @@ The following arguments are supported: * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_rules_rules_action_retry_policy). + Structure is [documented below](#nested_rules_action_retry_policy). -The `destinations` block supports: +The `destinations` block supports: * `service_name` - (Optional) @@ -314,20 +314,20 @@ The following arguments are supported: (Optional) Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `delay` - (Optional) Specification of how client requests are delayed as part of fault injection before being sent to a destination. - Structure is [documented below](#nested_rules_rules_action_fault_injection_policy_delay). + Structure is [documented below](#nested_rules_action_fault_injection_policy_delay). * `abort` - (Optional) Specification of how client requests are aborted as part of fault injection before being sent to a destination. - Structure is [documented below](#nested_rules_rules_action_fault_injection_policy_abort). + Structure is [documented below](#nested_rules_action_fault_injection_policy_abort). -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Optional) @@ -337,7 +337,7 @@ The following arguments are supported: (Optional) The percentage of traffic on which delay will be injected. -The `abort` block supports: +The `abort` block supports: * `http_status` - (Optional) @@ -347,7 +347,7 @@ The following arguments are supported: (Optional) The percentage of traffic which will be aborted. -The `retry_policy` block supports: +The `retry_policy` block supports: * `retry_conditions` - (Optional) diff --git a/website/docs/r/network_services_http_route.html.markdown b/website/docs/r/network_services_http_route.html.markdown index 927088e76ac..92c40bfdccd 100644 --- a/website/docs/r/network_services_http_route.html.markdown +++ b/website/docs/r/network_services_http_route.html.markdown @@ -307,15 +307,15 @@ The following arguments are supported: A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list. - Structure is [documented below](#nested_rules_rules_matches). + Structure is [documented below](#nested_rules_matches). * `action` - (Optional) The detailed rule defining how to route matched traffic. - Structure is [documented below](#nested_rules_rules_action). + Structure is [documented below](#nested_rules_action). -The `matches` block supports: +The `matches` block supports: * `ignore_case` - (Optional) @@ -336,15 +336,15 @@ The following arguments are supported: * `query_parameters` - (Optional) Specifies a list of query parameters to match against. - Structure is [documented below](#nested_rules_rules_matches_matches_query_parameters). + Structure is [documented below](#nested_rules_matches_query_parameters). * `headers` - (Optional) Specifies a list of HTTP request headers to match against. - Structure is [documented below](#nested_rules_rules_matches_matches_headers). + Structure is [documented below](#nested_rules_matches_headers). -The `query_parameters` block supports: +The `query_parameters` block supports: * `query_parameter` - (Optional) @@ -362,7 +362,7 @@ The following arguments are supported: (Optional) Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not. -The `headers` block supports: +The `headers` block supports: * `header` - (Optional) @@ -395,10 +395,10 @@ The following arguments are supported: * `range_match` - (Optional) If specified, the rule will match if the request header value is within the range. - Structure is [documented below](#nested_rules_rules_matches_matches_headers_headers_range_match). + Structure is [documented below](#nested_rules_matches_headers_range_match). -The `range_match` block supports: +The `range_match` block supports: * `start` - (Required) @@ -408,37 +408,37 @@ The following arguments are supported: (Required) End of the range (exclusive). -The `action` block supports: +The `action` block supports: * `destinations` - (Optional) The destination to which traffic should be forwarded. - Structure is [documented below](#nested_rules_rules_action_destinations). + Structure is [documented below](#nested_rules_action_destinations). * `redirect` - (Optional) If set, the request is directed as configured by this field. - Structure is [documented below](#nested_rules_rules_action_redirect). + Structure is [documented below](#nested_rules_action_redirect). * `fault_injection_policy` - (Optional) The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. - Structure is [documented below](#nested_rules_rules_action_fault_injection_policy). + Structure is [documented below](#nested_rules_action_fault_injection_policy). * `request_header_modifier` - (Optional) The specification for modifying the headers of a matching request prior to delivery of the request to the destination. - Structure is [documented below](#nested_rules_rules_action_request_header_modifier). + Structure is [documented below](#nested_rules_action_request_header_modifier). * `response_header_modifier` - (Optional) The specification for modifying the headers of a response prior to sending the response back to the client. - Structure is [documented below](#nested_rules_rules_action_response_header_modifier). + Structure is [documented below](#nested_rules_action_response_header_modifier). * `url_rewrite` - (Optional) The specification for rewrite URL before forwarding requests to the destination. - Structure is [documented below](#nested_rules_rules_action_url_rewrite). + Structure is [documented below](#nested_rules_action_url_rewrite). * `timeout` - (Optional) @@ -447,20 +447,20 @@ The following arguments are supported: * `retry_policy` - (Optional) Specifies the retry policy associated with this route. - Structure is [documented below](#nested_rules_rules_action_retry_policy). + Structure is [documented below](#nested_rules_action_retry_policy). * `request_mirror_policy` - (Optional) Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. - Structure is [documented below](#nested_rules_rules_action_request_mirror_policy). + Structure is [documented below](#nested_rules_action_request_mirror_policy). * `cors_policy` - (Optional) The specification for allowing client side cross-origin requests. - Structure is [documented below](#nested_rules_rules_action_cors_policy). + Structure is [documented below](#nested_rules_action_cors_policy). -The `destinations` block supports: +The `destinations` block supports: * `service_name` - (Optional) @@ -473,7 +473,7 @@ The following arguments are supported: If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them. -The `redirect` block supports: +The `redirect` block supports: * `host_redirect` - (Optional) @@ -503,20 +503,20 @@ The following arguments are supported: (Optional) The port that will be used in the redirected request instead of the one that was supplied in the request. -The `fault_injection_policy` block supports: +The `fault_injection_policy` block supports: * `delay` - (Optional) Specification of how client requests are delayed as part of fault injection before being sent to a destination. - Structure is [documented below](#nested_rules_rules_action_fault_injection_policy_delay). + Structure is [documented below](#nested_rules_action_fault_injection_policy_delay). * `abort` - (Optional) Specification of how client requests are aborted as part of fault injection before being sent to a destination. - Structure is [documented below](#nested_rules_rules_action_fault_injection_policy_abort). + Structure is [documented below](#nested_rules_action_fault_injection_policy_abort). -The `delay` block supports: +The `delay` block supports: * `fixed_delay` - (Optional) @@ -526,7 +526,7 @@ The following arguments are supported: (Optional) The percentage of traffic on which delay will be injected. -The `abort` block supports: +The `abort` block supports: * `http_status` - (Optional) @@ -536,7 +536,7 @@ The following arguments are supported: (Optional) The percentage of traffic which will be aborted. -The `request_header_modifier` block supports: +The `request_header_modifier` block supports: * `set` - (Optional) @@ -550,7 +550,7 @@ The following arguments are supported: (Optional) Remove headers (matching by header names) specified in the list. -The `response_header_modifier` block supports: +The `response_header_modifier` block supports: * `set` - (Optional) @@ -564,7 +564,7 @@ The following arguments are supported: (Optional) Remove headers (matching by header names) specified in the list. -The `url_rewrite` block supports: +The `url_rewrite` block supports: * `path_prefix_rewrite` - (Optional) @@ -574,7 +574,7 @@ The following arguments are supported: (Optional) Prior to forwarding the request to the selected destination, the requests host header is replaced by this value. -The `retry_policy` block supports: +The `retry_policy` block supports: * `retry_conditions` - (Optional) @@ -588,15 +588,15 @@ The following arguments are supported: (Optional) Specifies a non-zero timeout per retry attempt. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". -The `request_mirror_policy` block supports: +The `request_mirror_policy` block supports: * `destination` - (Optional) The destination the requests will be mirrored to. - Structure is [documented below](#nested_rules_rules_action_request_mirror_policy_destination). + Structure is [documented below](#nested_rules_action_request_mirror_policy_destination). -The `destination` block supports: +The `destination` block supports: * `service_name` - (Optional) @@ -609,7 +609,7 @@ The following arguments are supported: If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them. -The `cors_policy` block supports: +The `cors_policy` block supports: * `allow_origins` - (Optional) diff --git a/website/docs/r/network_services_lb_edge_extension.html.markdown b/website/docs/r/network_services_lb_edge_extension.html.markdown index fdc53d7dfaf..4627a884b80 100644 --- a/website/docs/r/network_services_lb_edge_extension.html.markdown +++ b/website/docs/r/network_services_lb_edge_extension.html.markdown @@ -193,23 +193,23 @@ The following arguments are supported: * `match_condition` - (Required) Conditions under which this chain is invoked for a request. - Structure is [documented below](#nested_extension_chains_extension_chains_match_condition). + Structure is [documented below](#nested_extension_chains_match_condition). * `extensions` - (Required) A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for LbTrafficExtension resource. LbRouteExtension chains are limited to 1 extension per extension chain. - Structure is [documented below](#nested_extension_chains_extension_chains_extensions). + Structure is [documented below](#nested_extension_chains_extensions). -The `match_condition` block supports: +The `match_condition` block supports: * `cel_expression` - (Required) A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. -The `extensions` block supports: +The `extensions` block supports: * `name` - (Required) diff --git a/website/docs/r/network_services_lb_route_extension.html.markdown b/website/docs/r/network_services_lb_route_extension.html.markdown index 4a903664c31..0dcf368197d 100644 --- a/website/docs/r/network_services_lb_route_extension.html.markdown +++ b/website/docs/r/network_services_lb_route_extension.html.markdown @@ -26,7 +26,7 @@ LbRouteExtension is a resource that lets you control where traffic is routed to To get more information about LbRouteExtension, see: -* [API documentation](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.lbRouteExtensions) +* [API documentation](https://cloud.google.com/service-extensions/docs/reference/rest/v1/projects.locations.lbRouteExtensions) * How-to Guides * [Configure a route extension](https://cloud.google.com/service-extensions/docs/configure-callout#configure_a_route_extension) @@ -251,6 +251,371 @@ resource "google_network_services_lb_route_extension" "default" { fail_open = false forward_headers = ["custom-header"] + + supported_events = ["REQUEST_HEADERS", "REQUEST_BODY", "REQUEST_TRAILERS"] + request_body_send_mode = "BODY_SEND_MODE_FULL_DUPLEX_STREAMED" + metadata = { + "key" = "value" + } + } + } + + labels = { + foo = "bar" + } +} + +# test instance +resource "google_compute_instance" "vm_test" { + name = "l7-ilb-test-vm" + zone = "us-west1-b" + machine_type = "e2-small" + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + } + + boot_disk { + initialize_params { + image = "debian-cloud/debian-11" + } + } +} + +# Route Extension Backend Instance +resource "google_compute_instance" "callouts_instance" { + name = "l7-ilb-callouts-ins" + zone = "us-west1-a" + machine_type = "e2-small" + + labels = { + "container-vm" = "cos-stable-109-17800-147-54" + } + + tags = ["allow-ssh","load-balanced-backend"] + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + + access_config { + # add external ip to fetch packages + } + } + + boot_disk { + auto_delete = true + + initialize_params { + type = "pd-standard" + size = 10 + image = "https://www.googleapis.com/compute/v1/projects/cos-cloud/global/images/cos-stable-109-17800-147-54" + } + } + + # Initialize an Envoy's Ext Proc gRPC API based on a docker container + metadata = { + startup-script = <<-EOF1 + #! /bin/bash + apt-get update + apt-get install apache2 -y + a2ensite default-ssl + a2enmod ssl + echo "Page served from second backend service" | tee /var/www/html/index.html + systemctl restart apache2' + EOF1 + } + + lifecycle { + create_before_destroy = true + } + + deletion_protection = false + + depends_on = [ + google_compute_instance.vm_test + ] +} + +// callouts instance group +resource "google_compute_instance_group" "callouts_instance_group" { + name = "l7-ilb-callouts-ins-group" + description = "Terraform test instance group" + zone = "us-west1-a" + + instances = [ + google_compute_instance.callouts_instance.id, + ] + + named_port { + name = "http" + port = "80" + } + + named_port { + name = "grpc" + port = "443" + } +} + +# callout health check +resource "google_compute_region_health_check" "callouts_health_check" { + name = "l7-ilb-callouts-hc" + region = "us-west1" + + http_health_check { + port = 80 + } + + depends_on = [ + google_compute_region_health_check.default + ] +} + +# callout backend service +resource "google_compute_region_backend_service" "callouts_backend" { + name = "l7-ilb-callouts-backend" + region = "us-west1" + protocol = "HTTP2" + load_balancing_scheme = "INTERNAL_MANAGED" + timeout_sec = 10 + port_name = "grpc" + health_checks = [google_compute_region_health_check.callouts_health_check.id] + + backend { + group = google_compute_instance_group.callouts_instance_group.id + balancing_mode = "UTILIZATION" + capacity_scaler = 1.0 + } + + depends_on = [ + google_compute_region_backend_service.default + ] +} +``` + +## Example Usage - Network Services Lb Route Extension Observability + + +```hcl +# Internal HTTP load balancer with a managed instance group backend +# VPC network +resource "google_compute_network" "ilb_network" { + name = "l7-ilb-network" + auto_create_subnetworks = false +} + +# proxy-only subnet +resource "google_compute_subnetwork" "proxy_subnet" { + name = "l7-ilb-proxy-subnet" + ip_cidr_range = "10.0.0.0/24" + region = "us-west1" + purpose = "REGIONAL_MANAGED_PROXY" + role = "ACTIVE" + network = google_compute_network.ilb_network.id +} + +# backend subnet +resource "google_compute_subnetwork" "ilb_subnet" { + name = "l7-ilb-subnet" + ip_cidr_range = "10.0.1.0/24" + region = "us-west1" + network = google_compute_network.ilb_network.id + + depends_on = [ + google_compute_subnetwork.proxy_subnet + ] +} + +# forwarding rule +resource "google_compute_forwarding_rule" "default" { + name = "l7-ilb-forwarding-rule" + region = "us-west1" + ip_protocol = "TCP" + load_balancing_scheme = "INTERNAL_MANAGED" + port_range = "80" + target = google_compute_region_target_http_proxy.default.id + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + network_tier = "PREMIUM" + + depends_on = [ + google_compute_subnetwork.proxy_subnet + ] +} + +# HTTP target proxy +resource "google_compute_region_target_http_proxy" "default" { + name = "l7-ilb-target-http-proxy" + region = "us-west1" + url_map = google_compute_region_url_map.default.id +} + +# URL map +resource "google_compute_region_url_map" "default" { + name = "tf-test-l7-ilb-regional-url-map%{random_suffix}" + region = "us-west1" + default_service = google_compute_region_backend_service.default.id + + host_rule { + hosts = ["service-extensions.com"] + path_matcher = "callouts" + } + + path_matcher { + name = "callouts" + default_service = google_compute_region_backend_service.callouts_backend.id + } +} + +# backend service +resource "google_compute_region_backend_service" "default" { + name = "l7-ilb-backend-subnet" + region = "us-west1" + protocol = "HTTP" + load_balancing_scheme = "INTERNAL_MANAGED" + timeout_sec = 10 + health_checks = [google_compute_region_health_check.default.id] + + backend { + group = google_compute_region_instance_group_manager.mig.instance_group + balancing_mode = "UTILIZATION" + capacity_scaler = 1.0 + } +} + +# instance template +resource "google_compute_instance_template" "instance_template" { + name = "l7-ilb-mig-template" + machine_type = "e2-small" + tags = ["http-server"] + + network_interface { + network = google_compute_network.ilb_network.id + subnetwork = google_compute_subnetwork.ilb_subnet.id + + access_config { + # add external ip to fetch packages + } + } + + disk { + source_image = "debian-cloud/debian-12" + auto_delete = true + boot = true + } + + # install nginx and serve a simple web page + metadata = { + startup-script = <<-EOF1 + #! /bin/bash + set -euo pipefail + + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y nginx-light jq + + NAME=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/hostname") + IP=$(curl -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip") + METADATA=$(curl -f -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/attributes/?recursive=True" | jq 'del(.["startup-script"])') + + cat < /var/www/html/index.html +
+      Name: $NAME
+      IP: $IP
+      Metadata: $METADATA
+      
+ EOF + EOF1 + } + + lifecycle { + create_before_destroy = true + } +} + +# health check +resource "google_compute_region_health_check" "default" { + name = "l7-ilb-hc" + region = "us-west1" + + http_health_check { + port_specification = "USE_SERVING_PORT" + } +} + +# MIG +resource "google_compute_region_instance_group_manager" "mig" { + name = "l7-ilb-mig1" + region = "us-west1" + + base_instance_name = "vm" + target_size = 2 + + version { + instance_template = google_compute_instance_template.instance_template.id + name = "primary" + } +} + +# allow all access from IAP and health check ranges +resource "google_compute_firewall" "fw_iap" { + name = "l7-ilb-fw-allow-iap-hc" + direction = "INGRESS" + network = google_compute_network.ilb_network.id + source_ranges = ["130.211.0.0/22", "35.191.0.0/16", "35.235.240.0/20"] + + allow { + protocol = "tcp" + } +} + +# allow http from proxy subnet to backends +resource "google_compute_firewall" "fw_ilb_to_backends" { + name = "l7-ilb-fw-allow-ilb-to-backends" + direction = "INGRESS" + network = google_compute_network.ilb_network.id + source_ranges = ["10.0.0.0/24"] + target_tags = ["http-server"] + + allow { + protocol = "tcp" + ports = ["80", "443", "8080"] + } + + depends_on = [ + google_compute_firewall.fw_iap + ] +} + +resource "google_network_services_lb_route_extension" "default" { + name = "l7-ilb-route-ext" + description = "my route extension" + location = "us-west1" + load_balancing_scheme = "INTERNAL_MANAGED" + forwarding_rules = [google_compute_forwarding_rule.default.self_link] + + extension_chains { + name = "chain1" + + match_condition { + cel_expression = "request.path.startsWith('/extensions')" + } + + extensions { + name = "ext11" + authority = "ext11.com" + service = google_compute_region_backend_service.callouts_backend.self_link + timeout = "0.1s" + fail_open = false + + supported_events = ["REQUEST_HEADERS"] + observability_mode = true } } @@ -405,6 +770,7 @@ The following arguments are supported: Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource. + Further information can be found at https://cloud.google.com/service-extensions/docs/reference/rest/v1/ExtensionChain Structure is [documented below](#nested_extension_chains). * `load_balancing_scheme` - @@ -450,23 +816,24 @@ The following arguments are supported: * `match_condition` - (Required) Conditions under which this chain is invoked for a request. - Structure is [documented below](#nested_extension_chains_extension_chains_match_condition). + Structure is [documented below](#nested_extension_chains_match_condition). * `extensions` - (Required) A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for LbTrafficExtension resource. LbRouteExtension chains are limited to 1 extension per extension chain. - Structure is [documented below](#nested_extension_chains_extension_chains_extensions). + Further documentation can be found at https://cloud.google.com/service-extensions/docs/reference/rest/v1/ExtensionChain#Extension + Structure is [documented below](#nested_extension_chains_extensions). -The `match_condition` block supports: +The `match_condition` block supports: * `cel_expression` - (Required) A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. -The `extensions` block supports: +The `extensions` block supports: * `name` - (Required) @@ -504,6 +871,39 @@ The following arguments are supported: List of the HTTP headers to forward to the extension (from the client or backend). If omitted, all headers are sent. Each element is a string indicating the header name. +* `supported_events` - + (Optional) + A set of events during request or response processing for which this extension is called. + This field is optional for the LbRouteExtension resource. If unspecified, `REQUEST_HEADERS` event is assumed as supported. + Possible values: `REQUEST_HEADERS`, `REQUEST_BODY`, `REQUEST_TRAILERS`. + +* `metadata` - + (Optional) + The metadata provided here is included as part of the `metadata_context` (of type `google.protobuf.Struct`) + in the `ProcessingRequest` message sent to the extension server. + The metadata is available under the namespace `com.google.lb_route_extension...`. + The following variables are supported in the metadata: `{forwarding_rule_id}` - substituted with the forwarding rule's fully qualified resource name. + This field must not be set for plugin extensions. Setting it results in a validation error. + +* `request_body_send_mode` - + (Optional) + Configures the send mode for request body processing. + The field can only be set if `supported_events` includes `REQUEST_BODY`. + If `supported_events` includes `REQUEST_BODY`, but `request_body_send_mode` is unset, the default value `STREAMED` is used. + When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. + This field can be set only when the `service` field of the extension points to a `BackendService`. + Only `FULL_DUPLEX_STREAMED` mode is supported for `LbRouteExtension` resources. + Possible values are: `BODY_SEND_MODE_UNSPECIFIED`, `BODY_SEND_MODE_STREAMED`, `BODY_SEND_MODE_FULL_DUPLEX_STREAMED`. + +* `observability_mode` - + (Optional) + When set to `TRUE`, enables `observability_mode` on the `ext_proc` filter. + This makes `ext_proc` calls asynchronous. Envoy doesn't check for the response from `ext_proc` calls. + For more information about the filter, see: https://www.envoyproxy.io/docs/envoy/v1.32.3/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto + This field is helpful when you want to try out the extension in async log-only mode. + Supported by regional `LbTrafficExtension` and `LbRouteExtension` resources. + Only `STREAMED` (default) body processing mode is supported. + ## Attributes Reference In addition to the arguments listed above, the following computed attributes are exported: diff --git a/website/docs/r/network_services_lb_traffic_extension.html.markdown b/website/docs/r/network_services_lb_traffic_extension.html.markdown index c5bf5900b92..8045f2ae88f 100644 --- a/website/docs/r/network_services_lb_traffic_extension.html.markdown +++ b/website/docs/r/network_services_lb_traffic_extension.html.markdown @@ -441,7 +441,7 @@ The following arguments are supported: * `match_condition` - (Required) Conditions under which this chain is invoked for a request. - Structure is [documented below](#nested_extension_chains_extension_chains_match_condition). + Structure is [documented below](#nested_extension_chains_match_condition). * `extensions` - (Required) @@ -449,16 +449,16 @@ The following arguments are supported: At least one extension is required. Up to 3 extensions can be defined for each extension chain for LbTrafficExtension resource. LbRouteExtension chains are limited to 1 extension per extension chain. Further documentation to be found at https://cloud.google.com/service-extensions/docs/reference/rest/v1/ExtensionChain#Extension - Structure is [documented below](#nested_extension_chains_extension_chains_extensions). + Structure is [documented below](#nested_extension_chains_extensions). -The `match_condition` block supports: +The `match_condition` block supports: * `cel_expression` - (Required) A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. -The `extensions` block supports: +The `extensions` block supports: * `name` - (Required) diff --git a/website/docs/r/network_services_multicast_consumer_association.html.markdown b/website/docs/r/network_services_multicast_consumer_association.html.markdown index 6a9365389b6..ecd6a5de4e2 100644 --- a/website/docs/r/network_services_multicast_consumer_association.html.markdown +++ b/website/docs/r/network_services_multicast_consumer_association.html.markdown @@ -24,6 +24,11 @@ description: |- Create a multicast consumer association in the specified location of the current project. +To get more information about MulticastConsumerAssociation, see: + +* [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastConsumerAssociations) +* How-to Guides + * [Create Multicast Consumer Association](https://docs.cloud.google.com/vpc/docs/multicast/enable-consumer-network#add-consumer)
@@ -70,7 +75,7 @@ The following arguments are supported: * `multicast_domain_activation` - (Required) The resource name of the multicast domain activation that is in the - same zone as this multicast producer association. + same zone as this multicast consumer association. Use the following format: // `projects/*/locations/*/multicastDomainActivations/*`. diff --git a/website/docs/r/network_services_multicast_domain.html.markdown b/website/docs/r/network_services_multicast_domain.html.markdown index 3d163c74c34..90b41fa9b04 100644 --- a/website/docs/r/network_services_multicast_domain.html.markdown +++ b/website/docs/r/network_services_multicast_domain.html.markdown @@ -24,6 +24,11 @@ description: |- Create a multicast domain in the current project. +To get more information about MulticastDomain, see: + +* [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastDomains) +* How-to Guides + * [Create Multicast Domain](https://docs.cloud.google.com/vpc/docs/multicast/create-domains#create-domain)
@@ -128,7 +133,7 @@ In addition to the arguments listed above, the following computed attributes are * `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/multicastDomains/{{multicast_domain_id}}` * `create_time` - - [Output only] The timestamp when the multicast domain was created. + The timestamp when the multicast domain was created. * `name` - Identifier. The resource name of the multicast domain. @@ -136,13 +141,17 @@ In addition to the arguments listed above, the following computed attributes are `projects/*/locations/global/multicastDomains/*` * `unique_id` - - [Output only] The Google-generated UUID for the resource. This value is + The Google-generated UUID for the resource. This value is unique across all multicast domain resources. If a domain is deleted and another with the same name is created, the new domain is assigned a different unique_id. +* `state` - + The multicast resource's state. + Structure is [documented below](#nested_state). + * `update_time` - - [Output only] The timestamp when the multicast domain was most recently + The timestamp when the multicast domain was most recently updated. * `terraform_labels` - @@ -153,6 +162,20 @@ In addition to the arguments listed above, the following computed attributes are All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. +The `state` block contains: + +* `state` - + (Output) + The state of the multicast resource. + Possible values: + CREATING + ACTIVE + DELETING + DELETE_FAILED + UPDATING + UPDATE_FAILED + INACTIVE + ## Timeouts This resource provides the following diff --git a/website/docs/r/network_services_multicast_domain_group.html.markdown b/website/docs/r/network_services_multicast_domain_group.html.markdown index 1f432f03c75..c93b7800670 100644 --- a/website/docs/r/network_services_multicast_domain_group.html.markdown +++ b/website/docs/r/network_services_multicast_domain_group.html.markdown @@ -24,6 +24,11 @@ description: |- Create a multicast domain group in the current project. +To get more information about MulticastDomainGroup, see: + +* [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastDomainGroups) +* How-to Guides + * [Create Multicast Domain Group](https://docs.cloud.google.com/vpc/docs/multicast/create-domains#create-domain-group)
@@ -106,10 +111,10 @@ In addition to the arguments listed above, the following computed attributes are * `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/multicastDomainGroups/{{multicast_domain_group_id}}` * `create_time` - - [Output only] The timestamp when the multicast domain group was created. + The timestamp when the multicast domain group was created. * `multicast_domains` - - [Output only] Multicast domains associated with the group. + Multicast domains associated with the group. There can be at most 2 multicast domains in a group. * `name` - @@ -122,13 +127,13 @@ In addition to the arguments listed above, the following computed attributes are Structure is [documented below](#nested_state). * `unique_id` - - [Output only] The Google-generated UUID for the resource. This value is + The Google-generated UUID for the resource. This value is unique across all multicast domain group resources. If a domain is deleted and another with the same name is created, the new domain is assigned a different unique_id. * `update_time` - - [Output only] The timestamp when the multicast domain group was most + The timestamp when the multicast domain group was most recently updated. * `terraform_labels` - @@ -142,7 +147,7 @@ In addition to the arguments listed above, the following computed attributes are The `state` block contains: * `state` - - (Optional) + (Output) The state of the multicast resource. Possible values: CREATING diff --git a/website/docs/r/network_services_multicast_group_consumer_activation.html.markdown b/website/docs/r/network_services_multicast_group_consumer_activation.html.markdown new file mode 100644 index 00000000000..c6890a89fa9 --- /dev/null +++ b/website/docs/r/network_services_multicast_group_consumer_activation.html.markdown @@ -0,0 +1,258 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkservices/MulticastGroupConsumerActivation.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Network Services" +description: |- + Create a multicast group consumer activation in the specified location of the current project. +--- + +# google_network_services_multicast_group_consumer_activation + +Create a multicast group consumer activation in the specified location of the current project. + + +To get more information about MulticastGroupConsumerActivation, see: + +* [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastGroupConsumerActivations) +* How-to Guides + * [Create Multicast Group Consumer Activation](https://docs.cloud.google.com/vpc/docs/multicast/enable-consumer-network#activate-consumer) + + +## Example Usage - Network Services Multicast Group Consumer Activation Basic + + +```hcl +resource "google_compute_network" "network" { + name = "test-network-mgca" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "test-domain-mgca" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "test-domain-activation-mgca" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_consumer_association" "consumer_association" { + multicast_consumer_association_id = "test-consumer-association-mgca" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "test-internal-range-mgca" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "test-group-range-mgca" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "test-mgra-mgca" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_consumer_activation" mgca_test { + multicast_group_consumer_activation_id = "test-mgca-mgca" + location = "us-central1-b" + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_consumer_association = google_network_services_multicast_consumer_association.consumer_association.id +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `multicast_consumer_association` - + (Required) + The resource name of the multicast consumer association that is in the + same zone as this multicast group consumer activation. + Use the following format: + `projects/*/locations/*/multicastConsumerAssociations/*`. + +* `multicast_group_range_activation` - + (Required) + The resource name of the multicast group range activation created by the + admin in the same zone as this multicast group consumer activation. Use the + following format: + // `projects/*/locations/*/multicastGroupRangeActivations/*`. + +* `location` - + (Required) + Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + +* `multicast_group_consumer_activation_id` - + (Required) + A unique name for the multicast group consumer activation. + The name is restricted to letters, numbers, and hyphen, with the first + character a letter, and the last a letter or a number. The name must not + exceed 48 characters. + + +* `description` - + (Optional) + An optional text description of the multicast group consumer activation. + +* `labels` - + (Optional) + Labels as key-value pairs + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + +* `log_config` - + (Optional) + The logging configuration. + Structure is [documented below](#nested_log_config). + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + + +The `log_config` block supports: + +* `enabled` - + (Optional) + Whether to enable logging or not. + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}` + +* `create_time` - + The timestamp when the multicast group consumer activation + was created. + +* `name` - + Identifier. The resource name of the multicast group consumer activation. + Use the following format: + `projects/*/locations/*/multicastGroupConsumerActivations/*`. + +* `state` - + The multicast resource's state. + Structure is [documented below](#nested_state). + +* `unique_id` - + The Google-generated UUID for the resource. This value is + unique across all multicast group consumer activation resources. If a group + consumer activation is deleted and another with the same name is created, + the new group consumer activation is assigned a different unique_id. + +* `update_time` - + The timestamp when the multicast group consumer activation + was most recently updated. + +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + + +The `state` block contains: + +* `state` - + (Output) + The state of the multicast resource. + Possible values: + CREATING + ACTIVE + DELETING + DELETE_FAILED + UPDATING + UPDATE_FAILED + INACTIVE + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +MulticastGroupConsumerActivation can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}` +* `{{project}}/{{location}}/{{multicast_group_consumer_activation_id}}` +* `{{location}}/{{multicast_group_consumer_activation_id}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import MulticastGroupConsumerActivation using identity values. For example: + +```tf +import { + identity = { + location = "<-required value->" + multicastGroupConsumerActivationId = "<-required value->" + project = "<-optional value->" + } + to = google_network_services_multicast_group_consumer_activation.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import MulticastGroupConsumerActivation using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}}" + to = google_network_services_multicast_group_consumer_activation.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), MulticastGroupConsumerActivation can be imported using one of the formats above. For example: + +``` +$ terraform import google_network_services_multicast_group_consumer_activation.default projects/{{project}}/locations/{{location}}/multicastGroupConsumerActivations/{{multicast_group_consumer_activation_id}} +$ terraform import google_network_services_multicast_group_consumer_activation.default {{project}}/{{location}}/{{multicast_group_consumer_activation_id}} +$ terraform import google_network_services_multicast_group_consumer_activation.default {{location}}/{{multicast_group_consumer_activation_id}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). diff --git a/website/docs/r/network_services_multicast_group_producer_activation.html.markdown b/website/docs/r/network_services_multicast_group_producer_activation.html.markdown new file mode 100644 index 00000000000..3ebe47923b2 --- /dev/null +++ b/website/docs/r/network_services_multicast_group_producer_activation.html.markdown @@ -0,0 +1,246 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This code is generated by Magic Modules using the following: +# +# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkservices/MulticastGroupProducerActivation.yaml +# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl +# +# DO NOT EDIT this file directly. Any changes made to this file will be +# overwritten during the next generation cycle. +# +# ---------------------------------------------------------------------------- +subcategory: "Network Services" +description: |- + Create a multicast group producer activation in the specified location of the current project. +--- + +# google_network_services_multicast_group_producer_activation + +Create a multicast group producer activation in the specified location of the current project. + + +To get more information about MulticastGroupProducerActivation, see: + +* [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastGroupProducerActivations) +* How-to Guides + * [Create Multicast Group Producer Activation](https://docs.cloud.google.com/vpc/docs/multicast/enable-producer-network#activate-producer) + + +## Example Usage - Network Services Multicast Group Producer Activation Basic + + +```hcl +resource "google_compute_network" "network" { + name = "test-network-mgpa" + auto_create_subnetworks = false +} + +resource "google_network_services_multicast_domain" "multicast_domain" { + multicast_domain_id = "test-domain-mgpa" + location = "global" + admin_network = google_compute_network.network.id + connection_config { connection_type="SAME_VPC"} + depends_on = [google_compute_network.network] +} + +resource "google_network_services_multicast_domain_activation" "multicast_domain_activation" { + multicast_domain_activation_id = "test-domain-activation-mgpa" + location = "us-central1-b" + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_producer_association" "producer_association" { + multicast_producer_association_id = "test-producer-association-mgpa" + location = "us-central1-b" + network = google_compute_network.network.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id + depends_on = [google_compute_network.network] +} + + +resource "google_network_connectivity_internal_range" "internal_range" { + name = "test-internal-range-mgpa" + network = google_compute_network.network.self_link + usage = "FOR_VPC" + peering = "FOR_SELF" + ip_cidr_range = "224.2.0.2/32" +} + +resource "google_network_services_multicast_group_range" "group_range" { + multicast_group_range_id = "test-group-range-mgpa" + location = "global" + reserved_internal_range = google_network_connectivity_internal_range.internal_range.id + multicast_domain = google_network_services_multicast_domain.multicast_domain.id +} + +resource "google_network_services_multicast_group_range_activation" "group_range_activation" { + multicast_group_range_activation_id = "test-mgra-mgpa" + location = "us-central1-b" + multicast_group_range = google_network_services_multicast_group_range.group_range.id + multicast_domain_activation = google_network_services_multicast_domain_activation.multicast_domain_activation.id +} + +resource "google_network_services_multicast_group_producer_activation" mgpa_test { + multicast_group_producer_activation_id = "test-mgpa-mgpa" + location = "us-central1-b" + multicast_group_range_activation = google_network_services_multicast_group_range_activation.group_range_activation.id + multicast_producer_association = google_network_services_multicast_producer_association.producer_association.id +} +``` + +## Argument Reference + +The following arguments are supported: + + +* `multicast_group_range_activation` - + (Required) + The resource name of the multicast group range activationcreated by the + admin in the same zone as this multicast group producer activation. Use the + following format: + // `projects/*/locations/*/multicastGroupRangeActivations/*`. + +* `multicast_producer_association` - + (Required) + The resource name of the multicast producer association that is in the + same zone as this multicast group producer activation. + Use the following format: + `projects/*/locations/*/multicastProducerAssociations/*`. + +* `location` - + (Required) + Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. + +* `multicast_group_producer_activation_id` - + (Required) + A unique name for the multicast group producer activation. + The name is restricted to letters, numbers, and hyphen, with the first + character a letter, and the last a letter or a number. The name must not + exceed 48 characters. + + +* `description` - + (Optional) + An optional text description of the multicast group producer activation. + +* `labels` - + (Optional) + Labels as key-value pairs + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}` + +* `create_time` - + The timestamp when the multicast group producer activation was created. + +* `name` - + Identifier. The resource name of the multicast group producer activation. + Use the following format: + `projects/*/locations/*/multicastGroupProducerActivations/*`. + +* `state` - + The multicast resource's state. + Structure is [documented below](#nested_state). + +* `unique_id` - + The Google-generated UUID for the resource. This value is + unique across all multicast group producer activation resources. If a group + producer activation is deleted and another with the same name is created, + the new group producer activation is assigned a different unique_id. + +* `update_time` - + The timestamp when the multicast group producer activation + was most recently updated. + +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + + +The `state` block contains: + +* `state` - + (Output) + The state of the multicast resource. + Possible values: + CREATING + ACTIVE + DELETING + DELETE_FAILED + UPDATING + UPDATE_FAILED + INACTIVE + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +MulticastGroupProducerActivation can be imported using any of these accepted formats: + +* `projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}` +* `{{project}}/{{location}}/{{multicast_group_producer_activation_id}}` +* `{{location}}/{{multicast_group_producer_activation_id}}` + +In Terraform v1.12.0 and later, use an [`identity` block](https://developer.hashicorp.com/terraform/language/resources/identities) to import MulticastGroupProducerActivation using identity values. For example: + +```tf +import { + identity = { + location = "<-required value->" + multicastGroupProducerActivationId = "<-required value->" + project = "<-optional value->" + } + to = google_network_services_multicast_group_producer_activation.default +} +``` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import MulticastGroupProducerActivation using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}}" + to = google_network_services_multicast_group_producer_activation.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), MulticastGroupProducerActivation can be imported using one of the formats above. For example: + +``` +$ terraform import google_network_services_multicast_group_producer_activation.default projects/{{project}}/locations/{{location}}/multicastGroupProducerActivations/{{multicast_group_producer_activation_id}} +$ terraform import google_network_services_multicast_group_producer_activation.default {{project}}/{{location}}/{{multicast_group_producer_activation_id}} +$ terraform import google_network_services_multicast_group_producer_activation.default {{location}}/{{multicast_group_producer_activation_id}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). diff --git a/website/docs/r/network_services_multicast_group_range.html.markdown b/website/docs/r/network_services_multicast_group_range.html.markdown index 33e608a06da..c0558c2bdeb 100644 --- a/website/docs/r/network_services_multicast_group_range.html.markdown +++ b/website/docs/r/network_services_multicast_group_range.html.markdown @@ -24,6 +24,11 @@ description: |- Create a multicast group range in the current project. +To get more information about MulticastGroupRange, see: + +* [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastGroupRanges) +* How-to Guides + * [Create Multicast Group Range](https://docs.cloud.google.com/vpc/docs/multicast/create-group-ranges#create_a_group_range)
diff --git a/website/docs/r/network_services_multicast_group_range_activation.html.markdown b/website/docs/r/network_services_multicast_group_range_activation.html.markdown index 33a949ef40b..ed1a8e38ed7 100644 --- a/website/docs/r/network_services_multicast_group_range_activation.html.markdown +++ b/website/docs/r/network_services_multicast_group_range_activation.html.markdown @@ -28,7 +28,7 @@ To get more information about MulticastGroupRangeActivation, see: * [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastGroupRangeActivations) * How-to Guides - * [Create Multicast Producer Association](https://docs.cloud.google.com/vpc/docs/multicast/create-group-ranges#activate_the_group_range) + * [Create Multicast Group Range Activation](https://docs.cloud.google.com/vpc/docs/multicast/create-group-ranges#activate_the_group_range)
diff --git a/website/docs/r/network_services_tcp_route.html.markdown b/website/docs/r/network_services_tcp_route.html.markdown index 8666b445fb5..80219d654b2 100644 --- a/website/docs/r/network_services_tcp_route.html.markdown +++ b/website/docs/r/network_services_tcp_route.html.markdown @@ -271,15 +271,15 @@ The following arguments are supported: (Optional) RouteMatch defines the predicate used to match requests to a given action. Multiple match types are "OR"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic. - Structure is [documented below](#nested_rules_rules_matches). + Structure is [documented below](#nested_rules_matches). * `action` - (Required) A detailed rule defining how to route traffic. - Structure is [documented below](#nested_rules_rules_action). + Structure is [documented below](#nested_rules_action). -The `matches` block supports: +The `matches` block supports: * `address` - (Required) @@ -290,12 +290,12 @@ The following arguments are supported: (Required) Specifies the destination port to match against. -The `action` block supports: +The `action` block supports: * `destinations` - (Optional) The destination services to which traffic should be forwarded. At least one destination service is required. - Structure is [documented below](#nested_rules_rules_action_destinations). + Structure is [documented below](#nested_rules_action_destinations). * `original_destination` - (Optional) @@ -307,7 +307,7 @@ The following arguments are supported: A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". -The `destinations` block supports: +The `destinations` block supports: * `service_name` - (Optional) diff --git a/website/docs/r/network_services_tls_route.html.markdown b/website/docs/r/network_services_tls_route.html.markdown index 29031ad55f8..71267679617 100644 --- a/website/docs/r/network_services_tls_route.html.markdown +++ b/website/docs/r/network_services_tls_route.html.markdown @@ -209,15 +209,15 @@ The following arguments are supported: * `matches` - (Required) Matches define the predicate used to match requests to a given action. - Structure is [documented below](#nested_rules_rules_matches). + Structure is [documented below](#nested_rules_matches). * `action` - (Required) Required. A detailed rule defining how to route traffic. - Structure is [documented below](#nested_rules_rules_action). + Structure is [documented below](#nested_rules_action). -The `matches` block supports: +The `matches` block supports: * `sni_host` - (Optional) @@ -228,15 +228,15 @@ The following arguments are supported: (Optional) ALPN (Application-Layer Protocol Negotiation) to match against. Examples: "http/1.1", "h2". At least one of sniHost and alpn is required. Up to 5 alpns across all matches can be set. -The `action` block supports: +The `action` block supports: * `destinations` - (Optional) The destination to which traffic should be forwarded. - Structure is [documented below](#nested_rules_rules_action_destinations). + Structure is [documented below](#nested_rules_action_destinations). -The `destinations` block supports: +The `destinations` block supports: * `service_name` - (Optional) diff --git a/website/docs/r/oracle_database_autonomous_database.html.markdown b/website/docs/r/oracle_database_autonomous_database.html.markdown index f6353ebe761..071eaa9c62b 100644 --- a/website/docs/r/oracle_database_autonomous_database.html.markdown +++ b/website/docs/r/oracle_database_autonomous_database.html.markdown @@ -832,17 +832,17 @@ The following arguments are supported: Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. - Structure is [documented below](#nested_properties_scheduled_operation_details_scheduled_operation_details_start_time). + Structure is [documented below](#nested_properties_scheduled_operation_details_start_time). * `stop_time` - (Output) Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. - Structure is [documented below](#nested_properties_scheduled_operation_details_scheduled_operation_details_stop_time). + Structure is [documented below](#nested_properties_scheduled_operation_details_stop_time). -The `start_time` block contains: +The `start_time` block contains: * `hours` - (Output) @@ -862,7 +862,7 @@ The following arguments are supported: (Output) Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. -The `stop_time` block contains: +The `stop_time` block contains: * `hours` - (Output) diff --git a/website/docs/r/org_policy_policy.html.markdown b/website/docs/r/org_policy_policy.html.markdown index 997542f0b12..004620d2fb1 100644 --- a/website/docs/r/org_policy_policy.html.markdown +++ b/website/docs/r/org_policy_policy.html.markdown @@ -238,7 +238,7 @@ The following arguments are supported: * `values` - (Optional) List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints. - Structure is [documented below](#nested_spec_rules_rules_values). + Structure is [documented below](#nested_spec_rules_values). * `allow_all` - (Optional) @@ -259,10 +259,10 @@ The following arguments are supported: * `condition` - (Optional) A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')". - Structure is [documented below](#nested_spec_rules_rules_condition). + Structure is [documented below](#nested_spec_rules_condition). -The `values` block supports: +The `values` block supports: * `allowed_values` - (Optional) @@ -272,7 +272,7 @@ The following arguments are supported: (Optional) List of values denied at this resource. -The `condition` block supports: +The `condition` block supports: * `expression` - (Optional) @@ -319,7 +319,7 @@ The following arguments are supported: * `values` - (Optional) List of values to be used for this policy rule. This field can be set only in policies for list constraints. - Structure is [documented below](#nested_dry_run_spec_rules_rules_values). + Structure is [documented below](#nested_dry_run_spec_rules_values). * `allow_all` - (Optional) @@ -340,10 +340,10 @@ The following arguments are supported: * `condition` - (Optional) A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')". - Structure is [documented below](#nested_dry_run_spec_rules_rules_condition). + Structure is [documented below](#nested_dry_run_spec_rules_condition). -The `values` block supports: +The `values` block supports: * `allowed_values` - (Optional) @@ -353,7 +353,7 @@ The following arguments are supported: (Optional) List of values denied at this resource. -The `condition` block supports: +The `condition` block supports: * `expression` - (Optional) diff --git a/website/docs/r/os_config_guest_policies.html.markdown b/website/docs/r/os_config_guest_policies.html.markdown index 562a04b9d02..47ef429b3a3 100644 --- a/website/docs/r/os_config_guest_policies.html.markdown +++ b/website/docs/r/os_config_guest_policies.html.markdown @@ -328,25 +328,25 @@ The following arguments are supported: * `apt` - (Optional) An Apt Repository. - Structure is [documented below](#nested_package_repositories_package_repositories_apt). + Structure is [documented below](#nested_package_repositories_apt). * `yum` - (Optional) A Yum Repository. - Structure is [documented below](#nested_package_repositories_package_repositories_yum). + Structure is [documented below](#nested_package_repositories_yum). * `zypper` - (Optional) A Zypper Repository. - Structure is [documented below](#nested_package_repositories_package_repositories_zypper). + Structure is [documented below](#nested_package_repositories_zypper). * `goo` - (Optional) A Goo Repository. - Structure is [documented below](#nested_package_repositories_package_repositories_goo). + Structure is [documented below](#nested_package_repositories_goo). -The `apt` block supports: +The `apt` block supports: * `archive_type` - (Optional) @@ -371,7 +371,7 @@ The following arguments are supported: URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg containing all the keys in any applied guest policy. -The `yum` block supports: +The `yum` block supports: * `id` - (Required) @@ -390,7 +390,7 @@ The following arguments are supported: (Optional) URIs of GPG keys. -The `zypper` block supports: +The `zypper` block supports: * `id` - (Required) @@ -409,7 +409,7 @@ The following arguments are supported: (Optional) URIs of GPG keys. -The `goo` block supports: +The `goo` block supports: * `name` - (Required) @@ -435,19 +435,19 @@ The following arguments are supported: * `artifacts` - (Optional) Resources available to be used in the steps in the recipe. - Structure is [documented below](#nested_recipes_recipes_artifacts). + Structure is [documented below](#nested_recipes_artifacts). * `install_steps` - (Optional) Actions to be taken for installing this recipe. On failure it stops executing steps and does not attempt another installation. Any steps taken (including partially completed steps) are not rolled back. - Structure is [documented below](#nested_recipes_recipes_install_steps). + Structure is [documented below](#nested_recipes_install_steps). * `update_steps` - (Optional) Actions to be taken for updating this recipe. On failure it stops executing steps and does not attempt another update for this recipe. Any steps taken (including partially completed steps) are not rolled back. - Structure is [documented below](#nested_recipes_recipes_update_steps). + Structure is [documented below](#nested_recipes_update_steps). * `desired_state` - (Optional) @@ -460,7 +460,7 @@ The following arguments are supported: Possible values are: `INSTALLED`, `UPDATED`, `REMOVED`. -The `artifacts` block supports: +The `artifacts` block supports: * `id` - (Required) @@ -476,15 +476,15 @@ The following arguments are supported: * `remote` - (Optional) A generic remote artifact. - Structure is [documented below](#nested_recipes_recipes_artifacts_artifacts_remote). + Structure is [documented below](#nested_recipes_artifacts_remote). * `gcs` - (Optional) A Google Cloud Storage artifact. - Structure is [documented below](#nested_recipes_recipes_artifacts_artifacts_gcs). + Structure is [documented below](#nested_recipes_artifacts_gcs). -The `remote` block supports: +The `remote` block supports: * `uri` - (Optional) @@ -496,7 +496,7 @@ The following arguments are supported: If the checksum is not empty and it doesn't match the artifact then the recipe installation fails before running any of the steps. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Optional) @@ -513,45 +513,45 @@ The following arguments are supported: Must be provided if allowInsecure is false. Generation number of the Google Cloud Storage object. https://storage.googleapis.com/my-bucket/foo/bar#1234567 this value would be 1234567. -The `install_steps` block supports: +The `install_steps` block supports: * `file_copy` - (Optional) Copies a file onto the instance. - Structure is [documented below](#nested_recipes_recipes_install_steps_install_steps_file_copy). + Structure is [documented below](#nested_recipes_install_steps_file_copy). * `archive_extraction` - (Optional) Extracts an archive into the specified directory. - Structure is [documented below](#nested_recipes_recipes_install_steps_install_steps_archive_extraction). + Structure is [documented below](#nested_recipes_install_steps_archive_extraction). * `msi_installation` - (Optional) Installs an MSI file. - Structure is [documented below](#nested_recipes_recipes_install_steps_install_steps_msi_installation). + Structure is [documented below](#nested_recipes_install_steps_msi_installation). * `dpkg_installation` - (Optional) Installs a deb file via dpkg. - Structure is [documented below](#nested_recipes_recipes_install_steps_install_steps_dpkg_installation). + Structure is [documented below](#nested_recipes_install_steps_dpkg_installation). * `rpm_installation` - (Optional) Installs an rpm file via the rpm utility. - Structure is [documented below](#nested_recipes_recipes_install_steps_install_steps_rpm_installation). + Structure is [documented below](#nested_recipes_install_steps_rpm_installation). * `file_exec` - (Optional) Executes an artifact or local file. - Structure is [documented below](#nested_recipes_recipes_install_steps_install_steps_file_exec). + Structure is [documented below](#nested_recipes_install_steps_file_exec). * `script_run` - (Optional) Runs commands in a shell. - Structure is [documented below](#nested_recipes_recipes_install_steps_install_steps_script_run). + Structure is [documented below](#nested_recipes_install_steps_script_run). -The `file_copy` block supports: +The `file_copy` block supports: * `artifact_id` - (Required) @@ -575,7 +575,7 @@ The following arguments are supported: Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4 -The `archive_extraction` block supports: +The `archive_extraction` block supports: * `artifact_id` - (Required) @@ -590,7 +590,7 @@ The following arguments are supported: The type of the archive to extract. Possible values are: `TAR`, `TAR_GZIP`, `TAR_BZIP`, `TAR_LZMA`, `TAR_XZ`, `ZIP`. -The `msi_installation` block supports: +The `msi_installation` block supports: * `artifact_id` - (Required) @@ -604,19 +604,19 @@ The following arguments are supported: (Optional) Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0] -The `dpkg_installation` block supports: +The `dpkg_installation` block supports: * `artifact_id` - (Required) The id of the relevant artifact in the recipe. -The `rpm_installation` block supports: +The `rpm_installation` block supports: * `artifact_id` - (Required) The id of the relevant artifact in the recipe. -The `file_exec` block supports: +The `file_exec` block supports: * `args` - (Optional) @@ -634,7 +634,7 @@ The following arguments are supported: (Optional) The absolute path of the file on the local filesystem. -The `script_run` block supports: +The `script_run` block supports: * `script` - (Required) @@ -650,45 +650,45 @@ The following arguments are supported: which likely only succeed for scripts with shebang lines. Possible values are: `SHELL`, `POWERSHELL`. -The `update_steps` block supports: +The `update_steps` block supports: * `file_copy` - (Optional) Copies a file onto the instance. - Structure is [documented below](#nested_recipes_recipes_update_steps_update_steps_file_copy). + Structure is [documented below](#nested_recipes_update_steps_file_copy). * `archive_extraction` - (Optional) Extracts an archive into the specified directory. - Structure is [documented below](#nested_recipes_recipes_update_steps_update_steps_archive_extraction). + Structure is [documented below](#nested_recipes_update_steps_archive_extraction). * `msi_installation` - (Optional) Installs an MSI file. - Structure is [documented below](#nested_recipes_recipes_update_steps_update_steps_msi_installation). + Structure is [documented below](#nested_recipes_update_steps_msi_installation). * `dpkg_installation` - (Optional) Installs a deb file via dpkg. - Structure is [documented below](#nested_recipes_recipes_update_steps_update_steps_dpkg_installation). + Structure is [documented below](#nested_recipes_update_steps_dpkg_installation). * `rpm_installation` - (Optional) Installs an rpm file via the rpm utility. - Structure is [documented below](#nested_recipes_recipes_update_steps_update_steps_rpm_installation). + Structure is [documented below](#nested_recipes_update_steps_rpm_installation). * `file_exec` - (Optional) Executes an artifact or local file. - Structure is [documented below](#nested_recipes_recipes_update_steps_update_steps_file_exec). + Structure is [documented below](#nested_recipes_update_steps_file_exec). * `script_run` - (Optional) Runs commands in a shell. - Structure is [documented below](#nested_recipes_recipes_update_steps_update_steps_script_run). + Structure is [documented below](#nested_recipes_update_steps_script_run). -The `file_copy` block supports: +The `file_copy` block supports: * `artifact_id` - (Required) @@ -712,7 +712,7 @@ The following arguments are supported: Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4 -The `archive_extraction` block supports: +The `archive_extraction` block supports: * `artifact_id` - (Required) @@ -727,7 +727,7 @@ The following arguments are supported: The type of the archive to extract. Possible values are: `TAR`, `TAR_GZIP`, `TAR_BZIP`, `TAR_LZMA`, `TAR_XZ`, `ZIP`. -The `msi_installation` block supports: +The `msi_installation` block supports: * `artifact_id` - (Required) @@ -741,19 +741,19 @@ The following arguments are supported: (Optional) Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0] -The `dpkg_installation` block supports: +The `dpkg_installation` block supports: * `artifact_id` - (Required) The id of the relevant artifact in the recipe. -The `rpm_installation` block supports: +The `rpm_installation` block supports: * `artifact_id` - (Required) The id of the relevant artifact in the recipe. -The `file_exec` block supports: +The `file_exec` block supports: * `args` - (Optional) @@ -771,7 +771,7 @@ The following arguments are supported: (Optional) The absolute path of the file on the local filesystem. -The `script_run` block supports: +The `script_run` block supports: * `script` - (Required) diff --git a/website/docs/r/os_config_v2_policy_orchestrator.html.markdown b/website/docs/r/os_config_v2_policy_orchestrator.html.markdown index a56e1a156b3..209031a3172 100644 --- a/website/docs/r/os_config_v2_policy_orchestrator.html.markdown +++ b/website/docs/r/os_config_v2_policy_orchestrator.html.markdown @@ -259,7 +259,7 @@ The following arguments are supported: If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups). * `allow_no_resource_group_match` - (Optional) @@ -283,7 +283,7 @@ The following arguments are supported: Length of the description is limited to 1024 characters. -The `resource_groups` block supports: +The `resource_groups` block supports: * `inventory_filters` - (Optional) @@ -297,16 +297,16 @@ The following arguments are supported: inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_inventory_filters). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_inventory_filters). * `resources` - (Required) Required. List of resources configured for this resource group. The resources are executed in the exact order specified here. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources). -The `inventory_filters` block supports: +The `inventory_filters` block supports: * `os_short_name` - (Required) @@ -320,12 +320,12 @@ The following arguments are supported: version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. -The `resources` block supports: +The `resources` block supports: * `repository` - (Optional) A resource that manages a package repository. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository). * `exec` - (Optional) @@ -351,12 +351,12 @@ The following arguments are supported: code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec). * `file` - (Optional) A resource that manages the state of a file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file). * `id` - (Required) @@ -370,41 +370,41 @@ The following arguments are supported: * `pkg` - (Optional) A resource that manages a system package. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg). -The `repository` block supports: +The `repository` block supports: * `yum` - (Optional) Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_yum). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_yum). * `zypper` - (Optional) Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_zypper). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_zypper). * `goo` - (Optional) Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_goo). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_goo). * `apt` - (Optional) Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_apt). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_apt). -The `yum` block supports: +The `yum` block supports: * `id` - (Required) @@ -425,7 +425,7 @@ The following arguments are supported: (Optional) URIs of GPG keys. -The `zypper` block supports: +The `zypper` block supports: * `id` - (Required) @@ -446,7 +446,7 @@ The following arguments are supported: (Optional) URIs of GPG keys. -The `goo` block supports: +The `goo` block supports: * `name` - (Required) @@ -456,7 +456,7 @@ The following arguments are supported: (Required) Required. The url of the repository. -The `apt` block supports: +The `apt` block supports: * `uri` - (Required) @@ -484,20 +484,20 @@ The following arguments are supported: DEB DEB_SRC -The `exec` block supports: +The `exec` block supports: * `enforce` - (Optional) A file or script to execute. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce). * `validate` - (Required) A file or script to execute. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate). -The `enforce` block supports: +The `enforce` block supports: * `script` - (Optional) @@ -529,20 +529,20 @@ The following arguments are supported: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file). -The `file` block supports: +The `file` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file_gcs). * `local_path` - (Optional) @@ -556,7 +556,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -567,7 +567,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -581,12 +581,12 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `validate` block supports: +The `validate` block supports: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file). * `script` - (Optional) @@ -616,12 +616,12 @@ The following arguments are supported: 500K bytes. -The `file` block supports: +The `file` block supports: * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file_gcs). * `local_path` - (Optional) @@ -637,10 +637,10 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file_remote). -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -654,7 +654,7 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -665,12 +665,12 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `file` block supports: +The `file` block supports: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file). * `content` - (Optional) @@ -706,17 +706,17 @@ The following arguments are supported: read only: 4 -The `file` block supports: +The `file` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file_gcs). * `local_path` - (Optional) @@ -730,7 +730,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -741,7 +741,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `object` - (Required) @@ -755,12 +755,12 @@ The following arguments are supported: (Required) Required. Bucket of the Cloud Storage object. -The `pkg` block supports: +The `pkg` block supports: * `msi` - (Optional) An MSI package. MSI packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi). * `desired_state` - (Required) @@ -775,46 +775,46 @@ The following arguments are supported: A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_apt). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_apt). * `deb` - (Optional) A deb package file. dpkg packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb). * `yum` - (Optional) A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_yum). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_yum). * `zypper` - (Optional) A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_zypper). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_zypper). * `rpm` - (Optional) An RPM package file. RPM packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm). * `googet` - (Optional) A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_googet). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_googet). -The `msi` block supports: +The `msi` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source). * `properties` - (Optional) @@ -824,12 +824,12 @@ The following arguments are supported: REBOOT=ReallySuppress`. -The `source` block supports: +The `source` block supports: * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source_gcs). * `local_path` - (Optional) @@ -845,10 +845,10 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source_remote). -The `gcs` block supports: +The `gcs` block supports: * `generation` - (Optional) @@ -862,7 +862,7 @@ The following arguments are supported: (Required) Required. Name of the Cloud Storage object. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -873,18 +873,18 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `apt` block supports: +The `apt` block supports: * `name` - (Required) Required. Package name. -The `deb` block supports: +The `deb` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source). * `pull_deps` - (Optional) @@ -894,17 +894,17 @@ The following arguments are supported: package.deb` -The `source` block supports: +The `source` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source_gcs). * `local_path` - (Optional) @@ -918,7 +918,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -929,7 +929,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -943,24 +943,24 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `yum` block supports: +The `yum` block supports: * `name` - (Required) Required. Package name. -The `zypper` block supports: +The `zypper` block supports: * `name` - (Required) Required. Package name. -The `rpm` block supports: +The `rpm` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source). * `pull_deps` - (Optional) @@ -970,17 +970,17 @@ The following arguments are supported: `zypper -y install package.rpm` -The `source` block supports: +The `source` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source_gcs). * `local_path` - (Optional) @@ -994,7 +994,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -1005,7 +1005,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `generation` - (Optional) @@ -1019,7 +1019,7 @@ The following arguments are supported: (Required) Required. Name of the Cloud Storage object. -The `googet` block supports: +The `googet` block supports: * `name` - (Required) @@ -1129,15 +1129,15 @@ The following arguments are supported: * `resource_hierarchy_selector` - (Optional) Selector containing Cloud Resource Manager resource hierarchy nodes. - Structure is [documented below](#nested_orchestration_scope_selectors_selectors_resource_hierarchy_selector). + Structure is [documented below](#nested_orchestration_scope_selectors_resource_hierarchy_selector). * `location_selector` - (Optional) Selector containing locations in scope. - Structure is [documented below](#nested_orchestration_scope_selectors_selectors_location_selector). + Structure is [documented below](#nested_orchestration_scope_selectors_location_selector). -The `resource_hierarchy_selector` block supports: +The `resource_hierarchy_selector` block supports: * `included_projects` - (Optional) @@ -1149,7 +1149,7 @@ The following arguments are supported: Optional. Names of the folders in scope. Format: `folders/{folder_id}` -The `location_selector` block supports: +The `location_selector` block supports: * `included_locations` - (Optional) diff --git a/website/docs/r/os_config_v2_policy_orchestrator_for_folder.html.markdown b/website/docs/r/os_config_v2_policy_orchestrator_for_folder.html.markdown index 0b49f7d887f..54e34abbb46 100644 --- a/website/docs/r/os_config_v2_policy_orchestrator_for_folder.html.markdown +++ b/website/docs/r/os_config_v2_policy_orchestrator_for_folder.html.markdown @@ -342,7 +342,7 @@ The following arguments are supported: If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups). * `allow_no_resource_group_match` - (Optional) @@ -352,7 +352,7 @@ The following arguments are supported: policy has nothing to validate or enforce. -The `resource_groups` block supports: +The `resource_groups` block supports: * `inventory_filters` - (Optional) @@ -366,16 +366,16 @@ The following arguments are supported: inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_inventory_filters). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_inventory_filters). * `resources` - (Required) List of resources configured for this resource group. The resources are executed in the exact order specified here. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources). -The `inventory_filters` block supports: +The `inventory_filters` block supports: * `os_short_name` - (Required) @@ -389,7 +389,7 @@ The following arguments are supported: version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. -The `resources` block supports: +The `resources` block supports: * `id` - (Required) @@ -403,12 +403,12 @@ The following arguments are supported: * `pkg` - (Optional) A resource that manages a system package. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg). * `repository` - (Optional) A resource that manages a package repository. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository). * `exec` - (Optional) @@ -434,27 +434,27 @@ The following arguments are supported: code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec). * `file` - (Optional) A resource that manages the state of a file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file). -The `pkg` block supports: +The `pkg` block supports: * `googet` - (Optional) A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_googet). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_googet). * `msi` - (Optional) An MSI package. MSI packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi). * `desired_state` - (Required) @@ -466,45 +466,45 @@ The following arguments are supported: A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_apt). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_apt). * `deb` - (Optional) A deb package file. dpkg packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb). * `yum` - (Optional) A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_yum). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_yum). * `zypper` - (Optional) A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_zypper). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_zypper). * `rpm` - (Optional) An RPM package file. RPM packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm). -The `googet` block supports: +The `googet` block supports: * `name` - (Required) Package name. -The `msi` block supports: +The `msi` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source). * `properties` - (Optional) @@ -514,17 +514,17 @@ The following arguments are supported: REBOOT=ReallySuppress`. -The `source` block supports: +The `source` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source_gcs). * `local_path` - (Optional) @@ -538,7 +538,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -549,7 +549,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -563,18 +563,18 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `apt` block supports: +The `apt` block supports: * `name` - (Required) Package name. -The `deb` block supports: +The `deb` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source). * `pull_deps` - (Optional) @@ -584,17 +584,17 @@ The following arguments are supported: package.deb` -The `source` block supports: +The `source` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source_gcs). * `local_path` - (Optional) @@ -608,7 +608,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `sha256_checksum` - (Optional) @@ -619,7 +619,7 @@ The following arguments are supported: URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. -The `gcs` block supports: +The `gcs` block supports: * `generation` - (Optional) @@ -633,19 +633,19 @@ The following arguments are supported: (Required) Name of the Cloud Storage object. -The `yum` block supports: +The `yum` block supports: * `name` - (Required) Package name. -The `zypper` block supports: +The `zypper` block supports: * `name` - (Required) Package name. -The `rpm` block supports: +The `rpm` block supports: * `pull_deps` - (Optional) @@ -657,20 +657,20 @@ The following arguments are supported: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source). -The `source` block supports: +The `source` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source_gcs). * `local_path` - (Optional) @@ -684,7 +684,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -695,7 +695,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -709,38 +709,38 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `repository` block supports: +The `repository` block supports: * `apt` - (Optional) Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_apt). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_apt). * `yum` - (Optional) Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_yum). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_yum). * `zypper` - (Optional) Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_zypper). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_zypper). * `goo` - (Optional) Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_goo). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_goo). -The `apt` block supports: +The `apt` block supports: * `components` - (Required) @@ -765,7 +765,7 @@ The following arguments are supported: (Required) Distribution of this repository. -The `yum` block supports: +The `yum` block supports: * `display_name` - (Optional) @@ -786,7 +786,7 @@ The following arguments are supported: `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts. -The `zypper` block supports: +The `zypper` block supports: * `base_url` - (Required) @@ -807,7 +807,7 @@ The following arguments are supported: (Optional) The display name of the repository. -The `goo` block supports: +The `goo` block supports: * `name` - (Required) @@ -817,20 +817,20 @@ The following arguments are supported: (Required) The url of the repository. -The `exec` block supports: +The `exec` block supports: * `validate` - (Required) A file or script to execute. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate). * `enforce` - (Optional) A file or script to execute. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce). -The `validate` block supports: +The `validate` block supports: * `args` - (Optional) @@ -853,7 +853,7 @@ The following arguments are supported: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file). * `script` - (Optional) @@ -861,7 +861,7 @@ The following arguments are supported: The size of the script is limited to 32KiB. -The `file` block supports: +The `file` block supports: * `allow_insecure` - (Optional) @@ -873,19 +873,19 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file_gcs). * `local_path` - (Optional) A local path within the VM to use. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -896,7 +896,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -910,7 +910,7 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `enforce` block supports: +The `enforce` block supports: * `args` - (Optional) @@ -933,7 +933,7 @@ The following arguments are supported: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file). * `script` - (Optional) @@ -941,17 +941,17 @@ The following arguments are supported: The size of the script is limited to 32KiB. -The `file` block supports: +The `file` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file_gcs). * `local_path` - (Optional) @@ -965,7 +965,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -976,7 +976,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -990,12 +990,12 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `file` block supports: +The `file` block supports: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file). * `content` - (Optional) @@ -1027,7 +1027,7 @@ The following arguments are supported: read only: 4 -The `file` block supports: +The `file` block supports: * `allow_insecure` - (Optional) @@ -1039,19 +1039,19 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file_gcs). * `local_path` - (Optional) A local path within the VM to use. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -1062,7 +1062,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -1180,15 +1180,15 @@ The following arguments are supported: * `resource_hierarchy_selector` - (Optional) Selector containing Cloud Resource Manager resource hierarchy nodes. - Structure is [documented below](#nested_orchestration_scope_selectors_selectors_resource_hierarchy_selector). + Structure is [documented below](#nested_orchestration_scope_selectors_resource_hierarchy_selector). * `location_selector` - (Optional) Selector containing locations in scope. - Structure is [documented below](#nested_orchestration_scope_selectors_selectors_location_selector). + Structure is [documented below](#nested_orchestration_scope_selectors_location_selector). -The `resource_hierarchy_selector` block supports: +The `resource_hierarchy_selector` block supports: * `included_projects` - (Optional) @@ -1200,7 +1200,7 @@ The following arguments are supported: Names of the folders in scope. Format: `folders/{folder_id}` -The `location_selector` block supports: +The `location_selector` block supports: * `included_locations` - (Optional) diff --git a/website/docs/r/os_config_v2_policy_orchestrator_for_organization.html.markdown b/website/docs/r/os_config_v2_policy_orchestrator_for_organization.html.markdown index 1a95ee7d7da..1325d1ebd55 100644 --- a/website/docs/r/os_config_v2_policy_orchestrator_for_organization.html.markdown +++ b/website/docs/r/os_config_v2_policy_orchestrator_for_organization.html.markdown @@ -290,7 +290,7 @@ The following arguments are supported: If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups). * `allow_no_resource_group_match` - (Optional) @@ -300,7 +300,7 @@ The following arguments are supported: policy has nothing to validate or enforce. -The `resource_groups` block supports: +The `resource_groups` block supports: * `inventory_filters` - (Optional) @@ -314,16 +314,16 @@ The following arguments are supported: inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_inventory_filters). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_inventory_filters). * `resources` - (Required) Required. List of resources configured for this resource group. The resources are executed in the exact order specified here. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources). -The `inventory_filters` block supports: +The `inventory_filters` block supports: * `os_short_name` - (Required) @@ -337,7 +337,7 @@ The following arguments are supported: version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. -The `resources` block supports: +The `resources` block supports: * `exec` - (Optional) @@ -363,12 +363,12 @@ The following arguments are supported: code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec). * `file` - (Optional) A resource that manages the state of a file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file). * `id` - (Required) @@ -382,33 +382,33 @@ The following arguments are supported: * `pkg` - (Optional) A resource that manages a system package. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg). * `repository` - (Optional) A resource that manages a package repository. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository). -The `exec` block supports: +The `exec` block supports: * `validate` - (Required) A file or script to execute. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate). * `enforce` - (Optional) A file or script to execute. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce). -The `validate` block supports: +The `validate` block supports: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file). * `script` - (Optional) @@ -438,12 +438,12 @@ The following arguments are supported: 500K bytes. -The `file` block supports: +The `file` block supports: * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file_gcs). * `local_path` - (Optional) @@ -459,10 +459,10 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_validate_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_validate_file_remote). -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -476,7 +476,7 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -487,12 +487,12 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `enforce` block supports: +The `enforce` block supports: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file). * `script` - (Optional) @@ -522,17 +522,17 @@ The following arguments are supported: 500K bytes. -The `file` block supports: +The `file` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_exec_enforce_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_exec_enforce_file_gcs). * `local_path` - (Optional) @@ -546,7 +546,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -557,7 +557,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `generation` - (Optional) @@ -571,12 +571,12 @@ The following arguments are supported: (Required) Required. Name of the Cloud Storage object. -The `file` block supports: +The `file` block supports: * `file` - (Optional) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file). * `content` - (Optional) @@ -612,12 +612,12 @@ The following arguments are supported: read only: 4 -The `file` block supports: +The `file` block supports: * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file_gcs). * `local_path` - (Optional) @@ -633,10 +633,10 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_file_file_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_file_file_remote). -The `gcs` block supports: +The `gcs` block supports: * `object` - (Required) @@ -650,7 +650,7 @@ The following arguments are supported: (Required) Required. Bucket of the Cloud Storage object. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -661,12 +661,12 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `pkg` block supports: +The `pkg` block supports: * `msi` - (Optional) An MSI package. MSI packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi). * `desired_state` - (Required) @@ -681,46 +681,46 @@ The following arguments are supported: A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_apt). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_apt). * `deb` - (Optional) A deb package file. dpkg packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb). * `yum` - (Optional) A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_yum). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_yum). * `zypper` - (Optional) A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_zypper). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_zypper). * `rpm` - (Optional) An RPM package file. RPM packages only support INSTALLED state. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm). * `googet` - (Optional) A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_googet). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_googet). -The `msi` block supports: +The `msi` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source). * `properties` - (Optional) @@ -730,7 +730,7 @@ The following arguments are supported: REBOOT=ReallySuppress`. -The `source` block supports: +The `source` block supports: * `local_path` - (Optional) @@ -746,15 +746,15 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_msi_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_msi_source_gcs). -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -765,7 +765,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -779,18 +779,18 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `apt` block supports: +The `apt` block supports: * `name` - (Required) Required. Package name. -The `deb` block supports: +The `deb` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source). * `pull_deps` - (Optional) @@ -800,7 +800,7 @@ The following arguments are supported: package.deb` -The `source` block supports: +The `source` block supports: * `allow_insecure` - (Optional) @@ -812,19 +812,19 @@ The following arguments are supported: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_deb_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_deb_source_gcs). * `local_path` - (Optional) A local path within the VM to use. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -835,7 +835,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -849,24 +849,24 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `yum` block supports: +The `yum` block supports: * `name` - (Required) Required. Package name. -The `zypper` block supports: +The `zypper` block supports: * `name` - (Required) Required. Package name. -The `rpm` block supports: +The `rpm` block supports: * `source` - (Required) A remote or local file. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source). * `pull_deps` - (Optional) @@ -876,17 +876,17 @@ The following arguments are supported: `zypper -y install package.rpm` -The `source` block supports: +The `source` block supports: * `remote` - (Optional) Specifies a file available via some URI. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source_remote). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source_remote). * `gcs` - (Optional) Specifies a file available as a Cloud Storage Object. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_pkg_rpm_source_gcs). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_pkg_rpm_source_gcs). * `local_path` - (Optional) @@ -900,7 +900,7 @@ The following arguments are supported: Cloud Storage: An object generation number must be specified. -The `remote` block supports: +The `remote` block supports: * `uri` - (Required) @@ -911,7 +911,7 @@ The following arguments are supported: (Optional) SHA256 checksum of the remote file. -The `gcs` block supports: +The `gcs` block supports: * `bucket` - (Required) @@ -925,44 +925,44 @@ The following arguments are supported: (Optional) Generation number of the Cloud Storage object. -The `googet` block supports: +The `googet` block supports: * `name` - (Required) Required. Package name. -The `repository` block supports: +The `repository` block supports: * `yum` - (Optional) Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_yum). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_yum). * `zypper` - (Optional) Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_zypper). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_zypper). * `goo` - (Optional) Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_goo). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_goo). * `apt` - (Optional) Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`. - Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_os_policies_resource_groups_resource_groups_resources_resources_repository_apt). + Structure is [documented below](#nested_orchestrated_resource_os_policy_assignment_v1_payload_os_policies_resource_groups_resources_repository_apt). -The `yum` block supports: +The `yum` block supports: * `display_name` - (Optional) @@ -983,7 +983,7 @@ The following arguments are supported: `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts. -The `zypper` block supports: +The `zypper` block supports: * `id` - (Required) @@ -1004,7 +1004,7 @@ The following arguments are supported: (Optional) URIs of GPG keys. -The `goo` block supports: +The `goo` block supports: * `url` - (Required) @@ -1014,7 +1014,7 @@ The following arguments are supported: (Required) Required. The name of the repository. -The `apt` block supports: +The `apt` block supports: * `archive_type` - (Required) @@ -1146,15 +1146,15 @@ The following arguments are supported: * `resource_hierarchy_selector` - (Optional) Selector containing Cloud Resource Manager resource hierarchy nodes. - Structure is [documented below](#nested_orchestration_scope_selectors_selectors_resource_hierarchy_selector). + Structure is [documented below](#nested_orchestration_scope_selectors_resource_hierarchy_selector). * `location_selector` - (Optional) Selector containing locations in scope. - Structure is [documented below](#nested_orchestration_scope_selectors_selectors_location_selector). + Structure is [documented below](#nested_orchestration_scope_selectors_location_selector). -The `resource_hierarchy_selector` block supports: +The `resource_hierarchy_selector` block supports: * `included_projects` - (Optional) @@ -1166,7 +1166,7 @@ The following arguments are supported: Optional. Names of the folders in scope. Format: `folders/{folder_id}` -The `location_selector` block supports: +The `location_selector` block supports: * `included_locations` - (Optional) diff --git a/website/docs/r/parameter_manager_parameter_version.html.markdown b/website/docs/r/parameter_manager_parameter_version.html.markdown index 0bea84b8078..bf5adf72d67 100644 --- a/website/docs/r/parameter_manager_parameter_version.html.markdown +++ b/website/docs/r/parameter_manager_parameter_version.html.markdown @@ -29,7 +29,7 @@ To get more information about ParameterVersion, see: * [API documentation](https://cloud.google.com/secret-manager/parameter-manager/docs/reference/rest/v1/projects.locations.parameters.versions) ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `payload.parameter_data`. +values will be stored in the raw state as plain text: `parameter_data`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
diff --git a/website/docs/r/parameter_manager_regional_parameter_version.html.markdown b/website/docs/r/parameter_manager_regional_parameter_version.html.markdown index 14c28dd044f..4cbb4a6afe2 100644 --- a/website/docs/r/parameter_manager_regional_parameter_version.html.markdown +++ b/website/docs/r/parameter_manager_regional_parameter_version.html.markdown @@ -29,7 +29,7 @@ To get more information about RegionalParameterVersion, see: * [API documentation](https://cloud.google.com/secret-manager/parameter-manager/docs/reference/rest/v1/projects.locations.parameters.versions) ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `payload.parameter_data`. +values will be stored in the raw state as plain text: `parameter_data`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
diff --git a/website/docs/r/privateca_ca_pool.html.markdown b/website/docs/r/privateca_ca_pool.html.markdown index 7cf3cabb917..b53812c9661 100644 --- a/website/docs/r/privateca_ca_pool.html.markdown +++ b/website/docs/r/privateca_ca_pool.html.markdown @@ -272,15 +272,15 @@ The following arguments are supported: * `rsa` - (Optional) Describes an RSA key that may be used in a Certificate issued from a CaPool. - Structure is [documented below](#nested_issuance_policy_allowed_key_types_allowed_key_types_rsa). + Structure is [documented below](#nested_issuance_policy_allowed_key_types_rsa). * `elliptic_curve` - (Optional) Represents an allowed Elliptic Curve key type. - Structure is [documented below](#nested_issuance_policy_allowed_key_types_allowed_key_types_elliptic_curve). + Structure is [documented below](#nested_issuance_policy_allowed_key_types_elliptic_curve). -The `rsa` block supports: +The `rsa` block supports: * `min_modulus_size` - (Optional) @@ -292,7 +292,7 @@ The following arguments are supported: The maximum allowed RSA modulus size, in bits. If this is not set, or if set to zero, the service will not enforce an explicit upper bound on RSA modulus sizes. -The `elliptic_curve` block supports: +The `elliptic_curve` block supports: * `signature_algorithm` - (Required) @@ -394,10 +394,10 @@ The following arguments are supported: * `object_id` - (Required) Describes values that are relevant in a CA certificate. - Structure is [documented below](#nested_issuance_policy_baseline_values_additional_extensions_additional_extensions_object_id). + Structure is [documented below](#nested_issuance_policy_baseline_values_additional_extensions_object_id). -The `object_id` block supports: +The `object_id` block supports: * `object_id_path` - (Required) diff --git a/website/docs/r/privateca_certificate.html.markdown b/website/docs/r/privateca_certificate.html.markdown index b334317277b..a42af78cd00 100644 --- a/website/docs/r/privateca_certificate.html.markdown +++ b/website/docs/r/privateca_certificate.html.markdown @@ -656,10 +656,10 @@ The following arguments are supported: * `object_id` - (Required) Describes values that are relevant in a CA certificate. - Structure is [documented below](#nested_config_x509_config_additional_extensions_additional_extensions_object_id). + Structure is [documented below](#nested_config_x509_config_additional_extensions_object_id). -The `object_id` block supports: +The `object_id` block supports: * `object_id_path` - (Required) @@ -1108,7 +1108,7 @@ In addition to the arguments listed above, the following computed attributes are * `obect_id` - (Output) Describes how some of the technical fields in a certificate should be populated. - Structure is [documented below](#nested_certificate_description_subject_description_subject_alt_name_custom_sans_custom_sans_obect_id). + Structure is [documented below](#nested_certificate_description_subject_description_subject_alt_name_custom_sans_obect_id). * `critical` - (Output) @@ -1119,7 +1119,7 @@ In addition to the arguments listed above, the following computed attributes are The value of this X.509 extension. -The `obect_id` block contains: +The `obect_id` block contains: * `object_id_path` - (Output) @@ -1172,10 +1172,10 @@ In addition to the arguments listed above, the following computed attributes are * `object_id` - (Output) Describes values that are relevant in a CA certificate. - Structure is [documented below](#nested_certificate_description_x509_description_additional_extensions_additional_extensions_object_id). + Structure is [documented below](#nested_certificate_description_x509_description_additional_extensions_object_id). -The `object_id` block contains: +The `object_id` block contains: * `object_id_path` - (Output) diff --git a/website/docs/r/privateca_certificate_authority.html.markdown b/website/docs/r/privateca_certificate_authority.html.markdown index aa94444f3cd..264b8ddaa60 100644 --- a/website/docs/r/privateca_certificate_authority.html.markdown +++ b/website/docs/r/privateca_certificate_authority.html.markdown @@ -556,10 +556,10 @@ Possible values: ENABLED, DISABLED, STAGED. * `object_id` - (Required) Describes values that are relevant in a CA certificate. - Structure is [documented below](#nested_config_x509_config_additional_extensions_additional_extensions_object_id). + Structure is [documented below](#nested_config_x509_config_additional_extensions_object_id). -The `object_id` block supports: +The `object_id` block supports: * `object_id_path` - (Required) diff --git a/website/docs/r/privateca_certificate_template.html.markdown b/website/docs/r/privateca_certificate_template.html.markdown index 33a0e732f90..05d74d3b9e8 100644 --- a/website/docs/r/privateca_certificate_template.html.markdown +++ b/website/docs/r/privateca_certificate_template.html.markdown @@ -412,7 +412,7 @@ The following arguments are supported: * `object_id` - (Required) Required. The OID for this X.509 extension. - Structure is [documented below](#nested_predefined_values_additional_extensions_additional_extensions_object_id). + Structure is [documented below](#nested_predefined_values_additional_extensions_object_id). * `critical` - (Optional) @@ -423,7 +423,7 @@ The following arguments are supported: Required. The value of this X.509 extension. -The `object_id` block supports: +The `object_id` block supports: * `object_id_path` - (Required) diff --git a/website/docs/r/privileged_access_manager_entitlement.html.markdown b/website/docs/r/privileged_access_manager_entitlement.html.markdown index 5eaaa0d5b59..750f3a3fd20 100644 --- a/website/docs/r/privileged_access_manager_entitlement.html.markdown +++ b/website/docs/r/privileged_access_manager_entitlement.html.markdown @@ -225,7 +225,7 @@ The following arguments are supported: * `approvers` - (Required) The potential set of approvers in this step. This list should contain at only one entry. - Structure is [documented below](#nested_approval_workflow_manual_approvals_steps_steps_approvers). + Structure is [documented below](#nested_approval_workflow_manual_approvals_steps_approvers). * `approvals_needed` - (Optional) @@ -243,7 +243,7 @@ The following arguments are supported: Output Only. The ID of the approval step. -The `approvers` block supports: +The `approvers` block supports: * `principals` - (Required) diff --git a/website/docs/r/pubsub_subscription.html.markdown b/website/docs/r/pubsub_subscription.html.markdown index e4929b6d2f0..c8fecdc41d3 100644 --- a/website/docs/r/pubsub_subscription.html.markdown +++ b/website/docs/r/pubsub_subscription.html.markdown @@ -963,7 +963,7 @@ The following arguments are supported: (Optional) Javascript User Defined Function. If multiple Javascript UDFs are specified on a resource, each one must have a unique `function_name`. - Structure is [documented below](#nested_message_transforms_message_transforms_javascript_udf). + Structure is [documented below](#nested_message_transforms_javascript_udf). * `disabled` - (Optional) @@ -971,7 +971,7 @@ The following arguments are supported: the transform will be applied to messages. Default: `true`. -The `javascript_udf` block supports: +The `javascript_udf` block supports: * `function_name` - (Required) diff --git a/website/docs/r/pubsub_topic.html.markdown b/website/docs/r/pubsub_topic.html.markdown index 3c12f71fdab..6cc0c390b8c 100644 --- a/website/docs/r/pubsub_topic.html.markdown +++ b/website/docs/r/pubsub_topic.html.markdown @@ -646,7 +646,7 @@ The following arguments are supported: (Optional) Javascript User Defined Function. If multiple Javascript UDFs are specified on a resource, each one must have a unique `function_name`. - Structure is [documented below](#nested_message_transforms_message_transforms_javascript_udf). + Structure is [documented below](#nested_message_transforms_javascript_udf). * `disabled` - (Optional) @@ -654,7 +654,7 @@ The following arguments are supported: the transform will be applied to messages. Default: `true`. -The `javascript_udf` block supports: +The `javascript_udf` block supports: * `function_name` - (Required) diff --git a/website/docs/r/redis_cluster.html.markdown b/website/docs/r/redis_cluster.html.markdown index 13861acada6..49d6d9222d4 100644 --- a/website/docs/r/redis_cluster.html.markdown +++ b/website/docs/r/redis_cluster.html.markdown @@ -107,6 +107,77 @@ To [detach](https://cloud.google.com/memorystore/docs/cluster/working-with-cross * Manually update `cross_cluster_replication_config` field in the configuration file(s) for those clusters with the latest value from the state. * Execute `terraform plan` once again. This should not generate any diff, confirming the configuration is in sync with the infrastructure. + +## Example Usage - Redis Cluster Ha With Labels + + +```hcl +resource "google_redis_cluster" "cluster-ha-with-labels" { + name = "ha-cluster" + shard_count = 3 + labels = { + my_key = "my_val" + other_key = "other_val" + } + psc_configs { + network = google_compute_network.consumer_net.id + } + region = "us-central1" + replica_count = 1 + node_type = "REDIS_SHARED_CORE_NANO" + transit_encryption_mode = "TRANSIT_ENCRYPTION_MODE_DISABLED" + authorization_mode = "AUTH_MODE_DISABLED" + redis_configs = { + maxmemory-policy = "volatile-ttl" + } + deletion_protection_enabled = true + + zone_distribution_config { + mode = "MULTI_ZONE" + } + maintenance_policy { + weekly_maintenance_window { + day = "MONDAY" + start_time { + hours = 1 + minutes = 0 + seconds = 0 + nanos = 0 + } + } + } + depends_on = [ + google_network_connectivity_service_connection_policy.default + ] +} + +resource "google_network_connectivity_service_connection_policy" "default" { + name = "my-policy" + location = "us-central1" + service_class = "gcp-memorystore-redis" + description = "my basic service connection policy" + network = google_compute_network.consumer_net.id + psc_config { + subnetworks = [google_compute_subnetwork.consumer_subnet.id] + } +} + +resource "google_compute_subnetwork" "consumer_subnet" { + name = "my-subnet" + ip_cidr_range = "10.0.0.248/29" + region = "us-central1" + network = google_compute_network.consumer_net.id +} + +resource "google_compute_network" "consumer_net" { + name = "my-network" + auto_create_subnetworks = false +} +```
Open in Cloud Shell @@ -608,6 +679,12 @@ The following arguments are supported: projects/{projectId}/locations/{locationId}/clusters/{clusterId} +* `labels` - + (Optional) + Resource labels to represent user provided metadata. + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. + Please refer to the field `effective_labels` for all of the labels present on the resource. + * `gcs_source` - (Optional) Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters. @@ -860,10 +937,10 @@ The following arguments are supported: * `start_time` - (Required) Required. Start time of the window in UTC time. - Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_weekly_maintenance_window_start_time). + Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_start_time). -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Optional) @@ -1026,6 +1103,13 @@ In addition to the arguments listed above, the following computed attributes are Cluster's Certificate Authority. This field will only be populated if Redis Cluster's transit_encryption_mode is TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION Structure is [documented below](#nested_managed_server_ca). +* `terraform_labels` - + The combination of labels configured directly on the resource + and default labels configured on the provider. + +* `effective_labels` - + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. + The `discovery_endpoints` block contains: @@ -1041,10 +1125,10 @@ In addition to the arguments listed above, the following computed attributes are (Optional) Output only. Customer configuration for where the endpoint is created and accessed from. - Structure is [documented below](#nested_discovery_endpoints_discovery_endpoints_psc_config). + Structure is [documented below](#nested_discovery_endpoints_psc_config). -The `psc_config` block supports: +The `psc_config` block supports: * `network` - (Optional) diff --git a/website/docs/r/redis_cluster_user_created_connections.html.markdown b/website/docs/r/redis_cluster_user_created_connections.html.markdown index 0cdfd71540d..d7f2ff87aaa 100644 --- a/website/docs/r/redis_cluster_user_created_connections.html.markdown +++ b/website/docs/r/redis_cluster_user_created_connections.html.markdown @@ -340,19 +340,19 @@ The following arguments are supported: * `connections` - (Optional) - Structure is [documented below](#nested_cluster_endpoints_cluster_endpoints_connections). + Structure is [documented below](#nested_cluster_endpoints_connections). -The `connections` block supports: +The `connections` block supports: * `psc_connection` - (Optional) Detailed information of a PSC connection that is created by the customer who owns the cluster. - Structure is [documented below](#nested_cluster_endpoints_cluster_endpoints_connections_connections_psc_connection). + Structure is [documented below](#nested_cluster_endpoints_connections_psc_connection). -The `psc_connection` block supports: +The `psc_connection` block supports: * `psc_connection_id` - (Required) diff --git a/website/docs/r/redis_instance.html.markdown b/website/docs/r/redis_instance.html.markdown index 630bd0517e6..95b85b9fd28 100644 --- a/website/docs/r/redis_instance.html.markdown +++ b/website/docs/r/redis_instance.html.markdown @@ -518,10 +518,10 @@ When the field is set to false, deleting the instance is allowed. * `start_time` - (Required) Required. Start time of the window in UTC time. - Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_weekly_maintenance_window_start_time). + Structure is [documented below](#nested_maintenance_policy_weekly_maintenance_window_start_time). -The `start_time` block supports: +The `start_time` block supports: * `hours` - (Optional) diff --git a/website/docs/r/saas_runtime_unit_kind.html.markdown b/website/docs/r/saas_runtime_unit_kind.html.markdown index fb6976c9b20..2ead5726250 100644 --- a/website/docs/r/saas_runtime_unit_kind.html.markdown +++ b/website/docs/r/saas_runtime_unit_kind.html.markdown @@ -154,19 +154,19 @@ The following arguments are supported: * `from` - (Optional) Output variables whose values will be passed on to dependencies - Structure is [documented below](#nested_input_variable_mappings_input_variable_mappings_from). + Structure is [documented below](#nested_input_variable_mappings_from). * `to` - (Optional) Input variables whose values will be passed on to dependencies - Structure is [documented below](#nested_input_variable_mappings_input_variable_mappings_to). + Structure is [documented below](#nested_input_variable_mappings_to). * `variable` - (Required) name of the variable -The `from` block supports: +The `from` block supports: * `dependency` - (Required) @@ -176,7 +176,7 @@ The following arguments are supported: (Required) Name of the outputVariable on the dependency -The `to` block supports: +The `to` block supports: * `dependency` - (Required) @@ -195,19 +195,19 @@ The following arguments are supported: * `from` - (Optional) Output variables whose values will be passed on to dependencies - Structure is [documented below](#nested_output_variable_mappings_output_variable_mappings_from). + Structure is [documented below](#nested_output_variable_mappings_from). * `to` - (Optional) Input variables whose values will be passed on to dependencies - Structure is [documented below](#nested_output_variable_mappings_output_variable_mappings_to). + Structure is [documented below](#nested_output_variable_mappings_to). * `variable` - (Required) name of the variable -The `from` block supports: +The `from` block supports: * `dependency` - (Required) @@ -217,7 +217,7 @@ The following arguments are supported: (Required) Name of the outputVariable on the dependency -The `to` block supports: +The `to` block supports: * `dependency` - (Required) diff --git a/website/docs/r/scc_folder_custom_module.html.markdown b/website/docs/r/scc_folder_custom_module.html.markdown index 7738205bbb4..ab4c27e15c6 100644 --- a/website/docs/r/scc_folder_custom_module.html.markdown +++ b/website/docs/r/scc_folder_custom_module.html.markdown @@ -214,10 +214,10 @@ The following arguments are supported: (Optional) The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. - Structure is [documented below](#nested_custom_config_custom_output_properties_properties_value_expression). + Structure is [documented below](#nested_custom_config_custom_output_properties_value_expression). -The `value_expression` block supports: +The `value_expression` block supports: * `expression` - (Required) diff --git a/website/docs/r/scc_management_folder_security_health_analytics_custom_module.html.markdown b/website/docs/r/scc_management_folder_security_health_analytics_custom_module.html.markdown index 205992498e2..a218223829f 100644 --- a/website/docs/r/scc_management_folder_security_health_analytics_custom_module.html.markdown +++ b/website/docs/r/scc_management_folder_security_health_analytics_custom_module.html.markdown @@ -220,10 +220,10 @@ The following arguments are supported: (Optional) The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. - Structure is [documented below](#nested_custom_config_custom_output_properties_properties_value_expression). + Structure is [documented below](#nested_custom_config_custom_output_properties_value_expression). -The `value_expression` block supports: +The `value_expression` block supports: * `expression` - (Required) diff --git a/website/docs/r/scc_management_organization_security_health_analytics_custom_module.html.markdown b/website/docs/r/scc_management_organization_security_health_analytics_custom_module.html.markdown index 455338ac48a..9bfd5c7195c 100644 --- a/website/docs/r/scc_management_organization_security_health_analytics_custom_module.html.markdown +++ b/website/docs/r/scc_management_organization_security_health_analytics_custom_module.html.markdown @@ -208,10 +208,10 @@ The following arguments are supported: (Optional) The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. - Structure is [documented below](#nested_custom_config_custom_output_properties_properties_value_expression). + Structure is [documented below](#nested_custom_config_custom_output_properties_value_expression). -The `value_expression` block supports: +The `value_expression` block supports: * `expression` - (Required) diff --git a/website/docs/r/scc_management_project_security_health_analytics_custom_module.html.markdown b/website/docs/r/scc_management_project_security_health_analytics_custom_module.html.markdown index 4b878aeb71e..dfdfa4a829f 100644 --- a/website/docs/r/scc_management_project_security_health_analytics_custom_module.html.markdown +++ b/website/docs/r/scc_management_project_security_health_analytics_custom_module.html.markdown @@ -205,10 +205,10 @@ The following arguments are supported: (Optional) The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. - Structure is [documented below](#nested_custom_config_custom_output_properties_properties_value_expression). + Structure is [documented below](#nested_custom_config_custom_output_properties_value_expression). -The `value_expression` block supports: +The `value_expression` block supports: * `expression` - (Required) diff --git a/website/docs/r/scc_organization_custom_module.html.markdown b/website/docs/r/scc_organization_custom_module.html.markdown index 332a639803b..0164bfa7360 100644 --- a/website/docs/r/scc_organization_custom_module.html.markdown +++ b/website/docs/r/scc_organization_custom_module.html.markdown @@ -202,10 +202,10 @@ The following arguments are supported: (Optional) The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. - Structure is [documented below](#nested_custom_config_custom_output_properties_properties_value_expression). + Structure is [documented below](#nested_custom_config_custom_output_properties_value_expression). -The `value_expression` block supports: +The `value_expression` block supports: * `expression` - (Required) diff --git a/website/docs/r/scc_project_custom_module.html.markdown b/website/docs/r/scc_project_custom_module.html.markdown index b39b623c80a..100ad9aa345 100644 --- a/website/docs/r/scc_project_custom_module.html.markdown +++ b/website/docs/r/scc_project_custom_module.html.markdown @@ -199,10 +199,10 @@ The following arguments are supported: (Optional) The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. - Structure is [documented below](#nested_custom_config_custom_output_properties_properties_value_expression). + Structure is [documented below](#nested_custom_config_custom_output_properties_value_expression). -The `value_expression` block supports: +The `value_expression` block supports: * `expression` - (Required) diff --git a/website/docs/r/scc_v2_project_notification_config.html.markdown b/website/docs/r/scc_v2_project_notification_config.html.markdown index d1740af02ec..01c71dbd996 100644 --- a/website/docs/r/scc_v2_project_notification_config.html.markdown +++ b/website/docs/r/scc_v2_project_notification_config.html.markdown @@ -41,7 +41,6 @@ resource "google_pubsub_topic" "scc_v2_project_notification" { resource "google_scc_v2_project_notification_config" "custom_notification_config" { config_id = "my-config" project = "my-project-name" - location = "global" description = "My custom Cloud Security Command Center Finding Notification Configuration" pubsub_topic = google_pubsub_topic.scc_v2_project_notification.id @@ -77,7 +76,7 @@ The following arguments are supported: * `location` - (Optional) - Location ID of the parent organization. Only global is supported at the moment. + Location ID for the parent project. Defaults to `global` if location is not provided. * `project` - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used. diff --git a/website/docs/r/secret_manager_regional_secret_version.html.markdown b/website/docs/r/secret_manager_regional_secret_version.html.markdown index dbc87f3c3af..ad9443ff7d4 100644 --- a/website/docs/r/secret_manager_regional_secret_version.html.markdown +++ b/website/docs/r/secret_manager_regional_secret_version.html.markdown @@ -37,7 +37,7 @@ this, use the `create_before_destroy` field within the lifecycle block. For more details, refer to the [Terraform lifecycle documentation](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#the-lifecycle-meta-argument). ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `payload.secret_data`. +values will be stored in the raw state as plain text: `secret_data`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
diff --git a/website/docs/r/secret_manager_secret.html.markdown b/website/docs/r/secret_manager_secret.html.markdown index 64bb07b71be..936eff49086 100644 --- a/website/docs/r/secret_manager_secret.html.markdown +++ b/website/docs/r/secret_manager_secret.html.markdown @@ -286,10 +286,10 @@ or `terraform destroy` that would delete the secret will fail. * `customer_managed_encryption` - (Optional) Customer Managed Encryption for the secret. - Structure is [documented below](#nested_replication_user_managed_replicas_replicas_customer_managed_encryption). + Structure is [documented below](#nested_replication_user_managed_replicas_customer_managed_encryption). -The `customer_managed_encryption` block supports: +The `customer_managed_encryption` block supports: * `kms_key_name` - (Required) diff --git a/website/docs/r/secret_manager_secret_version.html.markdown b/website/docs/r/secret_manager_secret_version.html.markdown index 27bbf10cd9f..2b0320abc72 100644 --- a/website/docs/r/secret_manager_secret_version.html.markdown +++ b/website/docs/r/secret_manager_secret_version.html.markdown @@ -37,10 +37,10 @@ this, use the `create_before_destroy` field within the lifecycle block. For more details, refer to the [Terraform lifecycle documentation](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#the-lifecycle-meta-argument). ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `payload.secret_data`. +values will be stored in the raw state as plain text: `secret_data`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data). -~> **Note:** All arguments marked as write-only values will not be stored in the state: `payload.secret_data_wo`. +~> **Note:** All arguments marked as write-only values will not be stored in the state: `secret_data_wo`. [Read more about Write-only Arguments](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/write-only-arguments).
diff --git a/website/docs/r/securityposture_posture.html.markdown b/website/docs/r/securityposture_posture.html.markdown index 82142ae9e8b..aa07a08d58d 100644 --- a/website/docs/r/securityposture_posture.html.markdown +++ b/website/docs/r/securityposture_posture.html.markdown @@ -181,10 +181,10 @@ The following arguments are supported: * `policies` - (Required) List of security policy - Structure is [documented below](#nested_policy_sets_policy_sets_policies). + Structure is [documented below](#nested_policy_sets_policies). -The `policies` block supports: +The `policies` block supports: * `policy_id` - (Required) @@ -197,15 +197,15 @@ The following arguments are supported: * `compliance_standards` - (Optional) Mapping for policy to security standards and controls. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_compliance_standards). + Structure is [documented below](#nested_policy_sets_policies_compliance_standards). * `constraint` - (Required) Policy constraint definition.It can have the definition of one of following constraints: orgPolicyConstraint orgPolicyConstraintCustom securityHealthAnalyticsModule securityHealthAnalyticsCustomModule - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint). + Structure is [documented below](#nested_policy_sets_policies_constraint). -The `compliance_standards` block supports: +The `compliance_standards` block supports: * `standard` - (Optional) @@ -215,30 +215,30 @@ The following arguments are supported: (Optional) Mapping of security controls for the policy. -The `constraint` block supports: +The `constraint` block supports: * `org_policy_constraint` - (Optional) Organization policy canned constraint definition. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint). * `org_policy_constraint_custom` - (Optional) Organization policy custom constraint policy definition. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_custom). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_custom). * `security_health_analytics_module` - (Optional) Security Health Analytics built-in detector definition. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_module). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_module). * `security_health_analytics_custom_module` - (Optional) Definition of Security Health Analytics Custom Module. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_custom_module). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_custom_module). -The `org_policy_constraint` block supports: +The `org_policy_constraint` block supports: * `canned_constraint_id` - (Required) @@ -247,15 +247,15 @@ The following arguments are supported: * `policy_rules` - (Required) Definition of policy rules - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_policy_rules). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_policy_rules). -The `policy_rules` block supports: +The `policy_rules` block supports: * `values` - (Optional) List of values to be used for this policy rule. This field can be set only in policies for list constraints. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_policy_rules_policy_rules_values). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_policy_rules_values). * `allow_all` - (Optional) @@ -275,10 +275,10 @@ The following arguments are supported: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_policy_rules_policy_rules_condition). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_policy_rules_condition). -The `values` block supports: +The `values` block supports: * `allowed_values` - (Optional) @@ -288,7 +288,7 @@ The following arguments are supported: (Optional) List of values denied at this resource. -The `condition` block supports: +The `condition` block supports: * `expression` - (Required) @@ -306,20 +306,20 @@ The following arguments are supported: (Optional) String indicating the location of the expression for error reporting, e.g. a file name and a position in the file -The `org_policy_constraint_custom` block supports: +The `org_policy_constraint_custom` block supports: * `custom_constraint` - (Optional) Organization policy custom constraint definition. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_custom_custom_constraint). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_custom_custom_constraint). * `policy_rules` - (Required) Definition of policy rules - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_custom_policy_rules). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_custom_policy_rules). -The `custom_constraint` block supports: +The `custom_constraint` block supports: * `name` - (Required) @@ -350,12 +350,12 @@ The following arguments are supported: (Required) Immutable. The fully qualified name of the Google Cloud REST resource containing the object and field you want to restrict. For example, `container.googleapis.com/NodePool`. -The `policy_rules` block supports: +The `policy_rules` block supports: * `values` - (Optional) List of values to be used for this policy rule. This field can be set only in policies for list constraints. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_custom_policy_rules_policy_rules_values). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_custom_policy_rules_values). * `allow_all` - (Optional) @@ -375,10 +375,10 @@ The following arguments are supported: Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_org_policy_constraint_custom_policy_rules_policy_rules_condition). + Structure is [documented below](#nested_policy_sets_policies_constraint_org_policy_constraint_custom_policy_rules_condition). -The `values` block supports: +The `values` block supports: * `allowed_values` - (Optional) @@ -388,7 +388,7 @@ The following arguments are supported: (Optional) List of values denied at this resource. -The `condition` block supports: +The `condition` block supports: * `expression` - (Required) @@ -406,7 +406,7 @@ The following arguments are supported: (Optional) String indicating the location of the expression for error reporting, e.g. a file name and a position in the file -The `security_health_analytics_module` block supports: +The `security_health_analytics_module` block supports: * `module_name` - (Required) @@ -417,7 +417,7 @@ The following arguments are supported: The state of enablement for the module at its level of the resource hierarchy. Possible values are: `ENABLEMENT_STATE_UNSPECIFIED`, `ENABLED`, `DISABLED`. -The `security_health_analytics_custom_module` block supports: +The `security_health_analytics_custom_module` block supports: * `id` - (Output) @@ -437,16 +437,16 @@ The following arguments are supported: * `config` - (Required) Custom module details. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_custom_module_config). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_custom_module_config). -The `config` block supports: +The `config` block supports: * `predicate` - (Required) The CEL expression to evaluate to produce findings.When the expression evaluates to true against a resource, a finding is generated. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_custom_module_config_predicate). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_custom_module_config_predicate). * `custom_output` - (Optional) @@ -454,13 +454,13 @@ The following arguments are supported: return with each finding that is generated by the custom module. The custom source properties that are defined here are included in the finding JSON under `sourceProperties`. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_custom_module_config_custom_output). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_custom_module_config_custom_output). * `resource_selector` - (Required) The resource types that the custom module operates on. Each custom module can specify up to 5 resource types. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_custom_module_config_resource_selector). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_custom_module_config_resource_selector). * `severity` - (Required) @@ -478,7 +478,7 @@ The following arguments are supported: resolve the detected issue -The `predicate` block supports: +The `predicate` block supports: * `expression` - (Required) @@ -496,15 +496,15 @@ The following arguments are supported: (Optional) String indicating the location of the expression for error reporting, e.g. a file name and a position in the file -The `custom_output` block supports: +The `custom_output` block supports: * `properties` - (Optional) A list of custom output properties to add to the finding. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_custom_module_config_custom_output_properties). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_custom_module_config_custom_output_properties). -The `properties` block supports: +The `properties` block supports: * `name` - (Required) @@ -515,10 +515,10 @@ The following arguments are supported: The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. - Structure is [documented below](#nested_policy_sets_policy_sets_policies_policies_constraint_security_health_analytics_custom_module_config_custom_output_properties_properties_value_expression). + Structure is [documented below](#nested_policy_sets_policies_constraint_security_health_analytics_custom_module_config_custom_output_properties_value_expression). -The `value_expression` block supports: +The `value_expression` block supports: * `expression` - (Required) @@ -536,7 +536,7 @@ The following arguments are supported: (Optional) String indicating the location of the expression for error reporting, e.g. a file name and a position in the file -The `resource_selector` block supports: +The `resource_selector` block supports: * `resource_types` - (Required) diff --git a/website/docs/r/spanner_instance.html.markdown b/website/docs/r/spanner_instance.html.markdown index 5700d03abc1..4130532acfa 100644 --- a/website/docs/r/spanner_instance.html.markdown +++ b/website/docs/r/spanner_instance.html.markdown @@ -232,34 +232,41 @@ This must be set to true if you created a backup manually in the console. should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). +* `total_cpu_utilization_percent` - + (Optional) + The target total cpu utilization percentage that the autoscaler should be trying to achieve for the instance. + This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive. + If not specified or set to 0, the autoscaler will skip scaling based on total cpu utilization. + The value should be higher than high_priority_cpu_utilization_percent if present. + The `asymmetric_autoscaling_options` block supports: * `replica_selection` - (Required) A nested object resource. - Structure is [documented below](#nested_autoscaling_config_asymmetric_autoscaling_options_asymmetric_autoscaling_options_replica_selection). + Structure is [documented below](#nested_autoscaling_config_asymmetric_autoscaling_options_replica_selection). * `overrides` - (Required) A nested object resource. - Structure is [documented below](#nested_autoscaling_config_asymmetric_autoscaling_options_asymmetric_autoscaling_options_overrides). + Structure is [documented below](#nested_autoscaling_config_asymmetric_autoscaling_options_overrides). -The `replica_selection` block supports: +The `replica_selection` block supports: * `location` - (Required) The location of the replica to apply asymmetric autoscaling options. -The `overrides` block supports: +The `overrides` block supports: * `autoscaling_limits` - (Required) A nested object resource. - Structure is [documented below](#nested_autoscaling_config_asymmetric_autoscaling_options_asymmetric_autoscaling_options_overrides_autoscaling_limits). + Structure is [documented below](#nested_autoscaling_config_asymmetric_autoscaling_options_overrides_autoscaling_limits). -The `autoscaling_limits` block supports: +The `autoscaling_limits` block supports: * `min_nodes` - (Required) diff --git a/website/docs/r/sql_database_instance.html.markdown b/website/docs/r/sql_database_instance.html.markdown index ec6f567fbed..e28a79b6091 100644 --- a/website/docs/r/sql_database_instance.html.markdown +++ b/website/docs/r/sql_database_instance.html.markdown @@ -284,6 +284,46 @@ resource "google_sql_database_instance" "main" { } ``` +### Cloud SQL Instance created with backupdr_backup +~> **NOTE:** For restoring from a backupdr_backup, note that the backup must be in active state. List down the backups using `google_backup_dr_backup`. Replace `backupdr_backup_full_path` with the backup name. + +```hcl +resource "google_sql_database_instance" "instance" { + name = "main-instance" + database_version = "MYSQL_8_0" + settings { + tier = "db-f1-micro" + backup_configuration { + enabled = true + binary_log_enabled = true + } + backupdr_backup = "backupdr_backup_full_path" + } +} +``` + +### Cloud SQL Instance created using point_in_time_restore +~> **NOTE:** Replace `backupdr_datasource` with the full datasource path, `time_stamp` should be in the format of `YYYY-MM-DDTHH:MM:SSZ`. + +```hcl +resource "google_sql_database_instance" "instance" { + name = "main-instance" + database_version = "MYSQL_8_0" + settings { + tier = "db-f1-micro" + backup_configuration { + enabled = true + binary_log_enabled = true + } + } + point_in_time_restore_context { + datasource = "backupdr_datasource" + target_instance = "target_instance_name" + point_in_time = "time_stamp" + } +} +``` + ## Argument Reference The following arguments are supported: @@ -471,6 +511,8 @@ The optional `settings.backup_configuration` subblock supports: * `enabled` - (Optional) True if backup configuration is enabled. +* `backup_tier` - (Computed) The backup tier that manages the backups for the instance. + * `start_time` - (Optional) `HH:MM` format time indicating when backup configuration starts. * `point_in_time_recovery_enabled` - (Optional) True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. Enabled by default for PostgreSQL Enterprise Plus and SQL Server Enterprise Plus instances. @@ -702,7 +744,7 @@ block during resource creation/update will trigger the restore action after the * `project` - (Optional) The full project ID of the source instance.` -The optional, computed `replication_cluster` block represents a primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set only after both the primary and replica are created. This block supports: +The optional, computed `replication_cluster` block represents a primary instance and disaster recovery replica pair. Applicable to MySQL and PostgreSQL. This field can be set if the primary has psa_write_endpoint set or both the primary and replica are created. This block supports: * `psa_write_endpoint`: Read-only field which if set, indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted. diff --git a/website/docs/r/sql_source_representation_instance.html.markdown b/website/docs/r/sql_source_representation_instance.html.markdown index 266e5138b26..066e0da53ed 100644 --- a/website/docs/r/sql_source_representation_instance.html.markdown +++ b/website/docs/r/sql_source_representation_instance.html.markdown @@ -31,7 +31,7 @@ affect billing. You cannot update the source representation instance. ~> **Warning:** All arguments including the following potentially sensitive -values will be stored in the raw state as plain text: `on_premises_configuration.password`. +values will be stored in the raw state as plain text: `password`. [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data).
diff --git a/website/docs/r/storage_batch_operations_job.html.markdown b/website/docs/r/storage_batch_operations_job.html.markdown index ba01de588fb..f18590e88fb 100644 --- a/website/docs/r/storage_batch_operations_job.html.markdown +++ b/website/docs/r/storage_batch_operations_job.html.markdown @@ -124,20 +124,20 @@ The following arguments are supported: * `prefix_list` - (Optional) Specifies objects matching a prefix set. - Structure is [documented below](#nested_bucket_list_buckets_buckets_prefix_list). + Structure is [documented below](#nested_bucket_list_buckets_prefix_list). * `manifest` - (Optional) contain the manifest source file that is a CSV file in a Google Cloud Storage bucket. - Structure is [documented below](#nested_bucket_list_buckets_buckets_manifest). + Structure is [documented below](#nested_bucket_list_buckets_manifest). -The `prefix_list` block supports: +The `prefix_list` block supports: * `included_object_prefixes` - (Optional) -The `manifest` block supports: +The `manifest` block supports: * `manifest_location` - (Optional) diff --git a/website/docs/r/storage_bucket.html.markdown b/website/docs/r/storage_bucket.html.markdown index 183f5f072a0..332c197154c 100644 --- a/website/docs/r/storage_bucket.html.markdown +++ b/website/docs/r/storage_bucket.html.markdown @@ -181,9 +181,7 @@ The following arguments are supported: - - - -* `force_destroy` - (Optional, Default: false) When deleting a bucket, this - boolean option will delete all contained objects. If you try to delete a - bucket that contains objects, Terraform will fail that run. +* `force_destroy` - (Optional, Default: false) When true, before deleting a bucket, delete all objects within the bucket, or Anywhere Caches caching data for that bucket. Otherwise, buckets with objects/caches will fail. Anywhere Cache requires additional permissions to interact with and will be assumed not present when Terraform is not permissioned, attempting to delete the bucket anyways. This may result in the objects in the bucket getting destroyed but not the bucket itself if there is a cache in use with the bucket. Force deletion may take a long time to delete buckets with lots of objects or with any Anywhere Caches (80m+). * `project` - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used. diff --git a/website/docs/r/storage_insights_dataset_config.html.markdown b/website/docs/r/storage_insights_dataset_config.html.markdown index ec35acaf480..28f6fee6236 100644 --- a/website/docs/r/storage_insights_dataset_config.html.markdown +++ b/website/docs/r/storage_insights_dataset_config.html.markdown @@ -78,6 +78,7 @@ resource "google_storage_insights_dataset_config" "config_excludes" { location = "us-central1" dataset_config_id = "my_config_excludes" retention_period_days = 1 + activity_data_retention_period_days = 2 organization_scope = true identity { type = "IDENTITY_TYPE_PER_PROJECT" @@ -128,6 +129,10 @@ The following arguments are supported: (Optional) If set to true, the request includes all the newly created buckets in the dataset that meet the inclusion and exclusion rules. +* `activity_data_retention_period_days` - + (Optional) + Number of days of activity data that must be retained. If not specified, retentionPeriodDays will be used. Set to 0 to turn off the activity data. + * `description` - (Optional) An optional user-provided description for the dataset configuration with a maximum length of 256 characters. diff --git a/website/docs/r/tpu_v2_queued_resource.html.markdown b/website/docs/r/tpu_v2_queued_resource.html.markdown index 4c378a6e6d2..2a6aa592dc6 100644 --- a/website/docs/r/tpu_v2_queued_resource.html.markdown +++ b/website/docs/r/tpu_v2_queued_resource.html.markdown @@ -150,10 +150,10 @@ The following arguments are supported: * `node` - (Required) The node. - Structure is [documented below](#nested_tpu_node_spec_node_spec_node). + Structure is [documented below](#nested_tpu_node_spec_node). -The `node` block supports: +The `node` block supports: * `runtime_version` - (Required) @@ -170,10 +170,10 @@ The following arguments are supported: * `network_config` - (Optional) Network configurations for the TPU node. - Structure is [documented below](#nested_tpu_node_spec_node_spec_node_network_config). + Structure is [documented below](#nested_tpu_node_spec_node_network_config). -The `network_config` block supports: +The `network_config` block supports: * `network` - (Optional) diff --git a/website/docs/r/tpu_v2_vm.html.markdown b/website/docs/r/tpu_v2_vm.html.markdown index 32b2a801346..fedbbd8fc82 100644 --- a/website/docs/r/tpu_v2_vm.html.markdown +++ b/website/docs/r/tpu_v2_vm.html.markdown @@ -424,10 +424,10 @@ In addition to the arguments listed above, the following computed attributes are * `access_config` - (Output) The access config for the TPU worker. - Structure is [documented below](#nested_network_endpoints_network_endpoints_access_config). + Structure is [documented below](#nested_network_endpoints_access_config). -The `access_config` block contains: +The `access_config` block contains: * `external_ip` - (Output) diff --git a/website/docs/r/transcoder_job.html.markdown b/website/docs/r/transcoder_job.html.markdown index 2ab54b98407..457a99c2cae 100644 --- a/website/docs/r/transcoder_job.html.markdown +++ b/website/docs/r/transcoder_job.html.markdown @@ -879,23 +879,23 @@ The following arguments are supported: * `video_stream` - (Optional) Encoding of a video stream. - Structure is [documented below](#nested_config_elementary_streams_elementary_streams_video_stream). + Structure is [documented below](#nested_config_elementary_streams_video_stream). * `audio_stream` - (Optional) Encoding of an audio stream. - Structure is [documented below](#nested_config_elementary_streams_elementary_streams_audio_stream). + Structure is [documented below](#nested_config_elementary_streams_audio_stream). -The `video_stream` block supports: +The `video_stream` block supports: * `h264` - (Optional) H264 codec settings - Structure is [documented below](#nested_config_elementary_streams_elementary_streams_video_stream_h264). + Structure is [documented below](#nested_config_elementary_streams_video_stream_h264). -The `h264` block supports: +The `h264` block supports: * `width_pixels` - (Optional) @@ -957,7 +957,7 @@ The following arguments are supported: (Optional) HLG color format setting for H264. -The `audio_stream` block supports: +The `audio_stream` block supports: * `codec` - (Optional) @@ -1000,14 +1000,14 @@ The following arguments are supported: * `segment_settings` - (Optional) Segment settings for ts, fmp4 and vtt. - Structure is [documented below](#nested_config_mux_streams_mux_streams_segment_settings). + Structure is [documented below](#nested_config_mux_streams_segment_settings). * `encryption_id` - (Optional) Identifier of the encryption configuration to use. -The `segment_settings` block supports: +The `segment_settings` block supports: * `segment_duration` - (Optional) @@ -1051,34 +1051,34 @@ The following arguments are supported: * `image` - (Optional) Image overlay. - Structure is [documented below](#nested_config_overlays_overlays_image). + Structure is [documented below](#nested_config_overlays_image). * `animations` - (Optional) List of animations. The list should be chronological, without any time overlap. - Structure is [documented below](#nested_config_overlays_overlays_animations). + Structure is [documented below](#nested_config_overlays_animations). -The `image` block supports: +The `image` block supports: * `uri` - (Required) URI of the image in Cloud Storage. For example, gs://bucket/inputs/image.png. -The `animations` block supports: +The `animations` block supports: * `animation_fade` - (Optional) Display overlay object with fade animation. - Structure is [documented below](#nested_config_overlays_overlays_animations_animations_animation_fade). + Structure is [documented below](#nested_config_overlays_animations_animation_fade). -The `animation_fade` block supports: +The `animation_fade` block supports: * `xy` - (Optional) Normalized coordinates based on output video resolution. - Structure is [documented below](#nested_config_overlays_overlays_animations_animations_animation_fade_xy). + Structure is [documented below](#nested_config_overlays_animations_animation_fade_xy). * `start_time_offset` - (Optional) @@ -1098,7 +1098,7 @@ The following arguments are supported: Possible values are: `FADE_TYPE_UNSPECIFIED`, `FADE_IN`, `FADE_OUT`. -The `xy` block supports: +The `xy` block supports: * `x` - (Optional) @@ -1117,7 +1117,7 @@ The following arguments are supported: * `drm_systems` - (Optional) DRM system(s) to use; at least one must be specified. If a DRM system is omitted, it is considered disabled. - Structure is [documented below](#nested_config_encryptions_encryptions_drm_systems). + Structure is [documented below](#nested_config_encryptions_drm_systems). * `aes128` - (Optional) @@ -1130,15 +1130,15 @@ The following arguments are supported: * `mpeg_cenc` - (Optional) Configuration for MPEG Common Encryption (MPEG-CENC). - Structure is [documented below](#nested_config_encryptions_encryptions_mpeg_cenc). + Structure is [documented below](#nested_config_encryptions_mpeg_cenc). * `secret_manager_key_source` - (Optional) Configuration for secrets stored in Google Secret Manager. - Structure is [documented below](#nested_config_encryptions_encryptions_secret_manager_key_source). + Structure is [documented below](#nested_config_encryptions_secret_manager_key_source). -The `drm_systems` block supports: +The `drm_systems` block supports: * `widevine` - (Optional) @@ -1156,13 +1156,13 @@ The following arguments are supported: (Optional) Clearkey configuration. -The `mpeg_cenc` block supports: +The `mpeg_cenc` block supports: * `scheme` - (Required) Specify the encryption scheme. -The `secret_manager_key_source` block supports: +The `secret_manager_key_source` block supports: * `secret_version` - (Required) diff --git a/website/docs/r/transcoder_job_template.html.markdown b/website/docs/r/transcoder_job_template.html.markdown index d2ec21a22cb..fe790f3135d 100644 --- a/website/docs/r/transcoder_job_template.html.markdown +++ b/website/docs/r/transcoder_job_template.html.markdown @@ -618,23 +618,23 @@ The following arguments are supported: * `video_stream` - (Optional) Encoding of a video stream. - Structure is [documented below](#nested_config_elementary_streams_elementary_streams_video_stream). + Structure is [documented below](#nested_config_elementary_streams_video_stream). * `audio_stream` - (Optional) Encoding of an audio stream. - Structure is [documented below](#nested_config_elementary_streams_elementary_streams_audio_stream). + Structure is [documented below](#nested_config_elementary_streams_audio_stream). -The `video_stream` block supports: +The `video_stream` block supports: * `h264` - (Optional) H264 codec settings - Structure is [documented below](#nested_config_elementary_streams_elementary_streams_video_stream_h264). + Structure is [documented below](#nested_config_elementary_streams_video_stream_h264). -The `h264` block supports: +The `h264` block supports: * `width_pixels` - (Optional) @@ -696,7 +696,7 @@ The following arguments are supported: (Optional) HLG color format setting for H264. -The `audio_stream` block supports: +The `audio_stream` block supports: * `codec` - (Optional) @@ -739,14 +739,14 @@ The following arguments are supported: * `segment_settings` - (Optional) Segment settings for ts, fmp4 and vtt. - Structure is [documented below](#nested_config_mux_streams_mux_streams_segment_settings). + Structure is [documented below](#nested_config_mux_streams_segment_settings). * `encryption_id` - (Optional) Identifier of the encryption configuration to use. -The `segment_settings` block supports: +The `segment_settings` block supports: * `segment_duration` - (Optional) @@ -790,34 +790,34 @@ The following arguments are supported: * `image` - (Optional) Image overlay. - Structure is [documented below](#nested_config_overlays_overlays_image). + Structure is [documented below](#nested_config_overlays_image). * `animations` - (Optional) List of animations. The list should be chronological, without any time overlap. - Structure is [documented below](#nested_config_overlays_overlays_animations). + Structure is [documented below](#nested_config_overlays_animations). -The `image` block supports: +The `image` block supports: * `uri` - (Required) URI of the image in Cloud Storage. For example, gs://bucket/inputs/image.png. -The `animations` block supports: +The `animations` block supports: * `animation_fade` - (Optional) Display overlay object with fade animation. - Structure is [documented below](#nested_config_overlays_overlays_animations_animations_animation_fade). + Structure is [documented below](#nested_config_overlays_animations_animation_fade). -The `animation_fade` block supports: +The `animation_fade` block supports: * `xy` - (Optional) Normalized coordinates based on output video resolution. - Structure is [documented below](#nested_config_overlays_overlays_animations_animations_animation_fade_xy). + Structure is [documented below](#nested_config_overlays_animations_animation_fade_xy). * `start_time_offset` - (Optional) @@ -837,7 +837,7 @@ The following arguments are supported: Possible values are: `FADE_TYPE_UNSPECIFIED`, `FADE_IN`, `FADE_OUT`. -The `xy` block supports: +The `xy` block supports: * `x` - (Optional) @@ -856,7 +856,7 @@ The following arguments are supported: * `drm_systems` - (Optional) DRM system(s) to use; at least one must be specified. If a DRM system is omitted, it is considered disabled. - Structure is [documented below](#nested_config_encryptions_encryptions_drm_systems). + Structure is [documented below](#nested_config_encryptions_drm_systems). * `aes128` - (Optional) @@ -869,15 +869,15 @@ The following arguments are supported: * `mpeg_cenc` - (Optional) Configuration for MPEG Common Encryption (MPEG-CENC). - Structure is [documented below](#nested_config_encryptions_encryptions_mpeg_cenc). + Structure is [documented below](#nested_config_encryptions_mpeg_cenc). * `secret_manager_key_source` - (Optional) Configuration for secrets stored in Google Secret Manager. - Structure is [documented below](#nested_config_encryptions_encryptions_secret_manager_key_source). + Structure is [documented below](#nested_config_encryptions_secret_manager_key_source). -The `drm_systems` block supports: +The `drm_systems` block supports: * `widevine` - (Optional) @@ -895,13 +895,13 @@ The following arguments are supported: (Optional) Clearkey configuration. -The `mpeg_cenc` block supports: +The `mpeg_cenc` block supports: * `scheme` - (Required) Specify the encryption scheme. -The `secret_manager_key_source` block supports: +The `secret_manager_key_source` block supports: * `secret_version` - (Required) diff --git a/website/docs/r/vertex_ai_endpoint.html.markdown b/website/docs/r/vertex_ai_endpoint.html.markdown index 3f8768f82e1..e12723390ae 100644 --- a/website/docs/r/vertex_ai_endpoint.html.markdown +++ b/website/docs/r/vertex_ai_endpoint.html.markdown @@ -339,12 +339,12 @@ In addition to the arguments listed above, the following computed attributes are * `dedicated_resources` - (Output) A description of resources that are dedicated to the DeployedModel, and that need a higher degree of manual configuration. - Structure is [documented below](#nested_deployed_models_deployed_models_dedicated_resources). + Structure is [documented below](#nested_deployed_models_dedicated_resources). * `automatic_resources` - (Output) A description of resources that to large degree are decided by Vertex AI, and require only a modest additional configuration. - Structure is [documented below](#nested_deployed_models_deployed_models_automatic_resources). + Structure is [documented below](#nested_deployed_models_automatic_resources). * `id` - (Output) @@ -377,7 +377,7 @@ In addition to the arguments listed above, the following computed attributes are * `private_endpoints` - (Output) Output only. Provide paths for users to send predict/explain/health requests directly to the deployed model services running on Cloud via private services access. This field is populated if network is configured. - Structure is [documented below](#nested_deployed_models_deployed_models_private_endpoints). + Structure is [documented below](#nested_deployed_models_private_endpoints). * `shared_resources` - (Output) @@ -388,12 +388,12 @@ In addition to the arguments listed above, the following computed attributes are If true, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Stackdriver Logging. Only supported for custom-trained Models and AutoML Tabular Models. -The `dedicated_resources` block contains: +The `dedicated_resources` block contains: * `machine_spec` - (Output) The specification of a single machine used by the prediction. - Structure is [documented below](#nested_deployed_models_deployed_models_dedicated_resources_machine_spec). + Structure is [documented below](#nested_deployed_models_dedicated_resources_machine_spec). * `min_replica_count` - (Output) @@ -406,10 +406,10 @@ In addition to the arguments listed above, the following computed attributes are * `autoscaling_metric_specs` - (Output) The metric specifications that overrides a resource utilization metric (CPU utilization, accelerator's duty cycle, and so on) target value (default to 60 if not set). At most one entry is allowed per metric. If machine_spec.accelerator_count is above 0, the autoscaling will be based on both CPU utilization and accelerator's duty cycle metrics and scale up when either metrics exceeds its target value while scale down if both metrics are under their target value. The default target value is 60 for both metrics. If machine_spec.accelerator_count is 0, the autoscaling will be based on CPU utilization metric only with default target value 60 if not explicitly set. For example, in the case of Online Prediction, if you want to override target CPU utilization to 80, you should set autoscaling_metric_specs.metric_name to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and autoscaling_metric_specs.target to `80`. - Structure is [documented below](#nested_deployed_models_deployed_models_dedicated_resources_autoscaling_metric_specs). + Structure is [documented below](#nested_deployed_models_dedicated_resources_autoscaling_metric_specs). -The `machine_spec` block contains: +The `machine_spec` block contains: * `machine_type` - (Output) @@ -423,7 +423,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The number of accelerators to attach to the machine. -The `autoscaling_metric_specs` block contains: +The `autoscaling_metric_specs` block contains: * `metric_name` - (Output) @@ -433,7 +433,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided. -The `automatic_resources` block contains: +The `automatic_resources` block contains: * `min_replica_count` - (Output) @@ -443,7 +443,7 @@ In addition to the arguments listed above, the following computed attributes are (Output) The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, a no upper bound for scaling under heavy traffic will be assume, though Vertex AI may be unable to scale beyond certain replica number. -The `private_endpoints` block contains: +The `private_endpoints` block contains: * `predict_http_uri` - (Output) diff --git a/website/docs/r/vertex_ai_feature_online_store.html.markdown b/website/docs/r/vertex_ai_feature_online_store.html.markdown index a4a9fad59f1..857119afb0f 100644 --- a/website/docs/r/vertex_ai_feature_online_store.html.markdown +++ b/website/docs/r/vertex_ai_feature_online_store.html.markdown @@ -155,6 +155,11 @@ The following arguments are supported: ~> **Warning:** `embedding_management` is deprecated. This field is no longer needed anymore and embedding management is automatically enabled when specifying Optimized storage type +* `encryption_spec` - + (Optional) + If set, both of the online and offline data storage will be secured by this key. + Structure is [documented below](#nested_encryption_spec). + * `region` - (Optional) The region of feature online store. eg us-central1 @@ -167,11 +172,19 @@ The following arguments are supported: The `bigtable` block supports: +* `enable_direct_bigtable_access` - + (Optional) + Optional. If true, enable direct access to the Bigtable instance. + * `auto_scaling` - (Required) Autoscaling config applied to Bigtable Instance. Structure is [documented below](#nested_bigtable_auto_scaling). +* `zone` - + (Optional) + The zone where the Bigtable instance will be created. + The `auto_scaling` block supports: @@ -219,6 +232,12 @@ The following arguments are supported: (Optional) Enable embedding management. +The `encryption_spec` block supports: + +* `kms_key_name` - + (Required) + The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. The key needs to be in the same region as where the compute resource is created. + ## Attributes Reference In addition to the arguments listed above, the following computed attributes are exported: diff --git a/website/docs/r/vertex_ai_index_endpoint.html.markdown b/website/docs/r/vertex_ai_index_endpoint.html.markdown index be851ae45dd..5f24d13cac6 100644 --- a/website/docs/r/vertex_ai_index_endpoint.html.markdown +++ b/website/docs/r/vertex_ai_index_endpoint.html.markdown @@ -173,6 +173,22 @@ The following arguments are supported: (Optional) A list of Projects from which the forwarding rule will target the service attachment. +* `psc_automation_configs` - + (Optional) + List of projects and networks where the PSC endpoints will be created. This field is used by Online Inference(Prediction) only. + Structure is [documented below](#nested_private_service_connect_config_psc_automation_configs). + + +The `psc_automation_configs` block supports: + +* `project_id` - + (Required) + Project id used to create forwarding rule. + +* `network` - + (Required) + The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/get): projects/{project}/global/networks/{network}. + The `encryption_spec` block supports: * `kms_key_name` - diff --git a/website/docs/r/vertex_ai_reasoning_engine.html.markdown b/website/docs/r/vertex_ai_reasoning_engine.html.markdown index f1753d37b13..2589bf51877 100644 --- a/website/docs/r/vertex_ai_reasoning_engine.html.markdown +++ b/website/docs/r/vertex_ai_reasoning_engine.html.markdown @@ -30,6 +30,36 @@ To get more information about ReasoningEngine, see: * How-to Guides * [Develop and deploy agents on Vertex AI Agent Engine](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/quickstart) + +## Example Usage - Vertex Ai Reasoning Engine Source Based Deployment + + +```hcl +resource "google_vertex_ai_reasoning_engine" "reasoning_engine" { + display_name = "reasoning-engine" + description = "A basic reasoning engine" + region = "us-central1" + + spec { + source_code_spec { + inline_source { + source_archive = filebase64("./test-fixtures/source.tar.gz") + } + + python_spec { + entrypoint_module = "simple_agent" + entrypoint_object = "fixed_name_generator" + requirements_file = "./test-fixtures/requirements.txt" + version = "3.11" + } + } + } +} +```
Open in Cloud Shell @@ -327,17 +357,17 @@ The following arguments are supported: https://cloud.google.com/run/docs/configuring/memory-limits. * `min_instances` - + (Optional) + Optional. The minimum number of application instances that will be + kept running at all times. Defaults to 1. Range: [0, 10]. + +* `max_instances` - (Optional) Optional. The maximum number of application instances that can be launched to handle increased traffic. Defaults to 100. Range: [1, 1000]. If VPC-SC or PSC-I is enabled, the acceptable range is [1, 100]. -* `max_instances` - - (Optional) - Optional. The minimum number of application instances that will be - kept running at all times. Defaults to 1. Range: [0, 10]. - * `container_concurrency` - (Optional) Optional. Concurrency for each container and agent server. @@ -373,10 +403,10 @@ The following arguments are supported: (Required) Reference to a secret stored in the Cloud Secret Manager that will provide the value for this environment variable. - Structure is [documented below](#nested_spec_deployment_spec_secret_env_secret_env_secret_ref). + Structure is [documented below](#nested_spec_deployment_spec_secret_env_secret_ref). -The `secret_ref` block supports: +The `secret_ref` block supports: * `secret` - (Required) diff --git a/website/docs/r/vmwareengine_cluster.html.markdown b/website/docs/r/vmwareengine_cluster.html.markdown index 879f5302733..dba2c094576 100644 --- a/website/docs/r/vmwareengine_cluster.html.markdown +++ b/website/docs/r/vmwareengine_cluster.html.markdown @@ -223,20 +223,20 @@ The following arguments are supported: * `cpu_thresholds` - (Optional) Utilization thresholds pertaining to CPU utilization. - Structure is [documented below](#nested_autoscaling_settings_autoscaling_policies_autoscaling_policy_cpu_thresholds). + Structure is [documented below](#nested_autoscaling_settings_autoscaling_policies_cpu_thresholds). * `consumed_memory_thresholds` - (Optional) Utilization thresholds pertaining to amount of consumed memory. - Structure is [documented below](#nested_autoscaling_settings_autoscaling_policies_autoscaling_policy_consumed_memory_thresholds). + Structure is [documented below](#nested_autoscaling_settings_autoscaling_policies_consumed_memory_thresholds). * `storage_thresholds` - (Optional) Utilization thresholds pertaining to amount of consumed storage. - Structure is [documented below](#nested_autoscaling_settings_autoscaling_policies_autoscaling_policy_storage_thresholds). + Structure is [documented below](#nested_autoscaling_settings_autoscaling_policies_storage_thresholds). -The `cpu_thresholds` block supports: +The `cpu_thresholds` block supports: * `scale_out` - (Required) @@ -246,7 +246,7 @@ The following arguments are supported: (Required) The utilization triggering the scale-in operation in percent. -The `consumed_memory_thresholds` block supports: +The `consumed_memory_thresholds` block supports: * `scale_out` - (Required) @@ -256,7 +256,7 @@ The following arguments are supported: (Required) The utilization triggering the scale-in operation in percent. -The `storage_thresholds` block supports: +The `storage_thresholds` block supports: * `scale_out` - (Required) diff --git a/website/docs/r/vmwareengine_private_cloud.html.markdown b/website/docs/r/vmwareengine_private_cloud.html.markdown index 102db4f842b..00a010e3112 100644 --- a/website/docs/r/vmwareengine_private_cloud.html.markdown +++ b/website/docs/r/vmwareengine_private_cloud.html.markdown @@ -290,20 +290,20 @@ The following arguments are supported: * `cpu_thresholds` - (Optional) Utilization thresholds pertaining to CPU utilization. - Structure is [documented below](#nested_management_cluster_autoscaling_settings_autoscaling_policies_autoscaling_policy_cpu_thresholds). + Structure is [documented below](#nested_management_cluster_autoscaling_settings_autoscaling_policies_cpu_thresholds). * `consumed_memory_thresholds` - (Optional) Utilization thresholds pertaining to amount of consumed memory. - Structure is [documented below](#nested_management_cluster_autoscaling_settings_autoscaling_policies_autoscaling_policy_consumed_memory_thresholds). + Structure is [documented below](#nested_management_cluster_autoscaling_settings_autoscaling_policies_consumed_memory_thresholds). * `storage_thresholds` - (Optional) Utilization thresholds pertaining to amount of consumed storage. - Structure is [documented below](#nested_management_cluster_autoscaling_settings_autoscaling_policies_autoscaling_policy_storage_thresholds). + Structure is [documented below](#nested_management_cluster_autoscaling_settings_autoscaling_policies_storage_thresholds). -The `cpu_thresholds` block supports: +The `cpu_thresholds` block supports: * `scale_out` - (Required) @@ -313,7 +313,7 @@ The following arguments are supported: (Required) The utilization triggering the scale-in operation in percent. -The `consumed_memory_thresholds` block supports: +The `consumed_memory_thresholds` block supports: * `scale_out` - (Required) @@ -323,7 +323,7 @@ The following arguments are supported: (Required) The utilization triggering the scale-in operation in percent. -The `storage_thresholds` block supports: +The `storage_thresholds` block supports: * `scale_out` - (Required) diff --git a/website/docs/r/workbench_instance.html.markdown b/website/docs/r/workbench_instance.html.markdown index bc492bf5550..2a52e1312aa 100644 --- a/website/docs/r/workbench_instance.html.markdown +++ b/website/docs/r/workbench_instance.html.markdown @@ -634,10 +634,10 @@ The following arguments are supported: config, ONE_TO_ONE_NAT, is supported. If no accessConfigs specified, the instance will have an external internet access through an ephemeral external IP address. - Structure is [documented below](#nested_gce_setup_network_interfaces_network_interfaces_access_configs). + Structure is [documented below](#nested_gce_setup_network_interfaces_access_configs). -The `access_configs` block supports: +The `access_configs` block supports: * `external_ip` - (Required) diff --git a/website/docs/r/workstations_workstation_config.html.markdown b/website/docs/r/workstations_workstation_config.html.markdown index bdfdb81a0a1..93fdab22ad7 100644 --- a/website/docs/r/workstations_workstation_config.html.markdown +++ b/website/docs/r/workstations_workstation_config.html.markdown @@ -891,10 +891,10 @@ The following arguments are supported: * `accelerators` - (Optional) An accelerator card attached to the boost instance. - Structure is [documented below](#nested_host_gce_instance_boost_configs_boost_configs_accelerators). + Structure is [documented below](#nested_host_gce_instance_boost_configs_accelerators). -The `accelerators` block supports: +The `accelerators` block supports: * `type` - (Required) @@ -913,10 +913,10 @@ The following arguments are supported: * `gce_pd` - (Optional) A directory to persist across workstation sessions, backed by a Compute Engine regional persistent disk. Can only be updated if not empty during creation. - Structure is [documented below](#nested_persistent_directories_persistent_directories_gce_pd). + Structure is [documented below](#nested_persistent_directories_gce_pd). -The `gce_pd` block supports: +The `gce_pd` block supports: * `fs_type` - (Optional) @@ -949,10 +949,10 @@ The following arguments are supported: * `gce_pd` - (Optional) An EphemeralDirectory backed by a Compute Engine persistent disk. - Structure is [documented below](#nested_ephemeral_directories_ephemeral_directories_gce_pd). + Structure is [documented below](#nested_ephemeral_directories_gce_pd). -The `gce_pd` block supports: +The `gce_pd` block supports: * `disk_type` - (Optional)