diff --git a/provider/cmd/pulumi-resource-aws/schema.json b/provider/cmd/pulumi-resource-aws/schema.json index e6f00fe6b77..7e4acb3014c 100644 --- a/provider/cmd/pulumi-resource-aws/schema.json +++ b/provider/cmd/pulumi-resource-aws/schema.json @@ -184553,6 +184553,15 @@ "inputProperties": { "policyDocument": { "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "$ref": "#/types/aws:iam/documents:PolicyDocument" + } + ], "description": "Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters.\n" }, "policyName": { @@ -184570,6 +184579,15 @@ "properties": { "policyDocument": { "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "$ref": "#/types/aws:iam/documents:PolicyDocument" + } + ], "description": "Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters.\n" }, "policyName": { @@ -229034,6 +229052,15 @@ "inputProperties": { "policy": { "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "$ref": "#/types/aws:iam/documents:PolicyDocument" + } + ], "description": "The policy document. This is a JSON formatted string.\n" } }, @@ -229045,6 +229072,15 @@ "properties": { "policy": { "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "$ref": "#/types/aws:iam/documents:PolicyDocument" + } + ], "description": "The policy document. This is a JSON formatted string.\n" }, "registryId": { @@ -333122,6 +333158,15 @@ }, "policy": { "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "$ref": "#/types/aws:iam/documents:PolicyDocument" + } + ], "description": "The fully-formed AWS policy as JSON.\n" } }, @@ -333143,6 +333188,15 @@ }, "policy": { "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "$ref": "#/types/aws:iam/documents:PolicyDocument" + } + ], "description": "The fully-formed AWS policy as JSON.\n" } }, diff --git a/provider/resources.go b/provider/resources.go index 6dffcc90b54..3508ac290f4 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -1335,11 +1335,9 @@ func ProviderFromMeta(metaInfo *tfbridge.MetadataInfo) *tfbridge.ProviderInfo { Tok: awsResource(cloudwatchMod, "LogResourcePolicy"), Fields: map[string]*tfbridge.SchemaInfo{ "policy_document": { - Elem: &tfbridge.SchemaInfo{ - Type: "string", - AltTypes: []tokens.Type{awsType(iamMod, "documents", "PolicyDocument")}, - Transform: tfbridge.TransformJSONDocument, - }, + Type: "string", + AltTypes: []tokens.Type{awsType(iamMod, "documents", "PolicyDocument")}, + Transform: tfbridge.TransformJSONDocument, }, }, }, @@ -2087,11 +2085,9 @@ func ProviderFromMeta(metaInfo *tfbridge.MetadataInfo) *tfbridge.ProviderInfo { Tok: awsResource(ecrMod, "RegistryPolicy"), Fields: map[string]*tfbridge.SchemaInfo{ "policy": { - Elem: &tfbridge.SchemaInfo{ - Type: "string", - AltTypes: []tokens.Type{awsType(iamMod, "documents", "PolicyDocument")}, - Transform: tfbridge.TransformJSONDocument, - }, + Type: "string", + AltTypes: []tokens.Type{awsType(iamMod, "documents", "PolicyDocument")}, + Transform: tfbridge.TransformJSONDocument, }, }, }, @@ -3851,11 +3847,9 @@ func ProviderFromMeta(metaInfo *tfbridge.MetadataInfo) *tfbridge.ProviderInfo { Tok: awsResource(snsMod, "TopicPolicy"), Fields: map[string]*tfbridge.SchemaInfo{ "policy": { - Elem: &tfbridge.SchemaInfo{ - Type: "string", - AltTypes: []tokens.Type{awsType(iamMod, "documents", "PolicyDocument")}, - Transform: tfbridge.TransformJSONDocument, - }, + Type: "string", + AltTypes: []tokens.Type{awsType(iamMod, "documents", "PolicyDocument")}, + Transform: tfbridge.TransformJSONDocument, }, }, }, diff --git a/sdk/go/aws/cloudwatch/logResourcePolicy.go b/sdk/go/aws/cloudwatch/logResourcePolicy.go index d8f70ae9ad0..16d526f02d4 100644 --- a/sdk/go/aws/cloudwatch/logResourcePolicy.go +++ b/sdk/go/aws/cloudwatch/logResourcePolicy.go @@ -178,14 +178,14 @@ func GetLogResourcePolicy(ctx *pulumi.Context, // Input properties used for looking up and filtering LogResourcePolicy resources. type logResourcePolicyState struct { // Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters. - PolicyDocument *string `pulumi:"policyDocument"` + PolicyDocument interface{} `pulumi:"policyDocument"` // Name of the resource policy. PolicyName *string `pulumi:"policyName"` } type LogResourcePolicyState struct { // Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters. - PolicyDocument pulumi.StringPtrInput + PolicyDocument pulumi.Input // Name of the resource policy. PolicyName pulumi.StringPtrInput } @@ -196,7 +196,7 @@ func (LogResourcePolicyState) ElementType() reflect.Type { type logResourcePolicyArgs struct { // Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters. - PolicyDocument string `pulumi:"policyDocument"` + PolicyDocument interface{} `pulumi:"policyDocument"` // Name of the resource policy. PolicyName string `pulumi:"policyName"` } @@ -204,7 +204,7 @@ type logResourcePolicyArgs struct { // The set of arguments for constructing a LogResourcePolicy resource. type LogResourcePolicyArgs struct { // Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters. - PolicyDocument pulumi.StringInput + PolicyDocument pulumi.Input // Name of the resource policy. PolicyName pulumi.StringInput } diff --git a/sdk/go/aws/ecr/registryPolicy.go b/sdk/go/aws/ecr/registryPolicy.go index ff2ff70ffac..4d08624133b 100644 --- a/sdk/go/aws/ecr/registryPolicy.go +++ b/sdk/go/aws/ecr/registryPolicy.go @@ -132,14 +132,14 @@ func GetRegistryPolicy(ctx *pulumi.Context, // Input properties used for looking up and filtering RegistryPolicy resources. type registryPolicyState struct { // The policy document. This is a JSON formatted string. - Policy *string `pulumi:"policy"` + Policy interface{} `pulumi:"policy"` // The registry ID where the registry was created. RegistryId *string `pulumi:"registryId"` } type RegistryPolicyState struct { // The policy document. This is a JSON formatted string. - Policy pulumi.StringPtrInput + Policy pulumi.Input // The registry ID where the registry was created. RegistryId pulumi.StringPtrInput } @@ -150,13 +150,13 @@ func (RegistryPolicyState) ElementType() reflect.Type { type registryPolicyArgs struct { // The policy document. This is a JSON formatted string. - Policy string `pulumi:"policy"` + Policy interface{} `pulumi:"policy"` } // The set of arguments for constructing a RegistryPolicy resource. type RegistryPolicyArgs struct { // The policy document. This is a JSON formatted string. - Policy pulumi.StringInput + Policy pulumi.Input } func (RegistryPolicyArgs) ElementType() reflect.Type { diff --git a/sdk/go/aws/sns/topicPolicy.go b/sdk/go/aws/sns/topicPolicy.go index 3e1912432ca..16bec188232 100644 --- a/sdk/go/aws/sns/topicPolicy.go +++ b/sdk/go/aws/sns/topicPolicy.go @@ -153,7 +153,7 @@ type topicPolicyState struct { // The AWS Account ID of the SNS topic owner Owner *string `pulumi:"owner"` // The fully-formed AWS policy as JSON. - Policy *string `pulumi:"policy"` + Policy interface{} `pulumi:"policy"` } type TopicPolicyState struct { @@ -162,7 +162,7 @@ type TopicPolicyState struct { // The AWS Account ID of the SNS topic owner Owner pulumi.StringPtrInput // The fully-formed AWS policy as JSON. - Policy pulumi.StringPtrInput + Policy pulumi.Input } func (TopicPolicyState) ElementType() reflect.Type { @@ -173,7 +173,7 @@ type topicPolicyArgs struct { // The ARN of the SNS topic Arn string `pulumi:"arn"` // The fully-formed AWS policy as JSON. - Policy string `pulumi:"policy"` + Policy interface{} `pulumi:"policy"` } // The set of arguments for constructing a TopicPolicy resource. @@ -181,7 +181,7 @@ type TopicPolicyArgs struct { // The ARN of the SNS topic Arn pulumi.StringInput // The fully-formed AWS policy as JSON. - Policy pulumi.StringInput + Policy pulumi.Input } func (TopicPolicyArgs) ElementType() reflect.Type { diff --git a/sdk/nodejs/cloudwatch/logResourcePolicy.ts b/sdk/nodejs/cloudwatch/logResourcePolicy.ts index e7fbe948210..9040c0721e0 100644 --- a/sdk/nodejs/cloudwatch/logResourcePolicy.ts +++ b/sdk/nodejs/cloudwatch/logResourcePolicy.ts @@ -4,6 +4,8 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; +import {PolicyDocument} from "../iam"; + /** * Provides a resource to manage a CloudWatch log resource policy. * @@ -147,7 +149,7 @@ export interface LogResourcePolicyState { /** * Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters. */ - policyDocument?: pulumi.Input; + policyDocument?: pulumi.Input; /** * Name of the resource policy. */ @@ -161,7 +163,7 @@ export interface LogResourcePolicyArgs { /** * Details of the resource policy, including the identity of the principal that is enabled to put logs to this account. This is formatted as a JSON string. Maximum length of 5120 characters. */ - policyDocument: pulumi.Input; + policyDocument: pulumi.Input; /** * Name of the resource policy. */ diff --git a/sdk/nodejs/ecr/registryPolicy.ts b/sdk/nodejs/ecr/registryPolicy.ts index 92ed8794e90..8b0f0795ee5 100644 --- a/sdk/nodejs/ecr/registryPolicy.ts +++ b/sdk/nodejs/ecr/registryPolicy.ts @@ -4,6 +4,8 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; +import {PolicyDocument} from "../iam"; + /** * Provides an Elastic Container Registry Policy. * @@ -114,7 +116,7 @@ export interface RegistryPolicyState { /** * The policy document. This is a JSON formatted string. */ - policy?: pulumi.Input; + policy?: pulumi.Input; /** * The registry ID where the registry was created. */ @@ -128,5 +130,5 @@ export interface RegistryPolicyArgs { /** * The policy document. This is a JSON formatted string. */ - policy: pulumi.Input; + policy: pulumi.Input; } diff --git a/sdk/nodejs/sns/topicPolicy.ts b/sdk/nodejs/sns/topicPolicy.ts index e3bc363e914..d850a05ccd6 100644 --- a/sdk/nodejs/sns/topicPolicy.ts +++ b/sdk/nodejs/sns/topicPolicy.ts @@ -4,6 +4,8 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; +import {PolicyDocument} from "../iam"; + /** * Provides an SNS topic policy resource * @@ -149,7 +151,7 @@ export interface TopicPolicyState { /** * The fully-formed AWS policy as JSON. */ - policy?: pulumi.Input; + policy?: pulumi.Input; } /** @@ -163,5 +165,5 @@ export interface TopicPolicyArgs { /** * The fully-formed AWS policy as JSON. */ - policy: pulumi.Input; + policy: pulumi.Input; }