Auth Policy Args
data class AuthPolicyArgs(val policy: Output<String>? = null, val resourceIdentifier: Output<String>? = null, val state: Output<String>? = null) : ConvertibleToJava<AuthPolicyArgs>
Resource for managing an AWS VPC Lattice Auth Policy.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpclattice.Service;
import com.pulumi.aws.vpclattice.ServiceArgs;
import com.pulumi.aws.vpclattice.AuthPolicy;
import com.pulumi.aws.vpclattice.AuthPolicyArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 exampleService = new Service("exampleService", ServiceArgs.builder()
.authType("AWS_IAM")
.customDomainName("example.com")
.build());
var exampleAuthPolicy = new AuthPolicy("exampleAuthPolicy", AuthPolicyArgs.builder()
.resourceIdentifier(exampleService.arn())
.policy(serializeJson(
jsonObject(
jsonProperty("Version", "2012-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Action", "*"),
jsonProperty("Effect", "Allow"),
jsonProperty("Principal", "*"),
jsonProperty("Resource", "*"),
jsonProperty("Condition", jsonObject(
jsonProperty("StringNotEqualsIgnoreCase", jsonObject(
jsonProperty("aws:PrincipalType", "anonymous")
))
))
)))
)))
.build());
}
}
Content copied to clipboard
Import
VPC Lattice Auth Policy can be imported using the example_id_arg
, e.g.,
$ pulumi import aws:vpclattice/authPolicy:AuthPolicy example rft-8012925589
Content copied to clipboard
Properties
Link copied to clipboard
The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
Link copied to clipboard
The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.