Skip to content

Commit

Permalink
Skip flaky example (#2485)
Browse files Browse the repository at this point in the history
Add a patch to skip an example that caused flaky builds

AWS Cognito Identity Pool Roles Attachment example has flaky rendering to Pulumi languages causing unstable builds. Removing the example should make CI builds deterministic until such time as we can fix the root cause of this.
  • Loading branch information
t0yv0 committed Apr 24, 2023
1 parent ea1406a commit 5a053a7
Show file tree
Hide file tree
Showing 34 changed files with 130 additions and 574 deletions.
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-resource-aws/schema.json

Large diffs are not rendered by default.

129 changes: 0 additions & 129 deletions sdk/dotnet/Cognito/IdentityPoolRoleAttachment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,135 +12,6 @@ namespace Pulumi.Aws.Cognito
/// <summary>
/// Provides an AWS Cognito Identity Pool Roles Attachment.
///
/// ## Example Usage
///
/// ```csharp
/// using System.Collections.Generic;
/// using Pulumi;
/// using Aws = Pulumi.Aws;
///
/// return await Deployment.RunAsync(() =&gt;
/// {
/// var mainIdentityPool = new Aws.Cognito.IdentityPool("mainIdentityPool", new()
/// {
/// IdentityPoolName = "identity pool",
/// AllowUnauthenticatedIdentities = false,
/// SupportedLoginProviders =
/// {
/// { "graph.facebook.com", "7346241598935555" },
/// },
/// });
///
/// var authenticatedPolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()
/// {
/// Statements = new[]
/// {
/// new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
/// {
/// Effect = "Allow",
/// Principals = new[]
/// {
/// new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
/// {
/// Type = "Federated",
/// Identifiers = new[]
/// {
/// "cognito-identity.amazonaws.com",
/// },
/// },
/// },
/// Actions = new[]
/// {
/// "sts:AssumeRoleWithWebIdentity",
/// },
/// Conditions = new[]
/// {
/// new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs
/// {
/// Test = "StringEquals",
/// Variable = "cognito-identity.amazonaws.com:aud",
/// Values = new[]
/// {
/// mainIdentityPool.Id,
/// },
/// },
/// new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionInputArgs
/// {
/// Test = "ForAnyValue:StringLike",
/// Variable = "cognito-identity.amazonaws.com:amr",
/// Values = new[]
/// {
/// "authenticated",
/// },
/// },
/// },
/// },
/// },
/// });
///
/// var authenticatedRole = new Aws.Iam.Role("authenticatedRole", new()
/// {
/// AssumeRolePolicy = authenticatedPolicyDocument.Apply(getPolicyDocumentResult =&gt; getPolicyDocumentResult.Json),
/// });
///
/// var authenticatedRolePolicyPolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()
/// {
/// Statements = new[]
/// {
/// new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
/// {
/// Effect = "Allow",
/// Actions = new[]
/// {
/// "mobileanalytics:PutEvents",
/// "cognito-sync:*",
/// "cognito-identity:*",
/// },
/// Resources = new[]
/// {
/// "*",
/// },
/// },
/// },
/// });
///
/// var authenticatedRolePolicy = new Aws.Iam.RolePolicy("authenticatedRolePolicy", new()
/// {
/// Role = authenticatedRole.Id,
/// Policy = authenticatedRolePolicyPolicyDocument.Apply(getPolicyDocumentResult =&gt; getPolicyDocumentResult.Json),
/// });
///
/// var mainIdentityPoolRoleAttachment = new Aws.Cognito.IdentityPoolRoleAttachment("mainIdentityPoolRoleAttachment", new()
/// {
/// IdentityPoolId = mainIdentityPool.Id,
/// RoleMappings = new[]
/// {
/// new Aws.Cognito.Inputs.IdentityPoolRoleAttachmentRoleMappingArgs
/// {
/// IdentityProvider = "graph.facebook.com",
/// AmbiguousRoleResolution = "AuthenticatedRole",
/// Type = "Rules",
/// MappingRules = new[]
/// {
/// new Aws.Cognito.Inputs.IdentityPoolRoleAttachmentRoleMappingMappingRuleArgs
/// {
/// Claim = "isAdmin",
/// MatchType = "Equals",
/// RoleArn = authenticatedRole.Arn,
/// Value = "paid",
/// },
/// },
/// },
/// },
/// Roles =
/// {
/// { "authenticated", authenticatedRole.Arn },
/// },
/// });
///
/// });
/// ```
///
/// ## Import
///
/// Cognito Identity Pool Roles Attachment can be imported using the Identity Pool ID, e.g.,
Expand Down
122 changes: 0 additions & 122 deletions sdk/go/aws/cognito/identityPoolRoleAttachment.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,105 +20,6 @@
/**
* Provides an AWS Cognito Identity Pool Roles Attachment.
*
* ## Example Usage
* ```java
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.cognito.IdentityPool;
* import com.pulumi.aws.cognito.IdentityPoolArgs;
* import com.pulumi.aws.iam.IamFunctions;
* import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
* import com.pulumi.aws.iam.Role;
* import com.pulumi.aws.iam.RoleArgs;
* import com.pulumi.aws.iam.RolePolicy;
* import com.pulumi.aws.iam.RolePolicyArgs;
* import com.pulumi.aws.cognito.IdentityPoolRoleAttachment;
* import com.pulumi.aws.cognito.IdentityPoolRoleAttachmentArgs;
* import com.pulumi.aws.cognito.inputs.IdentityPoolRoleAttachmentRoleMappingArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var mainIdentityPool = new IdentityPool(&#34;mainIdentityPool&#34;, IdentityPoolArgs.builder()
* .identityPoolName(&#34;identity pool&#34;)
* .allowUnauthenticatedIdentities(false)
* .supportedLoginProviders(Map.of(&#34;graph.facebook.com&#34;, &#34;7346241598935555&#34;))
* .build());
*
* final var authenticatedPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
* .statements(GetPolicyDocumentStatementArgs.builder()
* .effect(&#34;Allow&#34;)
* .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
* .type(&#34;Federated&#34;)
* .identifiers(&#34;cognito-identity.amazonaws.com&#34;)
* .build())
* .actions(&#34;sts:AssumeRoleWithWebIdentity&#34;)
* .conditions(
* GetPolicyDocumentStatementConditionArgs.builder()
* .test(&#34;StringEquals&#34;)
* .variable(&#34;cognito-identity.amazonaws.com:aud&#34;)
* .values(mainIdentityPool.id())
* .build(),
* GetPolicyDocumentStatementConditionArgs.builder()
* .test(&#34;ForAnyValue:StringLike&#34;)
* .variable(&#34;cognito-identity.amazonaws.com:amr&#34;)
* .values(&#34;authenticated&#34;)
* .build())
* .build())
* .build());
*
* var authenticatedRole = new Role(&#34;authenticatedRole&#34;, RoleArgs.builder()
* .assumeRolePolicy(authenticatedPolicyDocument.applyValue(getPolicyDocumentResult -&gt; getPolicyDocumentResult).applyValue(authenticatedPolicyDocument -&gt; authenticatedPolicyDocument.applyValue(getPolicyDocumentResult -&gt; getPolicyDocumentResult.json())))
* .build());
*
* final var authenticatedRolePolicyPolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
* .statements(GetPolicyDocumentStatementArgs.builder()
* .effect(&#34;Allow&#34;)
* .actions(
* &#34;mobileanalytics:PutEvents&#34;,
* &#34;cognito-sync:*&#34;,
* &#34;cognito-identity:*&#34;)
* .resources(&#34;*&#34;)
* .build())
* .build());
*
* var authenticatedRolePolicy = new RolePolicy(&#34;authenticatedRolePolicy&#34;, RolePolicyArgs.builder()
* .role(authenticatedRole.id())
* .policy(authenticatedRolePolicyPolicyDocument.applyValue(getPolicyDocumentResult -&gt; getPolicyDocumentResult.json()))
* .build());
*
* var mainIdentityPoolRoleAttachment = new IdentityPoolRoleAttachment(&#34;mainIdentityPoolRoleAttachment&#34;, IdentityPoolRoleAttachmentArgs.builder()
* .identityPoolId(mainIdentityPool.id())
* .roleMappings(IdentityPoolRoleAttachmentRoleMappingArgs.builder()
* .identityProvider(&#34;graph.facebook.com&#34;)
* .ambiguousRoleResolution(&#34;AuthenticatedRole&#34;)
* .type(&#34;Rules&#34;)
* .mappingRules(IdentityPoolRoleAttachmentRoleMappingMappingRuleArgs.builder()
* .claim(&#34;isAdmin&#34;)
* .matchType(&#34;Equals&#34;)
* .roleArn(authenticatedRole.arn())
* .value(&#34;paid&#34;)
* .build())
* .build())
* .roles(Map.of(&#34;authenticated&#34;, authenticatedRole.arn()))
* .build());
*
* }
* }
* ```
*
* ## Import
*
* Cognito Identity Pool Roles Attachment can be imported using the Identity Pool ID, e.g.,
Expand Down

0 comments on commit 5a053a7

Please sign in to comment.